Skip to content

Commit 190726d

Browse files
committed
Changed error levels in mysql_clientdb_plugin to support clustered mysql database enviroments.
1 parent 626928d commit 190726d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

server/plugins-available/mysql_clientdb_plugin.inc.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ function db_insert($event_name,$data) {
147147
if (mysql_query('CREATE DATABASE '.mysql_real_escape_string($data["new"]["database_name"]).$query_charset_table,$link)) {
148148
$app->log('Created MySQL database: '.$data["new"]["database_name"],LOGLEVEL_DEBUG);
149149
} else {
150-
$app->log('Unable to connect to the database'.mysql_error($link),LOGLEVEL_ERROR);
150+
$app->log('Unable to create the database'.mysql_error($link),LOGLEVEL_WARNING);
151151
}
152152

153153
// Create the database user if database is active
@@ -284,20 +284,20 @@ function db_delete($event_name,$data) {
284284
if($this->process_host_list("DROP", "", $data["old"]["database_user"], "", $data["old"]["remote_ips"], $link)) {
285285
$app->log('Dropping mysql user: '.$data["old"]["database_user"],LOGLEVEL_DEBUG);
286286
} else {
287-
$app->log('Error while dropping mysql user: '.$data["old"]["database_user"].' '.mysql_error($link),LOGLEVEL_ERROR);
287+
$app->log('Error while dropping mysql user: '.$data["old"]["database_user"].' '.mysql_error($link),LOGLEVEL_WARNING);
288288
}
289289
}
290290
$db_host = 'localhost';
291291
if(mysql_query("DROP USER '".mysql_real_escape_string($data["old"]["database_user"],$link)."'@'$db_host';",$link)) {
292292
$app->log('Dropping mysql user: '.$data["old"]["database_user"],LOGLEVEL_DEBUG);
293293
} else {
294-
$app->log('Error while dropping mysql user: '.$data["old"]["database_user"].' '.mysql_error($link),LOGLEVEL_ERROR);
294+
$app->log('Error while dropping mysql user: '.$data["old"]["database_user"].' '.mysql_error($link),LOGLEVEL_WARNING);
295295
}
296296

297297
if(mysql_query('DROP DATABASE '.mysql_real_escape_string($data["old"]["database_name"],$link),$link)) {
298298
$app->log('Dropping mysql database: '.$data["old"]["database_name"],LOGLEVEL_DEBUG);
299299
} else {
300-
$app->log('Error while dropping mysql database: '.$data["old"]["database_name"].' '.mysql_error($link),LOGLEVEL_ERROR);
300+
$app->log('Error while dropping mysql database: '.$data["old"]["database_name"].' '.mysql_error($link),LOGLEVEL_WARNING);
301301
}
302302

303303
mysql_query("FLUSH PRIVILEGES;",$link);

0 commit comments

Comments
 (0)