From: Jakub Vrana Date: Thu, 10 Mar 2011 11:00:08 +0000 (+0100) Subject: Show databases even with skip_show_database in MySQL 5 (thanks to Radoslaw Kowalewski) X-Git-Tag: v3.2.1~56 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=f332258d562446d7ce866f931bdc57148bbf3658;p=adminer.git Show databases even with skip_show_database in MySQL 5 (thanks to Radoslaw Kowalewski) --- diff --git a/adminer/drivers/mysql.inc.php b/adminer/drivers/mysql.inc.php index dbd17c99..c5d1b2c9 100644 --- a/adminer/drivers/mysql.inc.php +++ b/adminer/drivers/mysql.inc.php @@ -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; } diff --git a/changes.txt b/changes.txt index 571a54fb..d9460542 100644 --- a/changes.txt +++ b/changes.txt @@ -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):