From e1d529d6a07b23897543f7e56409a1a16a1cbe72 Mon Sep 17 00:00:00 2001 From: DS_Starter Date: Fri, 18 Oct 2019 20:49:04 +0000 Subject: [PATCH] 93_DbRep: change SQL of delDoublets due to incompatible change of MySQL 8.0.13, Forum:104593.msg985007.html#msg985007 git-svn-id: https://svn.fhem.de/fhem/trunk@20379 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 2 ++ fhem/FHEM/93_DbRep.pm | 10 ++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index 66d5526ca..0a95fda12 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,7 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - change: 93_DbRep: change SQL of delDoublets due to incompatible change of + MySQL 8.0.13, Forum:104593.msg985007.html#msg985007 - change: 49_SSCamSTRM: set parentState initial in Define, Forum: 45671.msg985136.html#msg985136 - change: 88_Timer: added popup for user diff --git a/fhem/FHEM/93_DbRep.pm b/fhem/FHEM/93_DbRep.pm index ead38c2bd..633212abc 100644 --- a/fhem/FHEM/93_DbRep.pm +++ b/fhem/FHEM/93_DbRep.pm @@ -58,6 +58,7 @@ no if $] >= 5.017011, warnings => 'experimental::smartmatch'; # Version History intern our %DbRep_vNotesIntern = ( + "8.28.2" => "18.10.2019 change SQL selection in deldoublets_DoParse due to Incompatible change of MySQL 8.0.13, Forum: https://forum.fhem.de/index.php/topic,104593.msg985007.html#msg985007 ", "8.28.1" => "09.10.2019 fix warnings line 5173 ", "8.28.0" => "30.09.2019 seqDoubletsVariance - separate specification of positive and negative variance possible, Forum: https://forum.fhem.de/index.php/topic,53584.msg959963.html#msg959963 ", "8.27.2" => "27.09.2019 fix export data to file, fix delDoublets if MySQL and VALUE contains \, fix readingRename without leading device ", @@ -5011,14 +5012,11 @@ sub deldoublets_DoParse($) { Log3 ($name, 5, "DbRep $name - Timestamp-Array: \n@ts"); # mehrfache Datensätze finden - # SELECT TIMESTAMP, DEVICE, READING, VALUE, count(*) FROM history WHERE TIMESTAMP > '2018-11-01 00:00:00' GROUP BY TIMESTAMP, DEVICE, READING, VALUE ASC HAVING count(*) > 1 $table = "history"; $selspec = "TIMESTAMP,DEVICE,READING,VALUE,count(*)"; - $addon = "GROUP BY TIMESTAMP, DEVICE, READING, VALUE ASC HAVING count(*) > 1"; - if($dbloghash->{MODEL} eq 'SQLITE') { - $addon = "GROUP BY TIMESTAMP, DEVICE, READING, VALUE HAVING count(*) > 1 ORDER BY TIMESTAMP ASC"; # Forum: https://forum.fhem.de/index.php/topic,53584.msg914489.html#msg914489 - } - + # $addon = "GROUP BY TIMESTAMP, DEVICE, READING, VALUE ASC HAVING count(*) > 1"; # 18.10.2019 / V 8.28.2 + $addon = "GROUP BY TIMESTAMP, DEVICE, READING, VALUE HAVING count(*) > 1 ORDER BY TIMESTAMP ASC"; # Forum: https://forum.fhem.de/index.php/topic,53584.msg914489.html#msg914489 + # und Forum: https://forum.fhem.de/index.php/topic,104593.msg985007.html#msg985007 # SQL zusammenstellen für DB-Abfrage $sql = DbRep_createSelectSql($hash,$table,$selspec,$device,$reading,"?","?",$addon); eval{$sth = $dbh->prepare_cached($sql);};