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

Fix sporadic test failure of main.debug_sync

The test case was not waiting for a prior --send to have proceeded far
enough before attempting to KILL it. This meant the KILL could get lost if
timing delayed the connection in --send.

Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
This commit is contained in:
Kristian Nielsen
2025-08-29 09:56:26 +02:00
parent 00d3dc97f8
commit da5cffeab3
2 changed files with 8 additions and 7 deletions

View File

@@ -325,13 +325,15 @@ SET DEBUG_SYNC= 'RESET';
#
create table t (c int) engine=innodb;
connect con1,localhost,root;
set debug_sync='get_schema_column WAIT_FOR go';
set debug_sync='get_schema_column SIGNAL waiting WAIT_FOR go';
select column_name from information_schema.columns
where table_schema='test' and table_name='t';
connection default;
set debug_sync= 'now WAIT_FOR waiting';
lock table t write;
alter table t discard tablespace;
connect con2,localhost,root;
kill query $connid;
disconnect con2;
connection default;
ERROR 70100: Query execution was interrupted

View File

@@ -454,21 +454,20 @@ SET DEBUG_SYNC= 'RESET';
--echo #
create table t (c int) engine=innodb;
--connect con1,localhost,root
set debug_sync='get_schema_column WAIT_FOR go';
set debug_sync='get_schema_column SIGNAL waiting WAIT_FOR go';
send select column_name from information_schema.columns
where table_schema='test' and table_name='t';
--connection default
let $wait_condition=select 1 from information_schema.processlist where state like 'debug sync point%';
--source include/wait_condition.inc
set debug_sync= 'now WAIT_FOR waiting';
let $connid=`select connection_id()`;
lock table t write;
send alter table t discard tablespace;
--connect con2,localhost,root
--disable_query_log
--eval kill query $connid
--enable_query_log
--let $wait_condition= SELECT COUNT(*)=1 FROM information_schema.processlist WHERE id=$connid AND state='Waiting for table metadata lock' AND INFO='alter table t discard tablespace'
--source include/wait_condition.inc
--evalp kill query $connid
--disconnect con2
--connection default