diff --git a/mysql-test/main/vector_innodb.result b/mysql-test/main/vector_innodb.result index 27a972b3638..f14840f5f5c 100644 --- a/mysql-test/main/vector_innodb.result +++ b/mysql-test/main/vector_innodb.result @@ -181,3 +181,8 @@ create table t (v vector(1), key(v)) engine=innodb; select v from t where v = vec_fromtext('[1]'); v drop table t; +# +# MDEV-35130 Assertion fails in trx_t::check_bulk_buffer upon CREATE.. SELECT with vector key +# +CREATE TABLE t (pk INT PRIMARY KEY, v VECTOR(5) NOT NULL, VECTOR(v)) ENGINE=InnoDB SELECT 1 AS pk, x'f09baa3ea172763f123def3e0c7fe53e288bf33e' AS v; +DROP TABLE t; diff --git a/mysql-test/main/vector_innodb.test b/mysql-test/main/vector_innodb.test index 5bcd828116a..e93ed30eb34 100644 --- a/mysql-test/main/vector_innodb.test +++ b/mysql-test/main/vector_innodb.test @@ -176,3 +176,9 @@ drop table t; create table t (v vector(1), key(v)) engine=innodb; select v from t where v = vec_fromtext('[1]'); drop table t; + +--echo # +--echo # MDEV-35130 Assertion fails in trx_t::check_bulk_buffer upon CREATE.. SELECT with vector key +--echo # +CREATE TABLE t (pk INT PRIMARY KEY, v VECTOR(5) NOT NULL, VECTOR(v)) ENGINE=InnoDB SELECT 1 AS pk, x'f09baa3ea172763f123def3e0c7fe53e288bf33e' AS v; +DROP TABLE t; diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 9d2da78218c..4ed482dd92d 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -4998,7 +4998,7 @@ select_create::prepare(List &_values, SELECT_LEX_UNIT *u) if (info.handle_duplicates == DUP_UPDATE) table->file->extra(HA_EXTRA_INSERT_WITH_UPDATE); if (thd->locked_tables_mode <= LTM_LOCK_TABLES && - !table->s->long_unique_table) + !table->s->long_unique_table && !table->s->hlindexes()) { table->file->ha_start_bulk_insert((ha_rows) 0); if (thd->lex->duplicates == DUP_ERROR && !thd->lex->ignore)