1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

MDEV-32803 Assertion `total == 0' failed in Event_log::write_cache_raw

A second DML in a transaction for a table of non-rollbackable engine
leads to a cache corruption, because the cache wasn't reset after a
statement end, but also wasn't destroyed.

This patch resets the cache for a reuse by subsequent statements in
current transaction.
This commit is contained in:
Nikita Malyavin
2023-11-17 23:40:10 +01:00
parent 985e3dfc05
commit c2e16b3ad5
3 changed files with 50 additions and 0 deletions

View File

@ -2041,6 +2041,31 @@ select * from t;
drop table t;
--echo #
--echo # MDEV-32803 Assertion `total == 0' failed in Event_log::write_cache_raw
--echo #
create or replace table t1 (a int) engine=aria;
insert t1 values (5);
set debug_sync= 'alter_table_copy_end SIGNAL ended WAIT_FOR end';
send alter table t1 add b int NULL, algorithm= copy, lock= none;
--connection con2
set debug_sync= 'now WAIT_FOR ended';
begin;
insert into t1 values (123);
insert into t1 values (456), (789);
commit;
set debug_sync= 'now SIGNAL end';
--connection default
--reap
select * from t1;
drop table t1;
eval set global default_storage_engine= $default_storage_engine;
--disconnect con1