mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
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.
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user