diff options
Diffstat (limited to 'mysql-test/t/rpl_sp.test')
-rw-r--r-- | mysql-test/t/rpl_sp.test | 50 |
1 files changed, 40 insertions, 10 deletions
diff --git a/mysql-test/t/rpl_sp.test b/mysql-test/t/rpl_sp.test index 373b895a7c1..fc17c5615ef 100644 --- a/mysql-test/t/rpl_sp.test +++ b/mysql-test/t/rpl_sp.test @@ -338,12 +338,13 @@ delete from t1; drop trigger trg; insert into t1 values (1); select * from t1; ---replace_column 2 # 5 # -show binlog events in 'master-bin.000001' from 98; sync_slave_with_master; select * from t1; +# ********************** PART 4 : RELATED FIXED BUGS *************** + + # # Test for bug #13969 "Routines which are replicated from master can't be # executed on slave". @@ -520,15 +521,11 @@ connection master; drop table t1; sync_slave_with_master; -# Restore log_bin_trust_function_creators to original value -set global log_bin_trust_function_creators=0; -connection master; -set global log_bin_trust_function_creators=0; # # Bug22043: MySQL don't add "USE <DATABASE>" before "DROP PROCEDURE IF EXISTS" # + connection master; -reset master; --disable_warnings drop database if exists mysqltest; drop database if exists mysqltest2; @@ -539,11 +536,44 @@ use mysqltest2; create table t ( t integer ); create procedure mysqltest.test() begin end; insert into t values ( 1 ); -show binlog events in 'master-bin.000001' from 98; --error ER_WRONG_DB_NAME create procedure `\\`.test() begin end; + +# +# BUG#19725: Calls to stored function in other database are not +# replicated correctly in some cases +# + +connection master; +delimiter |; +create function f1 () returns int +begin + insert into t values (1); + return 0; +end| +delimiter ;| +sync_slave_with_master; +# Let us test if we don't forget to binlog the function's database +connection master; +use mysqltest; +set @a:= mysqltest2.f1(); +sync_slave_with_master; +connection master; + + +# Final inspection which verifies how all statements of this test file +# were written to the binary log. +--replace_column 2 # 5 # +show binlog events in 'master-bin.000001' from 98; + + +# Restore log_bin_trust_function_creators to its original value. +# This is a cleanup for all parts above where we tested stored +# functions and triggers. +set global log_bin_trust_function_creators=0; +connection master; +set global log_bin_trust_function_creators=0; + # Clean up drop database mysqltest; drop database mysqltest2; - - |