From fe6cf678faec305f631718ae02ad1acdd7438794 Mon Sep 17 00:00:00 2001 From: DS_Starter Date: Wed, 17 Apr 2019 21:10:28 +0000 Subject: [PATCH] 93_DbLog: contrib V 4.1.0 git-svn-id: https://svn.fhem.de/fhem/trunk@19210 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/contrib/DS_Starter/93_DbLog.pm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fhem/contrib/DS_Starter/93_DbLog.pm b/fhem/contrib/DS_Starter/93_DbLog.pm index 1356c4d9e..c35786d68 100644 --- a/fhem/contrib/DS_Starter/93_DbLog.pm +++ b/fhem/contrib/DS_Starter/93_DbLog.pm @@ -28,7 +28,7 @@ no if $] >= 5.017011, warnings => 'experimental::smartmatch'; # Version History intern by DS_Starter: our %DbLog_vNotesIntern = ( - "4.1.0" => "17.04.2019 DbLog_Get: change reconnect for MySQL, change index suggestion in DbLog_configcheck ", + "4.1.0" => "17.04.2019 DbLog_Get: change reconnect for MySQL (Forum: #99719), change index suggestion in DbLog_configcheck ", "4.0.0" => "14.04.2019 rewrite DbLog_PushAsync / DbLog_Push / DbLog_Connectxx, new attribute \"bulkInsert\" ", "3.14.1" => "12.04.2019 DbLog_Get: change select of MySQL Forum: https://forum.fhem.de/index.php/topic,99280.0.html ", "3.14.0" => "05.04.2019 add support for Meta.pm and X_DelayedShutdownFn, attribute shutdownWait removed, ". @@ -3038,11 +3038,10 @@ sub DbLog_Get($@) { # $dbh = $hash->{DBHP}; # } + my $nh = ($hash->{MODEL} ne 'SQLITE')?1:0; - # Unterscheidung $dbh um AbbrĂ¼che in Plots (SQLite) zu vermeiden und - # andererseite kein "MySQL-Server has gone away" Fehler # $hash->{PID} != $$ -> create new connection for plotfork - if ($nh || $hash->{PID} != $$) { + if ($nh || $hash->{PID} != $$) { # 17.04.2019 Forum: https://forum.fhem.de/index.php/topic,99719.0.html $dbh = DbLog_ConnectNewDBH($hash); return "Can't connect to database." if(!$dbh); } else {