Commit eb95ebf9 authored by unknown's avatar unknown

Fix race in test case.

parent 58a77aaf
......@@ -5,7 +5,10 @@ a VARCHAR(100),
INDEX(a)
) ENGINE=MyISAM;
ALTER TABLE t1 DISABLE KEYS;
SET debug_sync= 'myisam_after_repair_by_sort SIGNAL waiting WAIT_FOR go';
ALTER TABLE t1 ENABLE KEYS;
SET debug_sync= 'now WAIT_FOR waiting';
SET debug_sync= 'now SIGNAL go';
SHOW TABLE STATUS LIKE 't1';
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 MyISAM 10 Dynamic 100000 27 # # # 0 NULL # # # latin1_swedish_ci NULL
......
......@@ -29,7 +29,8 @@ while ($1)
--enable_query_log
--connect(con1,localhost,root,,)
--send
SET debug_sync= 'myisam_after_repair_by_sort SIGNAL waiting WAIT_FOR go';
send
ALTER TABLE t1 ENABLE KEYS;
--connection default
......@@ -38,6 +39,8 @@ while ($1)
--let $field= State
--let $condition= = 'Repair by sorting'
--source include/wait_show_condition.inc
SET debug_sync= 'now WAIT_FOR waiting';
SET debug_sync= 'now SIGNAL go';
--replace_column 7 # 8 # 9 # 12 # 13 # 14 #
SHOW TABLE STATUS LIKE 't1';
......
......@@ -30,6 +30,7 @@
#include "rt_index.h"
#include "sql_table.h" // tablename_to_filename
#include "sql_class.h" // THD
#include "debug_sync.h"
ulonglong myisam_recover_options;
static ulong opt_myisam_block_size;
......@@ -1131,6 +1132,7 @@ int ha_myisam::repair(THD *thd, HA_CHECK &param, bool do_optimize)
thd_proc_info(thd, "Repair by sorting");
error = mi_repair_by_sort(&param, file, fixed_name,
test(param.testflag & T_QUICK));
DEBUG_SYNC(thd, "myisam_after_repair_by_sort");
}
}
else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment