bug #1614087, deleting a user having a

global GRANT privilege fails under MySQL 4.1.x
This commit is contained in:
Marc Delisle
2007-01-02 15:35:57 +00:00
parent 10b9a9b0f0
commit 7e7b39aa83
2 changed files with 9 additions and 3 deletions

View File

@@ -7,6 +7,8 @@ $Source$
2007-01-02 Marc Delisle <lem9@users.sourceforge.net>
* pdf_pages.php: undefined $pdf_page_number when no auto layout
* server_privileges.php: bug #1614087, deleting a user having a
global GRANT privilege fails under MySQL 4.1.x
2007-01-02 Michal Čihař <michal@cihar.com>
* libraries/export/sql.php: DELIMITER should not be commented out (bug
@@ -64,6 +66,10 @@ $Source$
* scripts/upgrade.pl: bug #1599173, adapt for new filename structure,
thanks to Linas Gricius
2006-11-18 Marc Delisle <lem9@users.sourceforge.net>
* index.php, libraries/common.lib.php: undefined index
### 2.9.1.1 released from MAINT_2_9_1
2006-11-18 Michal Čihař <michal@cihar.com>
* Documentation.html, libraries/ip_allow_deny.lib.php: Define headers
which to trust in configuration, thanks for help with this to Christian
@@ -71,9 +77,6 @@ $Source$
* libraries/common.lib.php: Fix XSS on database comment, thanks to laurent
gaffié.
2006-11-18 Marc Delisle <lem9@users.sourceforge.net>
* index.php, libraries/common.lib.php: undefined index
2006-11-17 Michal Čihař <michal@cihar.com>
* sql.php, libraries/display_tbl.lib.php: Force pos to be integer to avoid
XSS.

View File

@@ -1143,6 +1143,9 @@ if (!empty($delete) || (!empty($change_copy) && $mode < 4)) {
unset($res);
}
if ( PMA_MYSQL_INT_VERSION >= 40101 ) {
if (PMA_MYSQL_INT_VERSION < 50002) {
$queries[] = 'REVOKE GRANT OPTION ON *.* FROM \'' . PMA_sqlAddslashes($this_user) . '\'@\'' . $this_host . '\';';
}
$queries[] = 'DROP USER \'' . PMA_sqlAddslashes($this_user) . '\'@\'' . $this_host . '\';';
} else {
$queries[] = 'DELETE FROM `mysql`.`user` WHERE ' . PMA_convert_using('User') . ' = ' . PMA_convert_using(PMA_sqlAddslashes($this_user), 'quoted') . ' AND ' . PMA_convert_using('Host') . ' = ' . PMA_convert_using($this_host, 'quoted') . ';';