mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-35044 ALTER on a table with vector index attempts to bypass unsupported locking limitation, server crashes in THD::free_tmp_table_share
open secondary tables early enough for the cleanup on error to see them and remove their underlying files
This commit is contained in:
7
mysql-test/main/vector2_notembedded.result
Normal file
7
mysql-test/main/vector2_notembedded.result
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
#
|
||||||
|
# MDEV-35044 ALTER on a table with vector index attempts to bypass unsupported locking limitation, server crashes in THD::free_tmp_table_share
|
||||||
|
#
|
||||||
|
create table t (a int primary key, v blob not null, vector index(v));
|
||||||
|
alter table t modify a int auto_increment, lock=none;
|
||||||
|
ERROR 0A000: LOCK=NONE is not supported. Reason: CHANGE COLUMN ... AUTO_INCREMENT. Try LOCK=SHARED
|
||||||
|
drop table t;
|
9
mysql-test/main/vector2_notembedded.test
Normal file
9
mysql-test/main/vector2_notembedded.test
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
--source include/not_embedded.inc
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-35044 ALTER on a table with vector index attempts to bypass unsupported locking limitation, server crashes in THD::free_tmp_table_share
|
||||||
|
--echo #
|
||||||
|
create table t (a int primary key, v blob not null, vector index(v));
|
||||||
|
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
|
||||||
|
alter table t modify a int auto_increment, lock=none;
|
||||||
|
drop table t;
|
@@ -11575,7 +11575,7 @@ alter_copy:
|
|||||||
new_table= thd->create_and_open_tmp_table(&frm, alter_ctx.get_tmp_path(),
|
new_table= thd->create_and_open_tmp_table(&frm, alter_ctx.get_tmp_path(),
|
||||||
alter_ctx.new_db,
|
alter_ctx.new_db,
|
||||||
alter_ctx.new_name, true);
|
alter_ctx.new_name, true);
|
||||||
if (!new_table)
|
if (!new_table || new_table->open_hlindexes_for_write())
|
||||||
goto err_new_table_cleanup;
|
goto err_new_table_cleanup;
|
||||||
|
|
||||||
if (table->s->tmp_table != NO_TMP_TABLE)
|
if (table->s->tmp_table != NO_TMP_TABLE)
|
||||||
|
Reference in New Issue
Block a user