diff options
author | unknown <malff@lambda.hsd1.co.comcast.net.> | 2008-03-25 11:20:11 -0600 |
---|---|---|
committer | unknown <malff@lambda.hsd1.co.comcast.net.> | 2008-03-25 11:20:11 -0600 |
commit | 88c2918016c6689c3dfb5562a0d7db16893a6094 (patch) | |
tree | 2114c2ae14cfd3b0af762ba96484d1546ef5f30c /mysql-test | |
parent | a9b04d580adad77009e9f567f2689a252709901a (diff) | |
download | mariadb-git-88c2918016c6689c3dfb5562a0d7db16893a6094.tar.gz |
Bug#20906 (Multiple assignments in SET in stored routine produce incorrect
instructions)
This bug can not be reproduced in the current version,
adding the test case to the test suite for coverage, no code change.
mysql-test/r/sp-code.result:
Bug#20906 (Multiple assignments in SET in stored routine produce incorrect
instructions)
mysql-test/t/sp-code.test:
Bug#20906 (Multiple assignments in SET in stored routine produce incorrect
instructions)
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/sp-code.result | 28 | ||||
-rw-r--r-- | mysql-test/t/sp-code.test | 32 |
2 files changed, 60 insertions, 0 deletions
diff --git a/mysql-test/r/sp-code.result b/mysql-test/r/sp-code.result index 855cabc25d8..2848306b442 100644 --- a/mysql-test/r/sp-code.result +++ b/mysql-test/r/sp-code.result @@ -842,4 +842,32 @@ Pos Instruction 21 jump 3 drop procedure proc_33618_h; drop procedure proc_33618_c; +drop procedure if exists p_20906_a; +drop procedure if exists p_20906_b; +create procedure p_20906_a() SET @a=@a+1, @b=@b+1; +show procedure code p_20906_a; +Pos Instruction +0 stmt 32 "SET @a=@a+1" +1 stmt 32 "SET @b=@b+1" +set @a=1; +set @b=1; +call p_20906_a(); +select @a, @b; +@a @b +2 2 +create procedure p_20906_b() SET @a=@a+1, @b=@b+1, @c=@c+1; +show procedure code p_20906_b; +Pos Instruction +0 stmt 32 "SET @a=@a+1" +1 stmt 32 "SET @b=@b+1" +2 stmt 32 "SET @c=@c+1" +set @a=1; +set @b=1; +set @c=1; +call p_20906_b(); +select @a, @b, @c; +@a @b @c +2 2 2 +drop procedure p_20906_a; +drop procedure p_20906_b; End of 5.0 tests. diff --git a/mysql-test/t/sp-code.test b/mysql-test/t/sp-code.test index 751282c895a..a76863dd5fa 100644 --- a/mysql-test/t/sp-code.test +++ b/mysql-test/t/sp-code.test @@ -598,4 +598,36 @@ show procedure code proc_33618_c; drop procedure proc_33618_h; drop procedure proc_33618_c; +# +# Bug#20906 (Multiple assignments in SET in stored routine produce incorrect +# instructions) +# + +--disable_warnings +drop procedure if exists p_20906_a; +drop procedure if exists p_20906_b; +--enable_warnings + +create procedure p_20906_a() SET @a=@a+1, @b=@b+1; +show procedure code p_20906_a; + +set @a=1; +set @b=1; + +call p_20906_a(); +select @a, @b; + +create procedure p_20906_b() SET @a=@a+1, @b=@b+1, @c=@c+1; +show procedure code p_20906_b; + +set @a=1; +set @b=1; +set @c=1; + +call p_20906_b(); +select @a, @b, @c; + +drop procedure p_20906_a; +drop procedure p_20906_b; + --echo End of 5.0 tests. |