Skip to content

Commit 8cd5151

Browse files
committed
WL#16081 - Native Vector Embeddings Support In HeatWave
BUG#36165262 - WL#16081: Table is allowed to be partitioned on vector column BUG#36167088 - WL#16081: Generated columns allowed on vector columns BUG#36168511 - WL#16081: Issues with Vector column constraints BUG#36195637 - Wl16081: Alter table not giving error when new dimension less than existing data BUG#36194832 - WL#16081: STRING_TO_VECTOR function requires a vector type column BUG#36168535 - [Wl16081] Select Hangs whe VECTOR_TO_STRING called on vector column BUG#36206068 - [Wl16081] : Read-Replica broken with Vector data type BUG#36214076 - WL#16081: Rpdserver crash - sig11 at from_string_to_vector BUG#36225693 - WL#16081: Functions SHA1, MD5, SHA2 return error for vector data loaded to rapid BUG#36241312 - WL#16081: Error All plans were rejected by HeatWave secondary engine BUG#36255628 - WL#16081:setting secondary_engine of table having vector column taking long time BUG#36265079 - WL#16081: wrong result when IS NULL applied to distance() function output BUG#36272178 - WL#16081:virtual bool Item_func_get_user_var::propagate_type(THD*, const Type_properties&): Assertion `false' failed. BUG#36239717 - to_base64() on vector column of miracl dataset crashes rapid BUG#36255777 - WL#16081: Mysqld crash - Assertion `!std::isnan(nr)' failed. BUG#36281463 - STRING_TO_VECTOR() returning error "Data cannot be converted" BUG#36285521 - WL#16081: Mysqld crash - Assertion `!thd->is_error()' failed BUG#36287504 - WL#16081: mysqld crash at Item_func_to_vector::val_str for ASAN BUG#36267410 - WL#16081: mysqld crash at ParseBlob () in change_prop/rpd_binlog_parser.cc This worklog will implement vector support in MySQL HeatWave. - VECTOR column type: This will be an addition to the CREATE TABLE statement as a new column data_type. Under the hood, it is mainly a syntactic change; the VECTOR columns will be a wrapper around BLOB. All the limitations that apply to BLOB apply for VECTOR. More restrictions for VECTOR will also be in place, discussed below. - DISTANCE function: This will be implemented as a component/UDF. The function is responsible for computing the distance between two VECTOR entries, of exactly the same dimension. Exact semantics will be discussed as part of functional requirements. - UTILITY functions: -- VECTOR_DIM: Returns the dimensionality of each vector entry. -- VECTOR_TO_STRING/FROM_VECTOR: Converts vector to human readable format. -- STRING_TO_VECTOR/TO_VECTOR: Converts human readable format to vector. Detailed Change Description =========================== ** VECTOR type support ** - sql/lex.h: The support for VECTOR keyword, along with VECTOR_SYM. - sql/sql_yacc.yy: Change in directing VECTOR_SYM to PT_vector_type. - VECTOR(N) -> N is **optional** field_length. - If N is not provided, it will be assumed 2048 by default. - sql/parse_tree_column_attrs.h: PT_vector_type, inherits PT_char_type. - It has additional vector_length to store given length. - The vector_length is computed by multiplying the given length value N by sizeof(float), since the entry precision is always a single-precision floating-point value. - It overrides is_vector to return true. - sql/field.h: - Field_vector inherits from Field_blob - As its real_type, it will return MYSQL_TYPE_VECTOR: a newly introduced field type. - sql/dd/types/column.h: - New virtual is_vector() function. - sql/dd/impl/types/column_impl.h: - Column_impl overrides is_vector() -> It will return if its m_column_type_utf8 has "vector" string in its beginning. ** Restrictions on VECTOR type ** - share/messages_to_clients.txt: Introduced following errors: - ER_VECTOR_USED_AS_KEY - ER_UNABLE_TO_BUILD_HISTOGRAM_VECTOR - sql/sql_table.cc: - At prepare_key_column, if a VECTOR typed column is found, throw ER_VECTOR_USED_AS_KEY. This ensures the restriction on VECTOR tyoe as PRIMARY KEY, FOREIGN KEY, UNIQUE, etc. - sql/histograms/histogram.cc: If a histogram is being build on VECTOR typed column, throw ER_UNABLE_TO_BUILD_HISTOGRAM_VECTOR. ** DISTANCE function support ** - new component: vector - vector.cc: - Implements component_vector - Implements DISTANCE(arg_0, arg_1, <optional>distance_metric) - It will calculate the distance of each row at arg_0 and arg_1 - If the length of either argument is not matching (evaluated for each row), the output for that row will be NULL. - The output precision of DISTANCE is double-precision (8 Bytes) - vector.hpp: Standalone vectorized implementation of vector functions. ** Utility functions support ** - VECTOR_DIM - VECTOR_TO_STRING - STRING_TO_VECTOR Functional requirements as described in the WL page. ** Restrictions on DISTANCE function ** - Expects 2 or 3 arguments. - All arguments must be of type STRING_RESULT. - If there is a 3rd argument, it must be one of these: - "DOT": dot/inner product - "COSINE": cosine distance - "EUCLIDIAN": euclidian distance - If there is no 3rd argument, "DOT" will be used by default. ** HeatWave side support ** - VECTOR type: - For HeatWave, a vector("N") typed column is regarded as BLOB("sizeof(float)*N"), column. - One difference: For VECTOR typed columns, compression at load will be disabled by default. - DISTANCE functions: - These will be interpreted as other Item_funcs. Same restrictions as mysql side apply. - Additionally, we can check if there is at least one vector typed column in the Item_func arguments. - The new primitive introduced uses the same distance function implementations as in vector.hpp ** 36165262 ** Vector column as partitioning key is blocked. ** 36167088 ** Vector column as part of generated column expression is blocked. ** 36168511 ** Addressed HeatWave load constraints: DICT encoding, ZONEMAP ** 36168535 ** This was a QCOMP bug at rapid: Mismatch between vbsize setting and the consideration of the nullbv for chunkv size setting. No need to consider nullbv for VARLEN columns. ** 36206068 ** In rpl_utility, enable conversion between BLOB and VECTOR ** 36214076 ** Handle zero length strings at STRING_TO_VECTOR ** 36225693 ** This was an issue on the trunk (charset handling in QKRN) ** 36241312 ** QKRN stats being set conservatively for conversion functions. ** 36255628 ** Field_vector was using is_equal of parent Field_blob, which was leading to unnecessary not equal behavior. Overridden. ** 36265079 ** Issue was in rapid primitive: Instead of comparing dims, we were comparing varlen max lengths. ** 36272178 ** Handle session var type propagation. ** 36239717 ** This is a bug on trunk, related to QKRN stats setting for TO_BASE64 at QKRN. ** 36255777 ** Handle NaN values in distance calculation ** 36281463 ** reset errno before starting the conversion ** 36285521 ** VECTOR type check at Item_func_equal::resolve_type ** 36287504 ** Limit the number of chars printed at ER_TO_VECTOR_CONVERSION ** 36267410 ** Vector fields are marked as memcpy-able, which is not correct. This was causing a binlog corruption. Change-Id: I68d562193acd0cb00823908b0398f8215345521f
1 parent 6cc9873 commit 8cd5151

