2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00

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
This commit is contained in:
nasseeder1 2019-10-18 20:49:04 +00:00
parent 0db4f79404
commit 9f603966ff
2 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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);};