Skip to content

Commit 04af09a

Browse files
author
Till Brehm
committed
Fixed a problem that caused the creation of mysql users to fail. This affected the dev branch only and not the stable 3.1.6 release.
1 parent 86138ed commit 04af09a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

server/plugins-available/mysql_clientdb_plugin.inc.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,16 @@ function process_host_list($action, $database_name, $database_user, $database_pa
7878
$unwanted_sql_plugins = array('validate_password'); // strict-password-validation
7979
$temp = "'".implode("','", $unwanted_sql_plugins)."'";
8080
$result = $link->query("SELECT plugin_name FROM information_schema.plugins WHERE plugin_status='ACTIVE' AND plugin_name IN ($temp)");
81-
if($result) {
81+
if($result && $result->num_rows > 0) {
82+
$sql_plugins = array();
8283
while ($row = $result->fetch_assoc()) {
8384
$sql_plugins[] = $row['plugin_name'];
8485
}
8586
$result->free();
86-
foreach ($sql_plugins as $plugin) $app->log("MySQL-Plugin $plugin enabled - can not execute function process_host_list", LOGLEVEL_ERROR);
87-
return false;
87+
if(count($sql_plugins) > 0) {
88+
foreach ($sql_plugins as $plugin) $app->log("MySQL-Plugin $plugin enabled - can not execute function process_host_list", LOGLEVEL_ERROR);
89+
return false;
90+
}
8891
}
8992

9093
if(!$user_access_mode) $user_access_mode = 'rw';

0 commit comments

Comments
 (0)