]> git.joonet.de Git - adminer.git/commitdiff
Fix reading routine column collations: http://sourceforge.net/p/adminer/discussion...
authorJakub Vrana <jakub@vrana.cz>
Sun, 15 Jun 2014 16:33:28 +0000 (18:33 +0200)
committerJakub Vrana <jakub@vrana.cz>
Sun, 15 Jun 2014 16:43:45 +0000 (18:43 +0200)
adminer/drivers/mysql.inc.php
changes.txt

index 14f84efce8427fecb29a18509f16cd3855e8d629..a4e192e396211dfdee6d34c82a7878e00f685686 100644 (file)
@@ -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);
index 93935fa55273128e7acb47749fe98c1babcf08fe..6680d5aea641284abaccedd9febb60e62446036f 100644 (file)
@@ -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