bug #1826022 [privileges] unable to add user (MySQL 3.23) since PMA 2.11.2
This commit is contained in:
@@ -16,7 +16,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
|
|||||||
- bug #1817224 [import] Incorrect detection of file_uploads in some cases,
|
- bug #1817224 [import] Incorrect detection of file_uploads in some cases,
|
||||||
thanks to Juergen Wind
|
thanks to Juergen Wind
|
||||||
- bug #1777249 [display] Do not underline links in left panel (in default
|
- bug #1777249 [display] Do not underline links in left panel (in default
|
||||||
themes)
|
- bug #1826022 [privileges] unable to add user (MySQL 3.23) since PMA 2.11.2
|
||||||
|
|
||||||
2.11.2.0 (2007-10-27)
|
2.11.2.0 (2007-10-27)
|
||||||
- patch #1791576 HTTP auth: support REDIRECT_REMOTE_USER, thanks to Allard
|
- patch #1791576 HTTP auth: support REDIRECT_REMOTE_USER, thanks to Allard
|
||||||
|
@@ -572,7 +572,7 @@ function PMA_mysqlDie($error_message = '', $the_query = '',
|
|||||||
*
|
*
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function PMA_convert_using($string, $mode='unquoted')
|
function PMA_convert_using($string, $mode='unquoted', $force_utf8 = false)
|
||||||
{
|
{
|
||||||
if ($mode == 'quoted') {
|
if ($mode == 'quoted') {
|
||||||
$possible_quote = "'";
|
$possible_quote = "'";
|
||||||
@@ -581,8 +581,14 @@ function PMA_convert_using($string, $mode='unquoted')
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (PMA_MYSQL_INT_VERSION >= 40100) {
|
if (PMA_MYSQL_INT_VERSION >= 40100) {
|
||||||
list($conn_charset) = explode('_', $GLOBALS['collation_connection']);
|
if ($force_utf8) {
|
||||||
$converted_string = "CONVERT(" . $possible_quote . $string . $possible_quote . " USING " . $conn_charset . ")";
|
$charset = 'utf8';
|
||||||
|
$collate = ' COLLATE utf8_bin';
|
||||||
|
} else {
|
||||||
|
list($charset) = explode('_', $GLOBALS['collation_connection']);
|
||||||
|
$collate = '';
|
||||||
|
}
|
||||||
|
$converted_string = "CONVERT(" . $possible_quote . $string . $possible_quote . " USING " . $charset . ")" . $collate;
|
||||||
} else {
|
} else {
|
||||||
$converted_string = $possible_quote . $string . $possible_quote;
|
$converted_string = $possible_quote . $string . $possible_quote;
|
||||||
}
|
}
|
||||||
|
@@ -749,11 +749,12 @@ if (!empty($adduser_submit) || !empty($change_copy)) {
|
|||||||
}
|
}
|
||||||
$res = PMA_DBI_query(
|
$res = PMA_DBI_query(
|
||||||
'SELECT \'foo\' FROM `mysql`.`user`'
|
'SELECT \'foo\' FROM `mysql`.`user`'
|
||||||
.' WHERE CONVERT(`User` USING utf8) COLLATE utf8_bin '
|
.' WHERE ' . PMA_convert_using('User', 'unquoted', true)
|
||||||
.' = CONVERT(\'' . PMA_sqlAddslashes($username) . '\' USING utf8) COLLATE utf8_bin '
|
.' = ' . PMA_convert_using(PMA_sqlAddslashes($username), 'quoted', true)
|
||||||
.' AND CONVERT(`Host` USING utf8) COLLATE utf8_bin '
|
.' AND ' . PMA_convert_using('Host', 'unquoted', true)
|
||||||
.' = CONVERT(\'' . PMA_sqlAddslashes($hostname) . '\' USING utf8) COLLATE utf8_bin ;',
|
.' = ' . PMA_convert_using($hostname, 'quoted', true) . ';',
|
||||||
null, PMA_DBI_QUERY_STORE);
|
null, PMA_DBI_QUERY_STORE);
|
||||||
|
|
||||||
if (PMA_DBI_num_rows($res) == 1) {
|
if (PMA_DBI_num_rows($res) == 1) {
|
||||||
PMA_DBI_free_result($res);
|
PMA_DBI_free_result($res);
|
||||||
$message = sprintf($GLOBALS['strUserAlreadyExists'], '[i]\'' . $username . '\'@\'' . $hostname . '\'[/i]');
|
$message = sprintf($GLOBALS['strUserAlreadyExists'], '[i]\'' . $username . '\'@\'' . $hostname . '\'[/i]');
|
||||||
|
Reference in New Issue
Block a user