summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <bell@book.sanja.is.com.ua>2005-05-13 09:22:48 +0300
committerunknown <bell@book.sanja.is.com.ua>2005-05-13 09:22:48 +0300
commitb8b76e2233fb23bda62fb05c2320e0d2593bbc24 (patch)
tree5cd1fc8dbde005ba5d998bc10a15b77ceaff647a /mysql-test
parent4acfc0b6111fb069cc718b6b87d821407190999e (diff)
parent14920f416beb0c78054f87df7c167c7c82e4687f (diff)
downloadmariadb-git-b8b76e2233fb23bda62fb05c2320e0d2593bbc24.tar.gz
Merge book.sanja.is.com.ua:/Users/bell/mysql/bk/mysql-5.0
into book.sanja.is.com.ua:/Users/bell/mysql/bk/work-bug-5.0 sql/item.h: Auto merged
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/sp.result25
-rw-r--r--mysql-test/t/sp.test29
2 files changed, 54 insertions, 0 deletions
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result
index 0cc16448625..c1164380f09 100644
--- a/mysql-test/r/sp.result
+++ b/mysql-test/r/sp.result
@@ -3073,4 +3073,29 @@ update v1 set data = 10|
call bug9841()|
drop view v1|
drop procedure bug9841|
+drop procedure if exists bug5963|
+create procedure bug5963_1 () begin declare v int; set v = (select s1 from t3); select v; end;|
+create table t3 (s1 int)|
+insert into t3 values (5)|
+call bug5963_1()|
+v
+5
+call bug5963_1()|
+v
+5
+drop procedure bug5963_1|
+drop table t3|
+create procedure bug5963_2 (cfk_value int)
+begin
+if cfk_value in (select cpk from t3) then
+set @x = 5;
+end if;
+end;
+|
+create table t3 (cpk int)|
+insert into t3 values (1)|
+call bug5963_2(1)|
+call bug5963_2(1)|
+drop procedure bug5963_2|
+drop table t3|
drop table t1,t2;
diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test
index b4066df1666..80acaacfdb3 100644
--- a/mysql-test/t/sp.test
+++ b/mysql-test/t/sp.test
@@ -3773,6 +3773,35 @@ drop procedure bug9841|
#
+# BUG#5963 subqueries in SET/IF
+#
+--disable_warnings
+drop procedure if exists bug5963|
+--enable_warnings
+
+create procedure bug5963_1 () begin declare v int; set v = (select s1 from t3); select v; end;|
+create table t3 (s1 int)|
+insert into t3 values (5)|
+call bug5963_1()|
+call bug5963_1()|
+drop procedure bug5963_1|
+drop table t3|
+
+create procedure bug5963_2 (cfk_value int)
+begin
+ if cfk_value in (select cpk from t3) then
+ set @x = 5;
+ end if;
+ end;
+|
+create table t3 (cpk int)|
+insert into t3 values (1)|
+call bug5963_2(1)|
+call bug5963_2(1)|
+drop procedure bug5963_2|
+drop table t3|
+
+#
# BUG#NNNN: New bug synopsis
#
#--disable_warnings