diff options
Diffstat (limited to 'mysql-test/t/rpl_sp.test')
-rw-r--r-- | mysql-test/t/rpl_sp.test | 53 |
1 files changed, 42 insertions, 11 deletions
diff --git a/mysql-test/t/rpl_sp.test b/mysql-test/t/rpl_sp.test index 3a93a6608cd..9a1960db647 100644 --- a/mysql-test/t/rpl_sp.test +++ b/mysql-test/t/rpl_sp.test @@ -343,13 +343,13 @@ delete from t1; drop trigger trg; insert into t1 values (1); select * from t1; ---replace_column 2 # 5 # ---replace_regex /table_id: [0-9]+/table_id: #/ -show binlog events in 'master-bin.000001' from 102; 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". @@ -522,17 +522,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; ---echo End of 5.0 tests - # # 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; @@ -543,12 +537,49 @@ 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 102; --error ER_BAD_DB_ERROR 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 # +--replace_regex /table_id: [0-9]+/table_id: #/ +show binlog events in 'master-bin.000001' from 102; + + +# 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; +--echo End of 5.0 tests --echo End of 5.1 tests |