diff options
author | Marc Delisle <marc@infomarc.info> | 2007-11-07 15:46:56 +0300 |
---|---|---|
committer | Marc Delisle <marc@infomarc.info> | 2007-11-07 15:46:56 +0300 |
commit | 18a9fe81c155fa333bab3a4a9c1d3a12836a36d5 (patch) | |
tree | a7d952532ce4081eebcd239807a3206fde44c1aa /server_privileges.php | |
parent | 9a19ae7fa8c46e185ac778606b05a533db4583f8 (diff) |
bug #1826022 [privileges] unable to add user (MySQL 3.23) since PMA 2.11.2
Diffstat (limited to 'server_privileges.php')
-rw-r--r-- | server_privileges.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/server_privileges.php b/server_privileges.php index 40513e2d9c..012a8d15d7 100644 --- a/server_privileges.php +++ b/server_privileges.php @@ -749,11 +749,12 @@ if (!empty($adduser_submit) || !empty($change_copy)) { } $res = PMA_DBI_query( 'SELECT \'foo\' FROM `mysql`.`user`' - .' WHERE CONVERT(`User` USING utf8) COLLATE utf8_bin ' - .' = CONVERT(\'' . PMA_sqlAddslashes($username) . '\' USING utf8) COLLATE utf8_bin ' - .' AND CONVERT(`Host` USING utf8) COLLATE utf8_bin ' - .' = CONVERT(\'' . PMA_sqlAddslashes($hostname) . '\' USING utf8) COLLATE utf8_bin ;', + .' WHERE ' . PMA_convert_using('User', 'unquoted', true) + .' = ' . PMA_convert_using(PMA_sqlAddslashes($username), 'quoted', true) + .' AND ' . PMA_convert_using('Host', 'unquoted', true) + .' = ' . PMA_convert_using($hostname, 'quoted', true) . ';', null, PMA_DBI_QUERY_STORE); + if (PMA_DBI_num_rows($res) == 1) { PMA_DBI_free_result($res); $message = sprintf($GLOBALS['strUserAlreadyExists'], '[i]\'' . $username . '\'@\'' . $hostname . '\'[/i]'); |