Commit 2397d7fe authored by Dmitry Lenev's avatar Dmitry Lenev

Fix for bug #53238 "mdl_sync fails sporadically".

The problem was that mdl_sync.test was failing sporadically,
due to fact that part of the test didn't take into account
effects of MyISAM's concurrent insert.

This patch solves the problem by making test case robust
against concurrent insert.
parent ae1ae4bd
...@@ -330,9 +330,9 @@ select column_name from information_schema.columns where ...@@ -330,9 +330,9 @@ select column_name from information_schema.columns where
table_schema='test' and table_name='t1'; table_schema='test' and table_name='t1';
column_name column_name
c1 c1
select count(*) from t1; # Disable result log to make test robust against
count(*) # effects of concurrent insert.
4 select * from t1;
insert into t1 values (1); insert into t1 values (1);
# Check that SNW lock is not compatible with SW lock. # Check that SNW lock is not compatible with SW lock.
# Again we use ALTER TABLE which fails after opening # Again we use ALTER TABLE which fails after opening
......
...@@ -462,7 +462,11 @@ handler t1 open; ...@@ -462,7 +462,11 @@ handler t1 open;
handler t1 close; handler t1 close;
select column_name from information_schema.columns where select column_name from information_schema.columns where
table_schema='test' and table_name='t1'; table_schema='test' and table_name='t1';
select count(*) from t1; --echo # Disable result log to make test robust against
--echo # effects of concurrent insert.
--disable_result_log
select * from t1;
--enable_result_log
insert into t1 values (1); insert into t1 values (1);
--echo # Check that SNW lock is not compatible with SW lock. --echo # Check that SNW lock is not compatible with SW lock.
--echo # Again we use ALTER TABLE which fails after opening --echo # Again we use ALTER TABLE which fails after opening
......
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