diff --git a/mysql-test/r/rpl_row_sp000.result b/mysql-test/r/rpl_row_sp000.result index a7f72193842..c02fdecf7fd 100644 --- a/mysql-test/r/rpl_row_sp000.result +++ b/mysql-test/r/rpl_row_sp000.result @@ -58,6 +58,9 @@ insert into t1 values (15); grant CREATE ROUTINE, EXECUTE on mysqltest1.* to "zedjzlcsjhd"@127.0.0.1; grant SELECT on mysqltest1.t1 to "zedjzlcsjhd"@127.0.0.1; grant SELECT, INSERT on mysqltest1.t2 to "zedjzlcsjhd"@127.0.0.1; +SELECT 1; +1 +1 create procedure foo4() deterministic begin diff --git a/mysql-test/r/rpl_stm_sp.result b/mysql-test/r/rpl_stm_sp.result index 4fe0f61b550..1acb57f67d5 100644 --- a/mysql-test/r/rpl_stm_sp.result +++ b/mysql-test/r/rpl_stm_sp.result @@ -57,6 +57,9 @@ insert into t1 values (15); grant CREATE ROUTINE, EXECUTE on mysqltest1.* to "zedjzlcsjhd"@127.0.0.1; grant SELECT on mysqltest1.t1 to "zedjzlcsjhd"@127.0.0.1; grant SELECT, INSERT on mysqltest1.t2 to "zedjzlcsjhd"@127.0.0.1; +SELECT 1; +1 +1 create procedure foo4() deterministic begin diff --git a/mysql-test/t/rpl_row_sp000.test b/mysql-test/t/rpl_row_sp000.test index e591cb054fc..4d638cfcc1c 100644 --- a/mysql-test/t/rpl_row_sp000.test +++ b/mysql-test/t/rpl_row_sp000.test @@ -82,6 +82,14 @@ grant CREATE ROUTINE, EXECUTE on mysqltest1.* to "zedjzlcsjhd"@127.0.0.1; grant SELECT on mysqltest1.t1 to "zedjzlcsjhd"@127.0.0.1; grant SELECT, INSERT on mysqltest1.t2 to "zedjzlcsjhd"@127.0.0.1; +# ToDo: BUG#14931: There is a race between the last grant binlogging, and +# the binlogging in the new connection made below, causing sporadic test +# failures due to switched statement order in binlog. To fix this we do +# SELECT 1 in the first connection before starting the second, ensuring +# that binlogging is done in the expected order. +# Please remove this SELECT 1 when BUG#14931 is fixed. +SELECT 1; + connect (con1,127.0.0.1,zedjzlcsjhd,,mysqltest1,$MASTER_MYPORT,); connection con1; diff --git a/mysql-test/t/rpl_stm_sp.test b/mysql-test/t/rpl_stm_sp.test index 95c4543c952..62ea87e5352 100644 --- a/mysql-test/t/rpl_stm_sp.test +++ b/mysql-test/t/rpl_stm_sp.test @@ -90,6 +90,14 @@ grant CREATE ROUTINE, EXECUTE on mysqltest1.* to "zedjzlcsjhd"@127.0.0.1; grant SELECT on mysqltest1.t1 to "zedjzlcsjhd"@127.0.0.1; grant SELECT, INSERT on mysqltest1.t2 to "zedjzlcsjhd"@127.0.0.1; +# ToDo: BUG#14931: There is a race between the last grant binlogging, and +# the binlogging in the new connection made below, causing sporadic test +# failures due to switched statement order in binlog. To fix this we do +# SELECT 1 in the first connection before starting the second, ensuring +# that binlogging is done in the expected order. +# Please remove this SELECT 1 when BUG#14931 is fixed. +SELECT 1; + connect (con1,127.0.0.1,zedjzlcsjhd,,mysqltest1,$MASTER_MYPORT,); connection con1;