• sven@riska.(none)'s avatar
    BUG#36433: rpl_insert_id detects inconsistency on master · 365dbaab
    sven@riska.(none) authored
    Problem: If INSERT is immediately followed by SELECT in another thread,
    the newly inserted rows may not be returned by the SELECT statement, if
    ENGINE=myisam and @@concurrent_insert=1. This caused sporadic errors in
    rpl_insert_id.
    Fix: The test now uses ENGINE=$engine_type when creating tables (so that
    innodb is used). It also turns off @@concurrent_insert around the critical
    place, so that it works if someone in the future writes a test that sets
    $engine_type=myisam before sourcing extra/rpl_tests/rpl_insert_id.test.
    It also adds ORDER BY to all SELECTs so that the result is deterministic.
    365dbaab
rpl_insert_id.test 14.3 KB