From b9bc67d33115130ed7e9a9d91ce69067cb40fb7b Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sun, 15 Jun 2014 18:33:28 +0200 Subject: [PATCH] Fix reading routine column collations: http://sourceforge.net/p/adminer/discussion/960419/thread/3d0925f5/ --- adminer/drivers/mysql.inc.php | 2 +- changes.txt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/adminer/drivers/mysql.inc.php b/adminer/drivers/mysql.inc.php index 14f84efc..a4e192e3 100644 --- a/adminer/drivers/mysql.inc.php +++ b/adminer/drivers/mysql.inc.php @@ -796,7 +796,7 @@ if (!defined("DRIVER")) { function routine($name, $type) { global $connection, $enum_length, $inout, $types; $aliases = array("bool", "boolean", "integer", "double precision", "real", "dec", "numeric", "fixed", "national char", "national varchar"); - $type_pattern = "((" . implode("|", array_merge(array_keys($types), $aliases)) . ")\\b(?:\\s*\\(((?:[^'\")]|$enum_length)++)\\))?\\s*(zerofill\\s*)?(unsigned(?:\\s+zerofill)?)?)(?:\\s*(?:CHARSET|CHARACTER\\s+SET)\\s*['\"]?([^'\"\\s]+)['\"]?)?"; + $type_pattern = "((" . implode("|", array_merge(array_keys($types), $aliases)) . ")\\b(?:\\s*\\(((?:[^'\")]|$enum_length)++)\\))?\\s*(zerofill\\s*)?(unsigned(?:\\s+zerofill)?)?)(?:\\s*(?:CHARSET|CHARACTER\\s+SET)\\s*['\"]?([^'\"\\s,]+)['\"]?)?"; $pattern = "\\s*(" . ($type == "FUNCTION" ? "" : $inout) . ")?\\s*(?:`((?:[^`]|``)*)`\\s*|\\b(\\S+)\\s+)$type_pattern"; $create = $connection->result("SHOW CREATE $type " . idf_escape($name), 2); preg_match("~\\(((?:$pattern\\s*,?)*)\\)\\s*" . ($type == "FUNCTION" ? "RETURNS\\s+$type_pattern\\s+" : "") . "(.*)~is", $create, $match); diff --git a/changes.txt b/changes.txt index 93935fa5..6680d5ae 100644 --- a/changes.txt +++ b/changes.txt @@ -1,3 +1,6 @@ +Adminer 4.1.1-dev: +Fix reading routine column collations + Adminer 4.1.0 (released 2014-04-18) Provide size of all databases in the overview Prevent against brute force login attempts from the same IP address