diff --git a/adminer/create.inc.php b/adminer/create.inc.php index b636ca18..a9a04bde 100644 --- a/adminer/create.inc.php +++ b/adminer/create.inc.php @@ -103,7 +103,6 @@ if ($_POST) { process_fields($row["fields"]); } elseif (strlen($_GET["create"])) { $row = table_status($_GET["create"]); - table_comment($row); $row["name"] = $_GET["create"]; $row["fields"] = array(); foreach ($orig_fields as $field) { diff --git a/adminer/db.inc.php b/adminer/db.inc.php index 758c0c84..beb9e16e 100644 --- a/adminer/db.inc.php +++ b/adminer/db.inc.php @@ -52,7 +52,6 @@ if (!$table_status) { echo '' . lang('Table') . '' . lang('Engine') . '' . lang('Collation') . '' . lang('Data Length') . '' . lang('Index Length') . '' . lang('Data Free') . '' . lang('Auto Increment') . '' . lang('Rows') . '' . lang('Comment') . "\n"; foreach ($table_status as $row) { $name = $row["Name"]; - table_comment($row); echo ''; echo '' . h($name) . ''; if (isset($row["Rows"])) { diff --git a/adminer/include/mysql.inc.php b/adminer/include/mysql.inc.php index d6aca975..4c6c68ac 100644 --- a/adminer/include/mysql.inc.php +++ b/adminer/include/mysql.inc.php @@ -170,6 +170,10 @@ function table_status($name = "") { $return = array(); $result = $dbh->query("SHOW TABLE STATUS" . (strlen($name) ? " LIKE " . $dbh->quote(addcslashes($name, "%_")) : "")); while ($row = $result->fetch_assoc()) { + if ($row["Engine"] == "InnoDB") { + // ignore internal comment, unnecessary since MySQL 5.1.21 + $row["Comment"] = preg_replace('~(?:(.+); )?InnoDB free: .*~', '\\1', $row["Comment"]); + } $return[$row["Name"]] = $row; } $result->free(); @@ -282,13 +286,6 @@ function escape_string($val) { return substr($dbh->quote($val), 1, -1); } -function table_comment(&$row) { - if ($row["Engine"] == "InnoDB") { - // ignore internal comment, unnecessary since MySQL 5.1.21 - $row["Comment"] = preg_replace('~(?:(.+); )?InnoDB free: .*~', '\\1', $row["Comment"]); - } -} - function information_schema($db) { global $dbh; return ($dbh->server_info >= 5 && $db == "information_schema"); diff --git a/editor/include/adminer.inc.php b/editor/include/adminer.inc.php index 69e08a4b..b82cc2de 100644 --- a/editor/include/adminer.inc.php +++ b/editor/include/adminer.inc.php @@ -32,7 +32,6 @@ class Adminer { } function tableName($tableStatus) { - table_comment($tableStatus); return h(strlen($tableStatus["Comment"]) ? $tableStatus["Comment"] : $tableStatus["Name"]); }