From 82c369334d6def8262d7fa6a0aa799143e88b044 Mon Sep 17 00:00:00 2001 From: Deven Bansod Date: Sat, 3 Dec 2016 09:37:45 +0530 Subject: [PATCH] Use user-link instead of control-link to query INFORMATION_SCHEMA.* This virtual database is automatically populated based on the privileges of the user. Issue #12769 Signed-off-by: Deven Bansod --- libraries/rte/rte_list.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/rte/rte_list.lib.php b/libraries/rte/rte_list.lib.php index 83d546e7c3..eb8efc4542 100644 --- a/libraries/rte/rte_list.lib.php +++ b/libraries/rte/rte_list.lib.php @@ -204,7 +204,7 @@ function PMA_RTN_getRowForList($routine, $rowclass = '') . "AND SPECIFIC_NAME='" . $GLOBALS['dbi']->escapeString($routine['name']) . "'" . "AND ROUTINE_TYPE='" . $GLOBALS['dbi']->escapeString($routine['type']) . "'"; $query = "SELECT `DEFINER` FROM INFORMATION_SCHEMA.ROUTINES WHERE $where;"; - $routine_definer = $GLOBALS['dbi']->fetchValue($query, 0, 0, $GLOBALS['controllink']); + $routine_definer = $GLOBALS['dbi']->fetchValue($query); $curr_user = $GLOBALS['dbi']->getCurrentUser(); @@ -240,7 +240,7 @@ function PMA_RTN_getRowForList($routine, $rowclass = '') // otherwise we can execute it directly. $definition = $GLOBALS['dbi']->getDefinition( - $db, $routine['type'], $routine['name'], $GLOBALS['controllink'] + $db, $routine['type'], $routine['name'] ); if ($definition !== false) { $parser = new SqlParser\Parser($definition);