From 068c3422ea3cb56bce3d66e4800fc594d3315880 Mon Sep 17 00:00:00 2001 From: Bartek Fabiszewski Date: Wed, 19 Mar 2014 15:53:20 +0100 Subject: [PATCH] Fix for missing 'Trigger' menu for older MySQL versions Signed-off-by: Bartek Fabiszewski --- libraries/Util.class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libraries/Util.class.php b/libraries/Util.class.php index 3f0376bdfb..83def8f3de 100644 --- a/libraries/Util.class.php +++ b/libraries/Util.class.php @@ -3817,6 +3817,12 @@ class PMA_Util */ public static function currentUserHasPrivilege($priv, $db = null, $tbl = null) { + // TRIGGER privilege was added in MySQL 5.1.6. + // Before MySQL 5.1.6, the SUPER privilege was required to create or drop triggers. + if ($priv == "TRIGGER" && PMA_MYSQL_INT_VERSION < 50160) { + $priv = "SUPER"; + } + // Get the username for the current user in the format // required to use in the information schema database. $user = $GLOBALS['dbi']->fetchValue("SELECT CURRENT_USER();");