MDEV-35060 Assertion failure upon DML on table with vector under lock

This commit is contained in:
Sergei Golubchik 2024-10-02 17:34:51 +02:00
parent 09889d417b
commit 09cd817f5d
3 changed files with 17 additions and 2 deletions

View File

@ -163,3 +163,11 @@ disconnect con1;
connection default;
commit;
drop table t;
#
# MDEV-35060 Assertion failure upon DML on table with vector under lock
#
create table t (a int, v blob not null, vector(v)) engine=innodb;
insert into t values (1,x'00000000'),(2,x'00000000');
lock table t write;
delete from t;
drop table t;

View File

@ -150,3 +150,12 @@ disconnect con1;
connection default;
commit;
drop table t;
--echo #
--echo # MDEV-35060 Assertion failure upon DML on table with vector under lock
--echo #
create table t (a int, v blob not null, vector(v)) engine=innodb;
insert into t values (1,x'00000000'),(2,x'00000000');
lock table t write;
delete from t;
drop table t;

View File

@ -616,8 +616,6 @@ MHNSW_Trx *MHNSW_Trx::get_from_thd(TABLE *table, bool for_update)
if (!for_update && !trx)
return NULL;
DBUG_ASSERT(!table->mdl_ticket ||
table->mdl_ticket->m_duration == MDL_TRANSACTION);
while (trx && trx->table_id != table->mdl_ticket) trx= trx->next;
if (!trx)
{