File tree

104 files changed

+2234
-184
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+2234
-184
lines changed

client/mysql.cc

+14-9
Original file line numberDiff line numberDiff line change
@@ -1161,6 +1161,11 @@ static COMMANDS commands[] = {
11611161
{"TO_DAYS", 0, nullptr, false, ""},
11621162
{"TOUCHES", 0, nullptr, false, ""},
11631163
{"TRIM", 0, nullptr, false, ""},
1164+
{"TO_VECTOR", 0, nullptr, false, ""},
1165+
{"STRING_TO_VECTOR", 0, nullptr, false, ""},
1166+
{"FROM_VECTOR", 0, nullptr, false, ""},
1167+
{"VECTOR_TO_STRING", 0, nullptr, false, ""},
1168+
{"VECTOR_DIM", 0, nullptr, false, ""},
11641169
{"UCASE", 0, nullptr, false, ""},
11651170
{"UNCOMPRESS", 0, nullptr, false, ""},
11661171
{"UNCOMPRESSED_LENGTH", 0, nullptr, false, ""},
@@ -3909,15 +3914,15 @@ static void print_field_types(MYSQL_RES *result) {
39093914
/* Used to determine if we should invoke print_as_hex for this field */
39103915

39113916
static bool is_binary_field(MYSQL_FIELD *field) {
3912-
return ((field->charsetnr == 63) &&
3913-
(field->type == MYSQL_TYPE_BIT || field->type == MYSQL_TYPE_BLOB ||
3914-
field->type == MYSQL_TYPE_LONG_BLOB ||
3915-
field->type == MYSQL_TYPE_MEDIUM_BLOB ||
3916-
field->type == MYSQL_TYPE_TINY_BLOB ||
3917-
field->type == MYSQL_TYPE_VAR_STRING ||
3918-
field->type == MYSQL_TYPE_STRING ||
3919-
field->type == MYSQL_TYPE_VARCHAR ||
3920-
field->type == MYSQL_TYPE_GEOMETRY));
3917+
return (
3918+
(field->charsetnr == 63) &&
3919+
(field->type == MYSQL_TYPE_BIT || field->type == MYSQL_TYPE_BLOB ||
3920+
field->type == MYSQL_TYPE_LONG_BLOB ||
3921+
field->type == MYSQL_TYPE_MEDIUM_BLOB ||
3922+
field->type == MYSQL_TYPE_TINY_BLOB ||
3923+
field->type == MYSQL_TYPE_VAR_STRING ||
3924+
field->type == MYSQL_TYPE_STRING || field->type == MYSQL_TYPE_VARCHAR ||
3925+
field->type == MYSQL_TYPE_VECTOR || field->type == MYSQL_TYPE_GEOMETRY));
39213926
}
39223927

39233928
/* Print binary value as hex literal (0x ...) */

client/mysqldump.cc

+1
Original file line numberDiff line numberDiff line change
@@ -4084,6 +4084,7 @@ static void dump_table(char *table, char *db) {
40844084
field->type == MYSQL_TYPE_VAR_STRING ||
40854085
field->type == MYSQL_TYPE_VARCHAR ||
40864086
field->type == MYSQL_TYPE_BLOB ||
4087+
field->type == MYSQL_TYPE_VECTOR ||
40874088
field->type == MYSQL_TYPE_LONG_BLOB ||
40884089
field->type == MYSQL_TYPE_MEDIUM_BLOB ||
40894090
field->type == MYSQL_TYPE_TINY_BLOB ||

client/mysqltest.cc

+28
Original file line numberDiff line numberDiff line change
@@ -8287,6 +8287,30 @@ static void append_field(DYNAMIC_STRING *ds, uint col_idx, MYSQL_FIELD *field,
82878287
}
82888288
#endif
82898289

8290+
const size_t temp_val_max_width = (1 << 14);
8291+
char temp_val[temp_val_max_width];
8292+
DYNAMIC_STRING ds_temp = {.str = nullptr, .length = 0, .max_length = 0};
8293+
if (field->type == MYSQL_TYPE_VECTOR && !is_null) {
8294+
/* Do a binary to hex conversion for vector type */
8295+
size_t orig_len = len;
8296+
len = 2 + orig_len * 2;
8297+
char *destination = temp_val;
8298+
if (len > temp_val_max_width) {
8299+
init_dynamic_string(&ds_temp, "", len + 1);
8300+
destination = ds_temp.str;
8301+
}
8302+
const char *ptr = val;
8303+
const char *end = ptr + orig_len;
8304+
val = destination;
8305+
int written = sprintf(destination, "0x");
8306+
destination += written;
8307+
for (; ptr < end; ptr++, destination += written) {
8308+
written = sprintf(
8309+
destination, "%02X",
8310+
*(static_cast<const uchar *>(static_cast<const void *>(ptr))));
8311+
}
8312+
}
8313+
82908314
if (!display_result_vertically) {
82918315
if (col_idx) dynstr_append_mem(ds, "\t", 1);
82928316
replace_dynstr_append_mem(ds, val, len);
@@ -8296,6 +8320,10 @@ static void append_field(DYNAMIC_STRING *ds, uint col_idx, MYSQL_FIELD *field,
82968320
replace_dynstr_append_mem(ds, val, len);
82978321
dynstr_append_mem(ds, "\n", 1);
82988322
}
8323+
8324+
if (ds_temp.str != nullptr) {
8325+
dynstr_free(&ds_temp);
8326+
}
82998327
}
83008328

83018329
/*

cmake/mysql_version.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#
2727

2828
SET(SHARED_LIB_MAJOR_VERSION "24")
29-
SET(SHARED_LIB_MINOR_VERSION "0")
29+
SET(SHARED_LIB_MINOR_VERSION "1")
3030
SET(PROTOCOL_VERSION "10")
3131

3232
# Generate "something" to trigger cmake rerun when MYSQL_VERSION changes

include/field_types.h

+1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ enum enum_field_types {
7474
MYSQL_TYPE_DATETIME2, /**< Internal to MySQL. Not used in protocol */
7575
MYSQL_TYPE_TIME2, /**< Internal to MySQL. Not used in protocol */
7676
MYSQL_TYPE_TYPED_ARRAY, /**< Used for replication only */
77+
MYSQL_TYPE_VECTOR = 242,
7778
MYSQL_TYPE_INVALID = 243,
7879
MYSQL_TYPE_BOOL = 244, /**< Currently just a placeholder */
7980
MYSQL_TYPE_JSON = 245,

include/mysql.h.pp

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
MYSQL_TYPE_DATETIME2,
2424
MYSQL_TYPE_TIME2,
2525
MYSQL_TYPE_TYPED_ARRAY,
26+
MYSQL_TYPE_VECTOR = 242,
2627
MYSQL_TYPE_INVALID = 243,
2728
MYSQL_TYPE_BOOL = 244,
2829
MYSQL_TYPE_JSON = 245,

include/mysql/components/services/bits/stored_program_bits.h

+1
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,6 @@
5959
#define MYSQL_SP_ARG_TYPE_VAR_STRING (1ULL << 31)
6060
#define MYSQL_SP_ARG_TYPE_STRING (1ULL << 32)
6161
#define MYSQL_SP_ARG_TYPE_GEOMETRY (1ULL << 33)
62+
#define MYSQL_SP_ARG_TYPE_VECTOR (1ULL << 34)
6263

6364
#endif

libmysql/libmysql.cc

+7-4
Original file line numberDiff line numberDiff line change
@@ -2751,6 +2751,7 @@ static void fetch_string_with_conversion(MYSQL_BIND *param, char *value,
27512751
case MYSQL_TYPE_MEDIUM_BLOB:
27522752
case MYSQL_TYPE_LONG_BLOB:
27532753
case MYSQL_TYPE_BLOB:
2754+
case MYSQL_TYPE_VECTOR:
27542755
case MYSQL_TYPE_DECIMAL:
27552756
case MYSQL_TYPE_NEWDECIMAL:
27562757
default: {
@@ -3360,10 +3361,10 @@ static bool is_binary_compatible(enum enum_field_types type1,
33603361
range2[] = {MYSQL_TYPE_INT24, MYSQL_TYPE_LONG, MYSQL_TYPE_NULL},
33613362
range3[] = {MYSQL_TYPE_DATETIME, MYSQL_TYPE_TIMESTAMP, MYSQL_TYPE_NULL},
33623363
range4[] = {
3363-
MYSQL_TYPE_ENUM, MYSQL_TYPE_SET, MYSQL_TYPE_TINY_BLOB,
3364-
MYSQL_TYPE_MEDIUM_BLOB, MYSQL_TYPE_LONG_BLOB, MYSQL_TYPE_BLOB,
3365-
MYSQL_TYPE_VAR_STRING, MYSQL_TYPE_STRING, MYSQL_TYPE_GEOMETRY,
3366-
MYSQL_TYPE_DECIMAL, MYSQL_TYPE_NULL};
3364+
MYSQL_TYPE_ENUM, MYSQL_TYPE_SET, MYSQL_TYPE_TINY_BLOB,
3365+
MYSQL_TYPE_MEDIUM_BLOB, MYSQL_TYPE_LONG_BLOB, MYSQL_TYPE_BLOB,
3366+
MYSQL_TYPE_VECTOR, MYSQL_TYPE_VAR_STRING, MYSQL_TYPE_STRING,
3367+
MYSQL_TYPE_GEOMETRY, MYSQL_TYPE_DECIMAL, MYSQL_TYPE_NULL};
33673368
static const enum enum_field_types *range_list[] = {range1, range2, range3,
33683369
range4},
33693370
**range_list_end =
@@ -3464,6 +3465,7 @@ static bool setup_one_fetch_function(MYSQL_BIND *param, MYSQL_FIELD *field) {
34643465
case MYSQL_TYPE_MEDIUM_BLOB:
34653466
case MYSQL_TYPE_LONG_BLOB:
34663467
case MYSQL_TYPE_BLOB:
3468+
case MYSQL_TYPE_VECTOR:
34673469
case MYSQL_TYPE_BIT:
34683470
assert(param->buffer_length != 0);
34693471
param->fetch_result = fetch_result_bin;
@@ -3543,6 +3545,7 @@ static bool setup_one_fetch_function(MYSQL_BIND *param, MYSQL_FIELD *field) {
35433545
case MYSQL_TYPE_MEDIUM_BLOB:
35443546
case MYSQL_TYPE_LONG_BLOB:
35453547
case MYSQL_TYPE_BLOB:
3548+
case MYSQL_TYPE_VECTOR:
35463549
case MYSQL_TYPE_VAR_STRING:
35473550
case MYSQL_TYPE_STRING:
35483551
case MYSQL_TYPE_BIT:

libs/mysql/binlog/event/binary_log_funcs.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ unsigned int max_display_length_for_field(enum_field_types sql_type,
189189
*/
190190
return uint_max(metadata * 8);
191191

192+
case MYSQL_TYPE_VECTOR:
192193
case MYSQL_TYPE_LONG_BLOB:
193194
case MYSQL_TYPE_GEOMETRY:
194195
case MYSQL_TYPE_JSON:
@@ -347,6 +348,7 @@ uint32_t calc_field_size(unsigned char col, const unsigned char *master_data,
347348
case MYSQL_TYPE_MEDIUM_BLOB:
348349
case MYSQL_TYPE_LONG_BLOB:
349350
case MYSQL_TYPE_BLOB:
351+
case MYSQL_TYPE_VECTOR:
350352
case MYSQL_TYPE_GEOMETRY:
351353
case MYSQL_TYPE_JSON: {
352354
/*

libs/mysql/binlog/event/rows_event.cpp

+22
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,25 @@ static void parse_geometry_type(std::vector<unsigned int> &vec,
253253
}
254254
}
255255

256+
/**
257+
Parses VECTOR_DIMENSIONALITY field.
258+
259+
@param[out] vec stores vector columns's dimensionality extracted from
260+
field.
261+
@param[in] reader_obj the Event_reader object containing the serialized
262+
field.
263+
@param[in] length length of the field
264+
*/
265+
static void parse_vector_dimensionality(std::vector<unsigned int> &vec,
266+
Event_reader &reader_obj,
267+
unsigned int length) {
268+
const char *field = reader_obj.ptr();
269+
while (reader_obj.ptr() < field + length) {
270+
vec.push_back(reader_obj.net_field_length_ll());
271+
if (reader_obj.has_error()) return;
272+
}
273+
}
274+
256275
/**
257276
Parses SIMPLE_PRIMARY_KEY field.
258277
@@ -373,6 +392,9 @@ Table_map_event::Optional_metadata_fields::Optional_metadata_fields(
373392
case COLUMN_VISIBILITY:
374393
parse_column_visibility(&m_column_visibility, reader_obj, len);
375394
break;
395+
case VECTOR_DIMENSIONALITY:
396+
parse_vector_dimensionality(m_vector_dimensionality, reader_obj, len);
397+
break;
376398
default:
377399
BAPI_ASSERT(0);
378400
}

libs/mysql/binlog/event/rows_event.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -567,8 +567,9 @@ class Table_map_event : public Binary_log_event {
567567
columns, optimized to minimize
568568
space when many columns have the
569569
same charset. */
570-
COLUMN_VISIBILITY /* Flag to indicate column visibility
570+
COLUMN_VISIBILITY, /* Flag to indicate column visibility
571571
attribute. */
572+
VECTOR_DIMENSIONALITY /* Vector column dimensionality */
572573
};
573574

574575
/**
@@ -605,6 +606,7 @@ class Table_map_event : public Binary_log_event {
605606
std::vector<str_vector> m_enum_str_value;
606607
std::vector<str_vector> m_set_str_value;
607608
std::vector<unsigned int> m_geometry_type;
609+
std::vector<unsigned int> m_vector_dimensionality;
608610
/*
609611
The uint_pair means <column index, prefix length>. Prefix length is 0 if
610612
whole column value is used.

mysql-test/r/archive.result

+9
Original file line numberDiff line numberDiff line change
@@ -12975,5 +12975,14 @@ id x
1297512975
5 6
1297612976
DROP VIEW v;
1297712977
DROP TABLE archive_table, innodb_table;
12978+
CREATE TABLE ta (pk INT, embedding VECTOR(4)) ENGINE=ARCHIVE;
12979+
INSERT INTO ta VALUES
12980+
(0, TO_VECTOR("[1,2,3,4]")),
12981+
(1, TO_VECTOR("[4,5,6,7]"));
12982+
SELECT FROM_VECTOR(embedding) FROM ta;
12983+
FROM_VECTOR(embedding)
12984+
[1.00000e+00,2.00000e+00,3.00000e+00,4.00000e+00]
12985+
[4.00000e+00,5.00000e+00,6.00000e+00,7.00000e+00]
12986+
DROP TABLE ta;
1297812987
Warnings:
1297912988
Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.

mysql-test/r/blackhole.result

+7
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,10 @@ score
2828
SELECT 1 FROM t WHERE MATCH (a) AGAINST ('abc');
2929
1
3030
DROP TABLE t;
31+
CREATE TABLE ta (pk INT, embedding VECTOR(4), PRIMARY KEY (pk)) ENGINE=BLACKHOLE;
32+
INSERT INTO ta VALUES
33+
(0, TO_VECTOR("[1,2,3,4]")),
34+
(1, TO_VECTOR("[4,5,6,7]"));
35+
SELECT FROM_VECTOR(embedding) FROM ta;
36+
FROM_VECTOR(embedding)
37+
DROP TABLE ta;

mysql-test/r/csv.result

+9
Original file line numberDiff line numberDiff line change
@@ -5496,3 +5496,12 @@ SELECT * FROM t;
54965496
j
54975497
{"a": 1, "b": 2}
54985498
DROP TABLE t;
5499+
CREATE TABLE ta (pk INT NOT NULL, embedding VECTOR(4) NOT NULL) ENGINE=csv;
5500+
INSERT INTO ta VALUES
5501+
(0, TO_VECTOR("[1,2,3,4]")),
5502+
(1, TO_VECTOR("[4,5,6,7]"));
5503+
SELECT FROM_VECTOR(embedding) FROM ta;
5504+
FROM_VECTOR(embedding)
5505+
[1.00000e+00,2.00000e+00,3.00000e+00,4.00000e+00]
5506+
[4.00000e+00,5.00000e+00,6.00000e+00,7.00000e+00]
5507+
DROP TABLE ta;

mysql-test/r/dd_schema_dd_properties_debug.result

+3-3
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ check_constraints=
603603
'MYSQL_TYPE_MEDIUM_BLOB', 'MYSQL_TYPE_LONG_BLOB',
604604
'MYSQL_TYPE_BLOB', 'MYSQL_TYPE_VAR_STRING',
605605
'MYSQL_TYPE_STRING', 'MYSQL_TYPE_GEOMETRY',
606-
'MYSQL_TYPE_JSON'
606+
'MYSQL_TYPE_JSON', 'MYSQL_TYPE_VECTOR'
607607
) NOT NULL
608608
lbl=FIELD_TYPE
609609
pos=4
@@ -1835,7 +1835,7 @@ parameters=
18351835
'MYSQL_TYPE_MEDIUM_BLOB', 'MYSQL_TYPE_LONG_BLOB', 'MYSQL_TYPE_BLOB',
18361836
'MYSQL_TYPE_VAR_STRING',
18371837
'MYSQL_TYPE_STRING', 'MYSQL_TYPE_GEOMETRY',
1838-
'MYSQL_TYPE_JSON'
1838+
'MYSQL_TYPE_JSON', 'MYSQL_TYPE_VECTOR'
18391839
) NOT NULL
18401840
lbl=FIELD_DATA_TYPE
18411841
pos=5
@@ -2065,7 +2065,7 @@ routines=
20652065
'MYSQL_TYPE_MEDIUM_BLOB', 'MYSQL_TYPE_LONG_BLOB', 'MYSQL_TYPE_BLOB',
20662066
'MYSQL_TYPE_VAR_STRING',
20672067
'MYSQL_TYPE_STRING', 'MYSQL_TYPE_GEOMETRY',
2068-
'MYSQL_TYPE_JSON'
2068+
'MYSQL_TYPE_JSON', 'MYSQL_TYPE_VECTOR'
20692069
) DEFAULT NULL
20702070
lbl=FIELD_RESULT_DATA_TYPE
20712071
pos=4

mysql-test/r/dd_schema_definition_debug.result

+5-5
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ SET debug = '+d,skip_dd_table_access_check';
165165
########################################################################
166166
# The actual DD version stored on disk.
167167
########################################################################
168-
DD_VERSION=80300
168+
DD_VERSION=90000
169169
########################################################################
170170
# List the CREATE TABLE statements for the DD tables.
171171
# Mask the AUTO INCREMENT counter, which is not
@@ -232,7 +232,7 @@ columns CREATE TABLE `columns` (
232232
`table_id` bigint unsigned NOT NULL,
233233
`name` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_tolower_ci NOT NULL,
234234
`ordinal_position` int unsigned NOT NULL,
235-
`type` enum('MYSQL_TYPE_DECIMAL','MYSQL_TYPE_TINY','MYSQL_TYPE_SHORT','MYSQL_TYPE_LONG','MYSQL_TYPE_FLOAT','MYSQL_TYPE_DOUBLE','MYSQL_TYPE_NULL','MYSQL_TYPE_TIMESTAMP','MYSQL_TYPE_LONGLONG','MYSQL_TYPE_INT24','MYSQL_TYPE_DATE','MYSQL_TYPE_TIME','MYSQL_TYPE_DATETIME','MYSQL_TYPE_YEAR','MYSQL_TYPE_NEWDATE','MYSQL_TYPE_VARCHAR','MYSQL_TYPE_BIT','MYSQL_TYPE_TIMESTAMP2','MYSQL_TYPE_DATETIME2','MYSQL_TYPE_TIME2','MYSQL_TYPE_NEWDECIMAL','MYSQL_TYPE_ENUM','MYSQL_TYPE_SET','MYSQL_TYPE_TINY_BLOB','MYSQL_TYPE_MEDIUM_BLOB','MYSQL_TYPE_LONG_BLOB','MYSQL_TYPE_BLOB','MYSQL_TYPE_VAR_STRING','MYSQL_TYPE_STRING','MYSQL_TYPE_GEOMETRY','MYSQL_TYPE_JSON') COLLATE utf8mb3_bin NOT NULL,
235+
`type` enum('MYSQL_TYPE_DECIMAL','MYSQL_TYPE_TINY','MYSQL_TYPE_SHORT','MYSQL_TYPE_LONG','MYSQL_TYPE_FLOAT','MYSQL_TYPE_DOUBLE','MYSQL_TYPE_NULL','MYSQL_TYPE_TIMESTAMP','MYSQL_TYPE_LONGLONG','MYSQL_TYPE_INT24','MYSQL_TYPE_DATE','MYSQL_TYPE_TIME','MYSQL_TYPE_DATETIME','MYSQL_TYPE_YEAR','MYSQL_TYPE_NEWDATE','MYSQL_TYPE_VARCHAR','MYSQL_TYPE_BIT','MYSQL_TYPE_TIMESTAMP2','MYSQL_TYPE_DATETIME2','MYSQL_TYPE_TIME2','MYSQL_TYPE_NEWDECIMAL','MYSQL_TYPE_ENUM','MYSQL_TYPE_SET','MYSQL_TYPE_TINY_BLOB','MYSQL_TYPE_MEDIUM_BLOB','MYSQL_TYPE_LONG_BLOB','MYSQL_TYPE_BLOB','MYSQL_TYPE_VAR_STRING','MYSQL_TYPE_STRING','MYSQL_TYPE_GEOMETRY','MYSQL_TYPE_JSON','MYSQL_TYPE_VECTOR') COLLATE utf8mb3_bin NOT NULL,
236236
`is_nullable` tinyint(1) NOT NULL,
237237
`is_zerofill` tinyint(1) DEFAULT NULL,
238238
`is_unsigned` tinyint(1) DEFAULT NULL,
@@ -449,7 +449,7 @@ parameters CREATE TABLE `parameters` (
449449
`ordinal_position` int unsigned NOT NULL,
450450
`mode` enum('IN','OUT','INOUT') COLLATE utf8mb3_bin DEFAULT NULL,
451451
`name` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
452-
`data_type` enum('MYSQL_TYPE_DECIMAL','MYSQL_TYPE_TINY','MYSQL_TYPE_SHORT','MYSQL_TYPE_LONG','MYSQL_TYPE_FLOAT','MYSQL_TYPE_DOUBLE','MYSQL_TYPE_NULL','MYSQL_TYPE_TIMESTAMP','MYSQL_TYPE_LONGLONG','MYSQL_TYPE_INT24','MYSQL_TYPE_DATE','MYSQL_TYPE_TIME','MYSQL_TYPE_DATETIME','MYSQL_TYPE_YEAR','MYSQL_TYPE_NEWDATE','MYSQL_TYPE_VARCHAR','MYSQL_TYPE_BIT','MYSQL_TYPE_TIMESTAMP2','MYSQL_TYPE_DATETIME2','MYSQL_TYPE_TIME2','MYSQL_TYPE_NEWDECIMAL','MYSQL_TYPE_ENUM','MYSQL_TYPE_SET','MYSQL_TYPE_TINY_BLOB','MYSQL_TYPE_MEDIUM_BLOB','MYSQL_TYPE_LONG_BLOB','MYSQL_TYPE_BLOB','MYSQL_TYPE_VAR_STRING','MYSQL_TYPE_STRING','MYSQL_TYPE_GEOMETRY','MYSQL_TYPE_JSON') COLLATE utf8mb3_bin NOT NULL,
452+
`data_type` enum('MYSQL_TYPE_DECIMAL','MYSQL_TYPE_TINY','MYSQL_TYPE_SHORT','MYSQL_TYPE_LONG','MYSQL_TYPE_FLOAT','MYSQL_TYPE_DOUBLE','MYSQL_TYPE_NULL','MYSQL_TYPE_TIMESTAMP','MYSQL_TYPE_LONGLONG','MYSQL_TYPE_INT24','MYSQL_TYPE_DATE','MYSQL_TYPE_TIME','MYSQL_TYPE_DATETIME','MYSQL_TYPE_YEAR','MYSQL_TYPE_NEWDATE','MYSQL_TYPE_VARCHAR','MYSQL_TYPE_BIT','MYSQL_TYPE_TIMESTAMP2','MYSQL_TYPE_DATETIME2','MYSQL_TYPE_TIME2','MYSQL_TYPE_NEWDECIMAL','MYSQL_TYPE_ENUM','MYSQL_TYPE_SET','MYSQL_TYPE_TINY_BLOB','MYSQL_TYPE_MEDIUM_BLOB','MYSQL_TYPE_LONG_BLOB','MYSQL_TYPE_BLOB','MYSQL_TYPE_VAR_STRING','MYSQL_TYPE_STRING','MYSQL_TYPE_GEOMETRY','MYSQL_TYPE_JSON','MYSQL_TYPE_VECTOR') COLLATE utf8mb3_bin NOT NULL,
453453
`data_type_utf8` mediumtext COLLATE utf8mb3_bin NOT NULL,
454454
`is_zerofill` tinyint(1) DEFAULT NULL,
455455
`is_unsigned` tinyint(1) DEFAULT NULL,
@@ -481,7 +481,7 @@ routines CREATE TABLE `routines` (
481481
`schema_id` bigint unsigned NOT NULL,
482482
`name` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
483483
`type` enum('FUNCTION','PROCEDURE') COLLATE utf8mb3_bin NOT NULL,
484-
`result_data_type` enum('MYSQL_TYPE_DECIMAL','MYSQL_TYPE_TINY','MYSQL_TYPE_SHORT','MYSQL_TYPE_LONG','MYSQL_TYPE_FLOAT','MYSQL_TYPE_DOUBLE','MYSQL_TYPE_NULL','MYSQL_TYPE_TIMESTAMP','MYSQL_TYPE_LONGLONG','MYSQL_TYPE_INT24','MYSQL_TYPE_DATE','MYSQL_TYPE_TIME','MYSQL_TYPE_DATETIME','MYSQL_TYPE_YEAR','MYSQL_TYPE_NEWDATE','MYSQL_TYPE_VARCHAR','MYSQL_TYPE_BIT','MYSQL_TYPE_TIMESTAMP2','MYSQL_TYPE_DATETIME2','MYSQL_TYPE_TIME2','MYSQL_TYPE_NEWDECIMAL','MYSQL_TYPE_ENUM','MYSQL_TYPE_SET','MYSQL_TYPE_TINY_BLOB','MYSQL_TYPE_MEDIUM_BLOB','MYSQL_TYPE_LONG_BLOB','MYSQL_TYPE_BLOB','MYSQL_TYPE_VAR_STRING','MYSQL_TYPE_STRING','MYSQL_TYPE_GEOMETRY','MYSQL_TYPE_JSON') COLLATE utf8mb3_bin DEFAULT NULL,
484+
`result_data_type` enum('MYSQL_TYPE_DECIMAL','MYSQL_TYPE_TINY','MYSQL_TYPE_SHORT','MYSQL_TYPE_LONG','MYSQL_TYPE_FLOAT','MYSQL_TYPE_DOUBLE','MYSQL_TYPE_NULL','MYSQL_TYPE_TIMESTAMP','MYSQL_TYPE_LONGLONG','MYSQL_TYPE_INT24','MYSQL_TYPE_DATE','MYSQL_TYPE_TIME','MYSQL_TYPE_DATETIME','MYSQL_TYPE_YEAR','MYSQL_TYPE_NEWDATE','MYSQL_TYPE_VARCHAR','MYSQL_TYPE_BIT','MYSQL_TYPE_TIMESTAMP2','MYSQL_TYPE_DATETIME2','MYSQL_TYPE_TIME2','MYSQL_TYPE_NEWDECIMAL','MYSQL_TYPE_ENUM','MYSQL_TYPE_SET','MYSQL_TYPE_TINY_BLOB','MYSQL_TYPE_MEDIUM_BLOB','MYSQL_TYPE_LONG_BLOB','MYSQL_TYPE_BLOB','MYSQL_TYPE_VAR_STRING','MYSQL_TYPE_STRING','MYSQL_TYPE_GEOMETRY','MYSQL_TYPE_JSON','MYSQL_TYPE_VECTOR') COLLATE utf8mb3_bin DEFAULT NULL,
485485
`result_data_type_utf8` mediumtext COLLATE utf8mb3_bin NOT NULL,
486486
`result_is_zerofill` tinyint(1) DEFAULT NULL,
487487
`result_is_unsigned` tinyint(1) DEFAULT NULL,
@@ -734,5 +734,5 @@ Warnings:
734734
Warning 1681 Integer display width is deprecated and will be removed in a future release.
735735
include/assert.inc [The group concat max length is sufficient.]
736736
CHECK_STATUS
737-
The schema checksum corresponds to DD version 80200.
737+
The schema checksum corresponds to DD version 90000.
738738
include/assert.inc [The schema checksum corresponds to a known DD version.]

mysql-test/r/information_schema_keywords.result

+1
Original file line numberDiff line numberDiff line change
@@ -712,6 +712,7 @@ VARCHARACTER 1
712712
VARIABLES 0
713713
VARYING 1
714714
VCPU 0
715+
VECTOR 0
715716
VIEW 0
716717
VIRTUAL 1
717718
VISIBLE 0

0 commit comments

Comments
 (0)