diff --git a/fhem/CHANGED b/fhem/CHANGED index c4307f8af..0025e5e88 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: an invalid timestamp will put into state if found on + startup - bugfix: 38_netatmo: fixed changed values and deprecated API calls - bugfix: 93_DbLog: 3.12.1, crash if SVG called (forum:#91285) - change: 32_withings: API endpoint changed back to Withings servers diff --git a/fhem/FHEM/93_DbRep.pm b/fhem/FHEM/93_DbRep.pm index 4fb5fa15f..898c462ec 100644 --- a/fhem/FHEM/93_DbRep.pm +++ b/fhem/FHEM/93_DbRep.pm @@ -37,6 +37,7 @@ ########################################################################################################################### # Versions History: # +# 8.0.1 20.09.2018 DbRep_getMinTs improved # 8.0.0 11.09.2018 get filesize in DbRep_WriteToDumpFile corrected, restoreMySQL for clientSide dumps # minor fixes # 7.20.0 04.09.2018 deviceRename can operate a Device name with blank, e.g. 'current balance' as old device name @@ -347,7 +348,7 @@ no if $] >= 5.017011, warnings => 'experimental::smartmatch'; sub DbRep_Main($$;$); sub DbLog_cutCol($$$$$$$); # DbLog-Funktion nutzen um Daten auf maximale Länge beschneiden -my $DbRepVersion = "8.0.0"; +my $DbRepVersion = "8.0.1"; my %dbrep_col = ("DEVICE" => 64, "TYPE" => 64, @@ -1378,7 +1379,8 @@ sub DbRep_getMinTs($) { # SQL-Startzeit my $st = [gettimeofday]; - eval { $mints = $dbh->selectrow_array("SELECT min(TIMESTAMP) FROM history;"); }; + # eval { $mints = $dbh->selectrow_array("SELECT min(TIMESTAMP) FROM history;"); }; + eval { $mints = $dbh->selectrow_array("select TIMESTAMP from history limit 1;"); }; $dbh->disconnect; @@ -1421,8 +1423,8 @@ sub DbRep_getMinTsDone($) { return; } - $hash->{HELPER}{MINTS} = $mints; my $state = ($hash->{LASTCMD} eq "minTimestamp")?"done":"connected"; + $state = "invalid timestamp \"$mints\" found in database - please delete it" if($mints =~ /^0000-00-00.*$/); readingsBeginUpdate($hash); ReadingsBulkUpdateValue ($hash, "timestamp_oldest_dataset", $mints) if($hash->{LASTCMD} eq "minTimestamp");