From cc02a8dac9efa1a9283daaeacc492cbec2c9f1d6 Mon Sep 17 00:00:00 2001 From: nasseeder1 Date: Tue, 10 Mar 2020 22:27:02 +0000 Subject: [PATCH] 93_DbRep: better logfile messages in some cases of index operation git-svn-id: https://svn.fhem.de/fhem/trunk@21405 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/93_DbRep.pm | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index 34f564a79..c0f4ad06d 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # 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: better logfile messages in some cases of index operation - feature: 44_TEK603: new attribute "disable" - change: 12_OilFox: package FHEM::OilFox - bugfix: 73_DoorBird: SessionId does not work with TransmitAudio diff --git a/fhem/FHEM/93_DbRep.pm b/fhem/FHEM/93_DbRep.pm index 87bae9d54..ed3953a0b 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.32.3" => "10.03.2020 better logfile messages in some cases of index operation ", "8.32.2" => "01.03.2020 fix PERL WARNING: Argument \"\" isn't numeric in sprintf at ./FHEM/93_DbRep.pm line 10708 again ", "8.32.1" => "08.02.2020 fix PERL WARNING: Argument \"\" isn't numeric in sprintf at ./FHEM/93_DbRep.pm line 10708 ", "8.32.0" => "29.01.2020 new option \"deleteOther\" for minValue ", @@ -1804,7 +1805,7 @@ sub DbRep_dbConnect($$) { $dbpassword = $admpassword; } else { $err = "Can't use admin credentials for database access, see logfile !"; - Log3 ($name, 2, "DbRep $name - ERROR - admin credentials are needed for database access, but can't use it"); + Log3 ($name, 2, "DbRep $name - ERROR - admin credentials are needed for database operation, but are not set or can't read it"); return $err; } } @@ -6614,6 +6615,9 @@ sub DbRep_Index($) { } } + Log3 ($name, 2, "DbRep $name - user \"$dbuser\" doesn't have rights \"INDEX\" and \"ALTER\" as needed - try use adminCredentials automatically !") + if($p); + ($err,$dbh) = DbRep_dbConnect($name,$p); if ($err) { $err = encode_base64($err,"");