diff --git a/ChangeLog b/ChangeLog index 6398cc6499..2aa0e0ba5e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,7 @@ phpMyAdmin - ChangeLog - issue #11464 phpMyAdmin suggests upgrading to newer version not usable on that system - issue #11495 'PMA_Microhistory' is undefined - issue #11496 Incorrect definition for getTablesWhenOpen() +- issue #11500 Error when creating new user on MariaDB 10.0.21 4.5.0.2 (2015-09-25) - issue #11497 Incorrect indexes when exporting diff --git a/libraries/server_privileges.lib.php b/libraries/server_privileges.lib.php index e7954bac0c..5234623f59 100644 --- a/libraries/server_privileges.lib.php +++ b/libraries/server_privileges.lib.php @@ -4958,6 +4958,7 @@ function PMA_getSqlQueriesForDisplayAndAddUser($username, $hostname, $password) $slashedUsername = PMA_Util::sqlAddSlashes($username); $slashedHostname = PMA_Util::sqlAddSlashes($hostname); $slashedPassword = PMA_Util::sqlAddSlashes($password); + $serverType = PMA_Util::getServerType(); $create_user_stmt = sprintf( 'CREATE USER \'%s\'@\'%s\'', @@ -4966,12 +4967,14 @@ function PMA_getSqlQueriesForDisplayAndAddUser($username, $hostname, $password) ); if (PMA_MYSQL_INT_VERSION >= 50507 + && $serverType == 'MySQL' && isset($_REQUEST['authentication_plugin']) ) { $create_user_stmt .= ' IDENTIFIED WITH ' . $_REQUEST['authentication_plugin']; } if (PMA_MYSQL_INT_VERSION >= 50707 + && $serverType == 'MySQL' && strpos($create_user_stmt, '%') !== false ) { $create_user_stmt = str_replace( @@ -4996,7 +4999,9 @@ function PMA_getSqlQueriesForDisplayAndAddUser($username, $hostname, $password) ); $real_sql_query = $sql_query = $sql_query_stmt; - if (PMA_MYSQL_INT_VERSION < 50707) { + if (PMA_MYSQL_INT_VERSION < 50707 + || $serverType != 'MySQL' + ) { if ($_POST['pred_password'] == 'keep') { $password_set_real = sprintf( $password_set_stmt, @@ -5079,7 +5084,7 @@ function PMA_getSqlQueriesForDisplayAndAddUser($username, $hostname, $password) $sql_query = ''; } - if (PMA_Util::getServerType() == 'MySQL' + if ($serverType == 'MySQL' && PMA_MYSQL_INT_VERSION >= 50700 ) { $password_set_real = null;