MySQL: Support routines with comments in parameters (bug #460)
This commit is contained in:
parent
8b29ae910f
commit
34f25afe90
|
@ -813,8 +813,9 @@ 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");
|
||||
$space = "(?:\\s|/\\*[\s\S]*?\\*/|(?:#|-- )[^\n]*\n?|--\r?\n)";
|
||||
$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";
|
||||
$pattern = "$space*(" . ($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);
|
||||
$fields = array();
|
||||
|
|
|
@ -6,6 +6,7 @@ Store current Adminer version server-side to avoid excessive requests
|
|||
Adminer: Fix Search data in tables (regression from 4.4.0)
|
||||
CSP: Allow any styles, images, media and fonts, disallow base-uri
|
||||
MySQL: Support geometry in MySQL 8 (bug #574)
|
||||
MySQL: Support routines with comments in parameters (bug #460)
|
||||
MariaDB: Support fulltext and spatial indexes in InnoDB (bug #583)
|
||||
SQLite: Enable foreign key checks
|
||||
PostgreSQL: Respect NULL default value
|
||||
|
|
Loading…
Reference in a new issue