1
0
mirror of https://github.com/MariaDB/server.git synced 2026-10-23 18:49:29 +03:00

MDEV-40380 vcol.races sporadic timeout

After MDEV-39261 purge opens TABLE via open_purge_table() for any
undo record of a table with indexed virtual columns, including the
insert undo record. If purge does that after FLUSH TABLES, the TABLE
is put back into the table cache. Then DELETE from con1 reuses the
cached TABLE, skips open_table_from_share() and never hits the
TABLE_after_field_clone sync point. DELETE completes immediately,
wait_condition times out and SELECT returns an empty set.

The fix waits for purge to complete before FLUSH TABLES.
This commit is contained in:
Aleksey Midenkov
2026-10-12 16:21:04 +03:00
parent d5815e3843
commit e63f94313a

View File

@@ -5,6 +5,10 @@ source include/have_innodb.inc;
source include/have_debug_sync.inc;
create table t1 (f text, vf tinytext as (f), key (vf(64))) engine=innodb;
insert t1 (f) values ('foo');
# Purge may open t1 into the table cache after FLUSH TABLES
--disable_query_log
set global innodb_max_purge_lag_wait= 0;
--enable_query_log
flush tables;
connect con1,localhost,root,,test;
set debug_sync='TABLE_after_field_clone WAIT_FOR go';