diff --git a/CHANGELOG.md b/CHANGELOG.md index 58fb4ca6..acfb619c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## Adminer dev - SQL command: Unlink NULL primary keys +- MySQL: Fix displaying routine definition (bug #1156, regression from 5.4.0) ## Adminer 5.4.0 (released 2025-09-08) - Allow specifying operator in search anywhere @@ -28,7 +29,7 @@ - PostgreSQL: Fix calling functions returing table - PostgreSQL: Don't treat user types containing 'file' as blobs (bug #1118) - PostgreSQL: Export DROP and CREATE DATABASE (bug #1140) -- PostgreSQL 11-: Avoid duplicate oid in table status (bug #1089) +- PostgreSQL 11-: Avoid duplicate oid in table status (bug #1089, regression from 5.3.0) - Elasticsearch: Support dropping aliases - Plugins: Methods afterConnect(), processList() and killProcess() - New plugin: Display row numbers in select (bug #1106) diff --git a/adminer/drivers/mysql.inc.php b/adminer/drivers/mysql.inc.php index b731772b..1b09759d 100644 --- a/adminer/drivers/mysql.inc.php +++ b/adminer/drivers/mysql.inc.php @@ -897,7 +897,7 @@ if (!defined('Adminer\DRIVER')) { $space = "(?:\\s|/\\*[\s\S]*?\\*/|(?:#|-- )[^\n]*\n?|--\r?\n)"; $enum = driver()->enumLength; $type_pattern = "((" . implode("|", array_merge(array_keys(driver()->types()), $aliases)) . ")\\b(?:\\s*\\(((?:[^'\")]|$enum)++)\\))?" - . "\\s*(zerofill\\s*)?(unsigned(?:\\s+zerofill)?)?)(?:\\s*(?:CHARSET|CHARACTER\\s+SET)\\s*['\"]?([^'\"\\s,]+)['\"]?)?(?:\\s*COLLATE\\s*['\"]?([^'\"\\s,]+)['\"]?)?"; //! store COLLATE + . "\\s*(zerofill\\s*)?(unsigned(?:\\s+zerofill)?)?)(?:\\s*(?:CHARSET|CHARACTER\\s+SET)\\s*['\"]?([^'\"\\s,]+)['\"]?)?(?:\\s*COLLATE\\s*['\"]?(?:[^'\"\\s,]+)['\"]?)?"; //! store COLLATE $pattern = "$space*(" . ($type == "FUNCTION" ? "" : driver()->inout) . ")?\\s*(?:`((?:[^`]|``)*)`\\s*|\\b(\\S+)\\s+)$type_pattern"; $create = get_val("SHOW CREATE $type " . idf_escape($name), 2); preg_match("~\\(((?:$pattern\\s*,?)*)\\)\\s*" . ($type == "FUNCTION" ? "RETURNS\\s+$type_pattern\\s+" : "") . "(.*)~is", $create, $match);