grant all privileges on wildcard name: did not work as intended

This commit is contained in:
Marc Delisle
2006-12-05 17:55:26 +00:00
parent dda0db43d0
commit 3bee553ab2
2 changed files with 5 additions and 1 deletions

View File

@@ -5,6 +5,10 @@ phpMyAdmin - ChangeLog
$Id$
$HeadURL$
2006-12-05 Marc Delisle <lem9@users.sourceforge.net>
* server_privileges.php: Grant all privileges on wildcard name: we should
really grant on username\_ instead of username_
2006-12-05 Michal Čihař <michal@cihar.com>
* server_privileges.php: Add IF NOT EXISTS to CREATE DATABASE query (RFE
#1608372), reload navigation after creating database.

View File

@@ -846,7 +846,7 @@ if (!empty($adduser_submit) || !empty($change_copy)) {
$sql_query .= $q;
PMA_DBI_try_query($q) or PMA_mysqlDie(PMA_DBI_getError(), $sql_query);
} elseif ($createdb == 2) {
$q = 'GRANT ALL PRIVILEGES ON ' . PMA_backquote(PMA_sqlAddslashes($username) . '_%') . '.* TO \'' . PMA_sqlAddslashes($username) . '\'@\'' . $hostname . '\';';
$q = 'GRANT ALL PRIVILEGES ON ' . PMA_backquote(PMA_sqlAddslashes($username) . '\_%') . '.* TO \'' . PMA_sqlAddslashes($username) . '\'@\'' . $hostname . '\';';
$sql_query .= $q;
PMA_DBI_try_query($q) or PMA_mysqlDie(PMA_DBI_getError(), $sql_query);
}