diff options
author | unknown <dlenev@mysql.com> | 2005-10-12 23:42:51 +0400 |
---|---|---|
committer | unknown <dlenev@mysql.com> | 2005-10-12 23:42:51 +0400 |
commit | f48db1bc0f612b571cb6f3f8b0e6daa51331556d (patch) | |
tree | f42c2a52d3b1d8c1f39fe0d8bfc72149bb80b555 /mysql-test/t/rpl_sp.test | |
parent | 63e7824fc2cb5fec43cafbc59d17e5cfcc2195b3 (diff) | |
download | mariadb-git-f48db1bc0f612b571cb6f3f8b0e6daa51331556d.tar.gz |
Temporary solution for bug #13969 "Routines which are replicated from master
can't be executed on slave". It will be possible to solve this problem
in more correct way when we will implement WL#2897 "Complete definer support
in the stored routines".
mysql-test/r/rpl_sp.result:
Added test for bug #13969 "Routines which are replicated from master can't be
executed on slave".
mysql-test/t/rpl_sp.test:
Added test for bug #13969 "Routines which are replicated from master can't be
executed on slave".
sql/sp_head.cc:
sp_change_security_context():
Currently the slave replication thread creates all stored routines with
definer ''@'', ignoring the actual definer. When the slave replication
thread executes these routines, it ignores the definer, and so the routines
work. However, in case of a failover, the replica operates in a normal mysqld
mode and changes security context to the definer when executing a routine.
A proper fix for this issue is described in WL#2897 "Complete definer support
in the stored routines". Until this WL is implemented, we need this temporary
fix, which ignores errors when changing security context.
Diffstat (limited to 'mysql-test/t/rpl_sp.test')
-rw-r--r-- | mysql-test/t/rpl_sp.test | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/t/rpl_sp.test b/mysql-test/t/rpl_sp.test index fa44b68bd8c..e62a6c73c0a 100644 --- a/mysql-test/t/rpl_sp.test +++ b/mysql-test/t/rpl_sp.test @@ -258,6 +258,23 @@ sync_slave_with_master; select * from t1; +# +# Test for bug #13969 "Routines which are replicated from master can't be +# executed on slave". +# +connection master; +create procedure foo() + not deterministic + reads sql data + select * from t1; +sync_slave_with_master; +# This should not fail +call foo(); +connection master; +drop procedure foo; +sync_slave_with_master; + + # Clean up connection master; drop function fn1; |