From 516416e72b1413cfa3dd88159aec67be2c22b7b4 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Wed, 8 May 2013 11:53:53 -0700 Subject: [PATCH] Fix tables list in Editor --- adminer/drivers/mysql.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adminer/drivers/mysql.inc.php b/adminer/drivers/mysql.inc.php index ce584a1a..d7427172 100644 --- a/adminer/drivers/mysql.inc.php +++ b/adminer/drivers/mysql.inc.php @@ -373,14 +373,14 @@ if (!defined("DRIVER")) { global $connection; $return = array(); foreach (get_rows($fast && $connection->server_info >= 5 - ? "SELECT table_name AS Name, Engine, TABLE_COMMENT AS Comment FROM information_schema.TABLES WHERE table_schema = " . q(DB) . ($name != "" ? " AND table_name = " . q($name) : "") + ? "SELECT TABLE_NAME AS Name, Engine, TABLE_COMMENT AS Comment FROM information_schema.TABLES WHERE TABLE_SCHEMA = DATABASE()" . ($name != "" ? " AND TABLE_NAME = " . q($name) : "") : "SHOW TABLE STATUS" . ($name != "" ? " LIKE " . q(addcslashes($name, "%_\\")) : "") ) as $row) { if ($row["Engine"] == "InnoDB") { // ignore internal comment, unnecessary since MySQL 5.1.21 $row["Comment"] = preg_replace('~(?:(.+); )?InnoDB free: .*~', '\\1', $row["Comment"]); } - if (!isset($row["Rows"])) { + if (!isset($row["Engine"])) { $row["Comment"] = ""; } if ($name != "") {