Commit 713c5a64 authored by Luis Soares's avatar Luis Soares

BUG#50451: rpl_loaddata_concurrent fails sporadically

When using MyIsam tables and processing concurrent DML
statements, the server may be sending back an OK to the client
before actually finishing the transaction commit procedure. This
has been reported before in BUG@37521 and BUG@29334.

This particular test case gets affected, because it performs the
following sequence:
  
  connect (conn2, ...)
  connection conn2;
  LOAD DATA CONCURRENT ...
  disconnect (conn2, ...)
  connection master;
  sync_slave_with_master
  diff_tables

At this point diff_tables may report difference in the table
content (the master seems to be missing the conn2 rows). 

To workaround this MyISAM concurrent DML statements issue and
make this test case deterministic, we wait on conn2 until the
rows inserted show up in the table. After this the test case
proceeds as normally would before this patch.
parent 673ec7b2
......@@ -219,6 +219,19 @@ connect (conn2,localhost,root,,*NO-ONE*);
-- echo ### assertion: works without stating the default database
-- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
-- eval $UPPER_STMT_HEAD LOCAL INFILE '$MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE $db1.t1
# We cannot disconnect right away because when inserting
# concurrently in a MyISAM table, the server is sending an OK
# to the client before updating the table state (where the
# number of records is kept). See: BUG#37521 and BUG#29334.
# So we need to wait, otherwise we would be having sporadic
# failures as reported here: BUG#50451.
# 12 = 3 rows per each LOAD DATA executed x 4
-- let $count= 12
-- let $table= $db1.t1
--source include/wait_until_rows_count.inc
-- echo ### disconnect and switch back to master connection
-- disconnect conn2
-- connection master
......
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