diff options
author | unknown <konstantin@mysql.com> | 2005-11-17 03:15:10 +0300 |
---|---|---|
committer | unknown <konstantin@mysql.com> | 2005-11-17 03:15:10 +0300 |
commit | b67076102b62454e5560cd5a7a484366b47eb984 (patch) | |
tree | fad68beff99c1d8d8763bfc6b9d8a0298fb5f160 /mysql-test/r/rpl_sp.result | |
parent | 4d89977269c7faf8481439bc7d41169b5e4109b9 (diff) | |
download | mariadb-git-b67076102b62454e5560cd5a7a484366b47eb984.tar.gz |
A fix and a test case for Bug#14077 "Failure to replicate a stored
function with a cursor". Enable execution of SELECT queries in SP on slave.
mysql-test/r/rpl_sp.result:
Test results were fixed (Bug#14077).
mysql-test/t/rpl_sp.test:
Add a test case for Bug#14077 "Failure to replicate a stored
function with a cursor".
sql/sql_parse.cc:
Do not rewrite SELECTs with DOs on slave: if this SELECT was for a stored
routine cursor, slave must be able to execute the SELECT in order to
open a cursor.
At the moment the bug is present only in stored functions and stored
procedures called from stored functions, because, due to
stored procedure unfolding for replication, top level stored procedures
are never executed on slave.
Diffstat (limited to 'mysql-test/r/rpl_sp.result')
-rw-r--r-- | mysql-test/r/rpl_sp.result | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/mysql-test/r/rpl_sp.result b/mysql-test/r/rpl_sp.result index ba840caf6c2..41bcfc7d72c 100644 --- a/mysql-test/r/rpl_sp.result +++ b/mysql-test/r/rpl_sp.result @@ -375,3 +375,28 @@ drop procedure foo; drop function fn1; drop database mysqltest1; drop user "zedjzlcsjhd"@127.0.0.1; +use test; +use test; +drop function if exists f1; +create function f1() returns int reads sql data +begin +declare var integer; +declare c cursor for select a from v1; +open c; +fetch c into var; +close c; +return var; +end| +create view v1 as select 1 as a; +create table t1 (a int); +insert into t1 (a) values (f1()); +select * from t1; +a +1 +drop view v1; +drop function f1; +select * from t1; +a +1 +drop table t1; +reset master; |