]> git.joonet.de Git - adminer.git/commitdiff
MySQL 9+: Support vector type
authorJakub Vrana <jakub@vrana.cz>
Sun, 23 Feb 2025 22:01:43 +0000 (23:01 +0100)
committerJakub Vrana <jakub@vrana.cz>
Sun, 23 Feb 2025 22:01:43 +0000 (23:01 +0100)
adminer/drivers/mysql.inc.php
changes.txt

index 1c5e2a123c7fcae61a81f7e7ca8560c73588780f..f5270921c0ba8cc89b59cabdfd26c3b06ec7a7a8 100644 (file)
@@ -384,6 +384,11 @@ if (!defined("DRIVER")) {
                                $types["uuid"] = 128;
                                $edit_functions[0]['uuid'] = 'uuid';
                        }
+                       if (min_version(9, '', $connection)) {
+                               $structured_types[lang('Numbers')][] = "vector";
+                               $types["vector"] = 16383;
+                               $edit_functions[0]['vector'] = 'string_to_vector';
+                       }
                        return $connection;
                }
                $return = $connection->error;
@@ -1166,7 +1171,7 @@ if (!defined("DRIVER")) {
                $structured_types = array(); ///< @var array [$description => array($type, ...), ...]
                foreach (array(
                        lang('Numbers') => array("tinyint" => 3, "smallint" => 5, "mediumint" => 8, "int" => 10, "bigint" => 20, "decimal" => 66, "float" => 12, "double" => 21),
-                       lang('Date and time') => array("date" => 10, "datetime" => 19, "timestamp" => 19, "time" => 10, "year" => 4),
+                       lang('Date and time') => array("dat`e" => 10, "datetime" => 19, "timestamp" => 19, "time" => 10, "year" => 4),
                        lang('Strings') => array("char" => 255, "varchar" => 65535, "tinytext" => 255, "text" => 65535, "mediumtext" => 16777215, "longtext" => 4294967295),
                        lang('Lists') => array("enum" => 65535, "set" => 64),
                        lang('Binary') => array("bit" => 20, "binary" => 255, "varbinary" => 65535, "tinyblob" => 255, "blob" => 65535, "mediumblob" => 16777215, "longblob" => 4294967295),
index ad20a7558be8c3b13a114798308389a05781f522..596bb78283c704e9f5e034e821b878f52478d54d 100644 (file)
@@ -5,6 +5,7 @@ Print SQL errors as comments in export (regression from 3.2.0)
 MySQL, PostgreSQL, MS SQL: Support CHECK constraint
 MySQL: Show comments at routine call (bug #874)
 MySQL: Don't offer empty enum value in edit
+MySQL 9+: Support vector type
 PostgreSQL: Link user defined types
 PostgreSQL: Constraint enum values in editing (bug #270)
 PostgreSQL: Export functions