Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Show databases even with skip_show_database in MySQL 5 (thanks to Rad…

…oslaw Kowalewski)
  • Loading branch information...
commit f332258d562446d7ce866f931bdc57148bbf3658 1 parent 8bf0263
Jakub Vrána authored March 10, 2011
3  adminer/drivers/mysql.inc.php
@@ -261,6 +261,7 @@ function connect() {
261 261
 	* @return array
262 262
 	*/
263 263
 	function get_databases($flush = true) {
  264
+		global $connection;
264 265
 		// SHOW DATABASES can take a very long time so it is cached
265 266
 		$return = &get_session("dbs");
266 267
 		if (!isset($return)) {
@@ -269,7 +270,7 @@ function get_databases($flush = true) {
269 270
 				ob_flush();
270 271
 				flush();
271 272
 			}
272  
-			$return = get_vals("SHOW DATABASES");
  273
+			$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
273 274
 		}
274 275
 		return $return;
275 276
 	}
1  changes.txt
@@ -6,6 +6,7 @@ Enum editor and textarea Ctrl+Enter working in IE
6 6
 AJAX forms in Google Chrome
7 7
 Parse UTF-16 and UTF-8 BOM in all text uploads
8 8
 Use DELIMITER in history
  9
+Show databases even with skip_show_database in MySQL 5 (thanks to Radoslaw Kowalewski)
9 10
 Polish translation
10 11
 
11 12
 Adminer 3.2.0 (released 2011-02-24):

0 notes on commit f332258

Please sign in to comment.
Something went wrong with that request. Please try again.