mirror of
https://github.com/vrana/adminer.git
synced 2025-08-05 06:07:57 +02:00
MariaDB: Parse COLLATE in routine definition (fix #1104)
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
- Add section links in database overview
|
||||
- Warn about exceeded max_file_uploads in import
|
||||
- MySQL 5.0-: Do not load partitioning info in alter table (bug #1099)
|
||||
- MariaDB: Parse COLLATE in routine definition (bug #1104)
|
||||
- PostgreSQL: Show structure of inherited tables
|
||||
- PostgreSQL: Display index expressions
|
||||
- PostgreSQL: Add SQL operator to select
|
||||
|
@@ -896,7 +896,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*(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);
|
||||
|
Reference in New Issue
Block a user