1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-09 11:41:36 +03:00

MDEV-37906 Server crash or UBSAN errors in Item_func_nextval::update_table upon INSERT DELAYED

sequences, just as triggers or check constraints, disable DELAYED
This commit is contained in:
Sergei Golubchik
2025-10-22 21:40:55 +02:00
parent 68432a0bc3
commit 2bf1d089cf
3 changed files with 21 additions and 5 deletions

View File

@@ -385,6 +385,13 @@ disconnect con1;
connection default;
drop sequence s1;
drop sequence s2;
#
# End of 10.4 tests
#
# MDEV-37906 Server crash or UBSAN errors in Item_func_nextval::update_table upon INSERT DELAYED
#
create sequence s engine=myisam;
create table t (id bigint default(nextval(s))) engine=myisam;
insert delayed into t () values();
drop table t;
drop sequence s;
# End of 10.11 tests

View File

@@ -417,6 +417,15 @@ insert into s1 values (1, 1, 10000, 100, 1, 1000, 0, 0);
drop sequence s1;
drop sequence s2;
--echo #
--echo # End of 10.4 tests
--echo #
--echo # MDEV-37906 Server crash or UBSAN errors in Item_func_nextval::update_table upon INSERT DELAYED
--echo #
create sequence s engine=myisam;
create table t (id bigint default(nextval(s))) engine=myisam;
insert delayed into t () values();
drop table t;
drop sequence s;
--echo # End of 10.11 tests

View File

@@ -3406,11 +3406,11 @@ bool Delayed_insert::open_and_lock_table()
return TRUE;
}
if (table->triggers || table->check_constraints)
if (table->triggers || table->check_constraints || table->internal_tables)
{
/*
Table has triggers or check constraints. This is not an error, but we do
not support these with delayed insert. Terminate the delayed
Table uses triggers, check constraints or sequences. This is not an error,
but we do not support these with delayed insert. Terminate the delayed
thread without an error and thus request lock upgrade.
*/
return TRUE;