bug #568174
This commit is contained in:
@@ -219,7 +219,8 @@ if ($server > 0) {
|
||||
$rs_usr = PMA_mysql_query($local_query, $dbh);
|
||||
}
|
||||
if ($rs_usr) {
|
||||
$re = '(^|(\\\\\\\\)+|[^\])';
|
||||
$re0 = '(^|(\\\\\\\\)+|[^\])'; // non-escaped wildcards
|
||||
$re1 = '(^|[^\])(\\\)+'; // escaped wildcards
|
||||
while ($row = PMA_mysql_fetch_row($rs_usr)) {
|
||||
$show_grants_dbname = substr($row[0], strpos($row[0], ' ON ') + 4,(strpos($row[0], '.', strpos($row[0], ' ON ')) - strpos($row[0], ' ON ') - 4));
|
||||
$show_grants_str = substr($row[0],6,(strpos($row[0],' ON ')-6));
|
||||
@@ -230,8 +231,8 @@ if ($server > 0) {
|
||||
break;
|
||||
} // end if
|
||||
else if (ereg($re . '%|_', $show_grants_dbname) || !PMA_mysql_select_db($show_grants_dbname, $userlink) && @mysql_errno() != 1044) {
|
||||
$show_grants_dbname = ereg_replace($re . '%', '\\1...', ereg_replace($re . '_', '\\1?', $show_grants_dbname));
|
||||
$db_to_create = $show_grants_dbname;
|
||||
$db_to_create = ereg_replace($re0 . '%', '\\1...', ereg_replace($re0 . '_', '\\1?', $show_grants_dbname));
|
||||
$db_to_create = ereg_replace($re1 . '(%|_)', '\\1\\3', $db_to_create);
|
||||
$is_create_priv = TRUE;
|
||||
break;
|
||||
} // end elseif
|
||||
|
Reference in New Issue
Block a user