summaryrefslogtreecommitdiff
path: root/mysql-test/r/sp-vars.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r/sp-vars.result')
-rw-r--r--mysql-test/r/sp-vars.result26
1 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/r/sp-vars.result b/mysql-test/r/sp-vars.result
index 41cccccb001..f5420a62f63 100644
--- a/mysql-test/r/sp-vars.result
+++ b/mysql-test/r/sp-vars.result
@@ -1202,3 +1202,29 @@ after substr str_remainder
after substr b,c
DROP PROCEDURE bug27415_text_test|
DROP PROCEDURE bug27415_text_test2|
+drop function if exists f1;
+drop table if exists t1;
+create function f1() returns int
+begin
+if @a=1 then set @b='abc';
+else set @b=1;
+end if;
+set @a=1;
+return 0;
+end|
+create table t1 (a int)|
+insert into t1 (a) values (1), (2)|
+set @b=1|
+set @a=0|
+select f1(), @b from t1|
+f1() @b
+0 1
+0 0
+set @b:='test'|
+set @a=0|
+select f1(), @b from t1|
+f1() @b
+0 1
+0 abc
+drop function f1;
+drop table t1;