From 55693163892d4cbae2a7b8abb4c8445e0fb7b6b1 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Fri, 29 Apr 2011 22:06:48 +0200 Subject: [PATCH] bug #3285929 [privileges] Don't fail silently on missing priviledge to execute REVOKE ALL PRIVILEGES --- ChangeLog | 1 + server_privileges.php | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3261e05ee..5a15934e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -154,6 +154,7 @@ - bug #3134495 [synchronization] Data containing single quotes prevents sync, thanks to jviewer - Remove the custom color picker feature +- bug #3285929 [privileges] Don't fail silently on missing priviledge to execute REVOKE ALL PRIVILEGES 3.3.11.0 (not yet released) diff --git a/server_privileges.php b/server_privileges.php index 09104e15b..308739cf1 100644 --- a/server_privileges.php +++ b/server_privileges.php @@ -1187,8 +1187,9 @@ if (!empty($update_privs)) { } $sql_query2 .= ';'; } - if (! PMA_DBI_try_query($sql_query0)) { - // this query may fail, but this does not matter :o) + if (! PMA_DBI_query($sql_query0)) { + // This might fail when the executing user does not have ALL PRIVILEGES himself. + // See https://sourceforge.net/tracker/index.php?func=detail&aid=3285929&group_id=23067&atid=377408 $sql_query0 = ''; } if (isset($sql_query1) && !PMA_DBI_try_query($sql_query1)) {