diff options
author | unknown <bell@book.sanja.is.com.ua> | 2005-05-09 02:06:18 +0300 |
---|---|---|
committer | unknown <bell@book.sanja.is.com.ua> | 2005-05-09 02:06:18 +0300 |
commit | d214d5016058dc49c62ba67e6c6e65c10cfb729e (patch) | |
tree | d0fe4705999c1a1720b4dcf23eb8a2ce832f7545 /mysql-test | |
parent | 67312e3d5c9eee997e31ed55d5a1554ebf546667 (diff) | |
parent | a6b1546676ecb06a1e2d555ab8716d89bd359c31 (diff) | |
download | mariadb-git-d214d5016058dc49c62ba67e6c6e65c10cfb729e.tar.gz |
merge
mysql-test/t/sp.test:
Auto merged
sql/item.cc:
Auto merged
sql/sp_head.cc:
Auto merged
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/sp.result | 25 | ||||
-rw-r--r-- | mysql-test/t/sp.test | 29 |
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 |