diff options
-rw-r--r-- | libraries/classes/Server/Privileges.php | 7 | ||||
-rw-r--r-- | test/classes/Server/PrivilegesTest.php | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/libraries/classes/Server/Privileges.php b/libraries/classes/Server/Privileges.php index ff1d329e51..27198284f6 100644 --- a/libraries/classes/Server/Privileges.php +++ b/libraries/classes/Server/Privileges.php @@ -1698,10 +1698,9 @@ class Privileges continue; } - $dbRightsSqls[] = ' - SELECT DISTINCT `' . $dbOrTableName . '` - FROM `mysql`.' . Util::backquote($tableSearchIn) - . $userHostCondition; + $dbRightsSqls[] = 'SELECT DISTINCT `' . $dbOrTableName + . '` FROM `mysql`.' . Util::backquote($tableSearchIn) + . $userHostCondition; } $userDefaults = [ diff --git a/test/classes/Server/PrivilegesTest.php b/test/classes/Server/PrivilegesTest.php index 2a2a1ebba7..5cebb3d763 100644 --- a/test/classes/Server/PrivilegesTest.php +++ b/test/classes/Server/PrivilegesTest.php @@ -1636,7 +1636,7 @@ class PrivilegesTest extends AbstractTestCase ); // phpcs:disable Generic.Files.LineLength.TooLong $dummyDbi->addResult( - '( SELECT DISTINCT `Table_name` FROM `mysql`.`columns_priv` WHERE `User` = \'pma\' AND `Host` = \'host\' AND `Db` LIKE \'pmadb\') ORDER BY `Table_name` ASC', + '(SELECT DISTINCT `Table_name` FROM `mysql`.`columns_priv` WHERE `User` = \'pma\' AND `Host` = \'host\' AND `Db` LIKE \'pmadb\') ORDER BY `Table_name` ASC', [], ['Table_name'] ); @@ -1646,7 +1646,7 @@ class PrivilegesTest extends AbstractTestCase ['Table_name', 'Table_priv', 'Column_priv'] ); $dummyDbi->addResult( - '( SELECT DISTINCT `Db` FROM `mysql`.`tables_priv` WHERE `User` = \'pma2\' AND `Host` = \'host2\') UNION ( SELECT DISTINCT `Db` FROM `mysql`.`columns_priv` WHERE `User` = \'pma2\' AND `Host` = \'host2\') ORDER BY `Db` ASC', + '(SELECT DISTINCT `Db` FROM `mysql`.`tables_priv` WHERE `User` = \'pma2\' AND `Host` = \'host2\') UNION (SELECT DISTINCT `Db` FROM `mysql`.`columns_priv` WHERE `User` = \'pma2\' AND `Host` = \'host2\') ORDER BY `Db` ASC', [], ['Db'] ); |