2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 16:56:54 +00:00

93_DbRep: contrib 8.42.8

git-svn-id: https://svn.fhem.de/fhem/trunk@23851 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
nasseeder1 2021-02-28 15:40:58 +00:00
parent baea19ef80
commit b22551a0a0

View File

@ -57,6 +57,7 @@ no if $] >= 5.017011, warnings => 'experimental::smartmatch';
# Version History intern
my %DbRep_vNotesIntern = (
"8.42.8" => "28.02.2021 sqlCmdBlocking accept multiple SQL Statements ",
"8.42.7" => "27.02.2021 fix attribute sqlCmdVars is not working in sqlCmdBlocking Forum: /topic,53584.msg1135528.html#msg1135528",
"8.42.6" => "25.02.2021 fix commandref ",
"8.42.5" => "02.02.2021 correct possible values for attr seqDoubletsVariance ",
@ -1931,7 +1932,7 @@ sub DbRep_Main {
if ($opt =~ /index/) {
if (exists($hash->{HELPER}{RUNNING_INDEX})) {
Log3 ($name, 3, "DbRep $name - WARNING - old process $hash->{HELPER}{RUNNING_INDEX}{pid} will be killed now to start a new index operation");
Log3 ($name, 3, "DbRep $name - WARNING - running process $hash->{HELPER}{RUNNING_INDEX}{pid} will be killed now to start a new index operation");
BlockingKill($hash->{HELPER}{RUNNING_INDEX});
}
Log3 ($name, 3, "DbRep $name - Command: $opt $prop");
@ -1942,7 +1943,7 @@ sub DbRep_Main {
}
if (exists($hash->{HELPER}{RUNNING_PID}) && $hash->{ROLE} ne "Agent") {
Log3 ($name, 3, "DbRep $name - WARNING - old process $hash->{HELPER}{RUNNING_PID}{pid} will be killed now to start a new BlockingCall");
Log3 ($name, 3, "DbRep $name - WARNING - running process $hash->{HELPER}{RUNNING_PID}{pid} will be killed now to start a new operation");
BlockingKill($hash->{HELPER}{RUNNING_PID});
}
@ -11732,7 +11733,8 @@ sub DbRep_sqlCmdBlocking {
ReadingsSingleUpdateValue ($hash, "state", "error", 1);
return $err;
}
$cmd =~ s/\;\;/ESC_ESC_ESC/gx; # ersetzen von escapeten ";" (;;)
my $sql = ($cmd =~ m/\;$/xs) ? $cmd : $cmd.";";
Log3 ($name, 4, "DbRep $name - -------- New selection --------- ");
@ -11764,6 +11766,8 @@ sub DbRep_sqlCmdBlocking {
$sql = $2;
}
$sql =~ s/ESC_ESC_ESC/;/gx; # wiederherstellen von escapeten ";" -> umwandeln von ";;" in ";"
if($set) {
Log3($name, 4, "DbRep $name - Set SQL session variables: $set");
eval {$dbh->do($set);}; # @\RB = Resetbit wenn neues Selektionsintervall beginnt