Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pull/13737' into QA_4_7
Browse files Browse the repository at this point in the history
  • Loading branch information
nijel committed Nov 28, 2017
2 parents 0262542 + 2242a24 commit 562d006
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion libraries/server_privileges.lib.php
Expand Up @@ -1905,7 +1905,19 @@ function PMA_updatePassword($err_url, $username, $hostname)

$local_query = $query_prefix
. $GLOBALS['dbi']->escapeString($_POST['pma_pw']) . "'";
} else if ($serverType == 'MariaDB'
} // MariaDB uses "SET PASSWORD" syntax to change user password.
// On Galera cluster only DDL queries are replicated, since
// users are stored in MyISAM storage engine.
else if ($serverType == 'MariaDB'
&& PMA_MYSQL_INT_VERSION >= 10000
) {
$query_prefix = "SET PASSWORD FOR '"
. $GLOBALS['dbi']->escapeString($username)
. "'@'" . $GLOBALS['dbi']->escapeString($hostname) . "'"
. " = PASSWORD ('";
$local_query = $query_prefix
. $GLOBALS['dbi']->escapeString($_POST['pma_pw']) . "')";
} else if ($serverType == 'MariaDB'
&& PMA_MYSQL_INT_VERSION >= 50200
&& $is_superuser
) {
Expand Down

0 comments on commit 562d006

Please sign in to comment.