]> git.joonet.de Git - adminer.git/commitdiff
Show databases even with skip_show_database in MySQL 5 (thanks to Radoslaw Kowalewski)
authorJakub Vrana <jakub@vrana.cz>
Thu, 10 Mar 2011 11:00:08 +0000 (12:00 +0100)
committerJakub Vrana <jakub@vrana.cz>
Thu, 10 Mar 2011 11:00:08 +0000 (12:00 +0100)
adminer/drivers/mysql.inc.php
changes.txt

index dbd17c99e76ef23873c27a32a76bfacda1e491f3..c5d1b2c921d51fb997dfdd2dc5e2ec40b6d3b66a 100644 (file)
@@ -261,6 +261,7 @@ if (!defined("DRIVER")) {
        * @return array
        */
        function get_databases($flush = true) {
+               global $connection;
                // SHOW DATABASES can take a very long time so it is cached
                $return = &get_session("dbs");
                if (!isset($return)) {
@@ -269,7 +270,7 @@ if (!defined("DRIVER")) {
                                ob_flush();
                                flush();
                        }
-                       $return = get_vals("SHOW DATABASES");
+                       $return = get_vals($connection->server_info >= 5 ? "SELECT SCHEMA_NAME FROM information_schema.SCHEMATA" : "SHOW DATABASES"); // SHOW DATABASES can be disabled by skip_show_database
                }
                return $return;
        }
index 571a54fb58e9a9ac81afa3783f9f964d0b5c2e23..d94605423dbf4e95e7ea008d3c1910ab00d1294f 100644 (file)
@@ -6,6 +6,7 @@ Enum editor and textarea Ctrl+Enter working in IE
 AJAX forms in Google Chrome
 Parse UTF-16 and UTF-8 BOM in all text uploads
 Use DELIMITER in history
+Show databases even with skip_show_database in MySQL 5 (thanks to Radoslaw Kowalewski)
 Polish translation
 
 Adminer 3.2.0 (released 2011-02-24):