Commit 523f3a02 authored by unknown's avatar unknown

Merge lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.0-opt

into  lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.1-opt-merge


mysql-test/r/sp-code.result:
  Auto merged
mysql-test/t/sp-code.test:
  Auto merged
parents 7df182d5 88c29180
...@@ -842,6 +842,34 @@ Pos Instruction ...@@ -842,6 +842,34 @@ Pos Instruction
21 jump 3 21 jump 3
drop procedure proc_33618_h; drop procedure proc_33618_h;
drop procedure proc_33618_c; 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. End of 5.0 tests.
CREATE PROCEDURE p1() CREATE PROCEDURE p1()
BEGIN BEGIN
......
...@@ -598,6 +598,38 @@ show procedure code proc_33618_c; ...@@ -598,6 +598,38 @@ show procedure code proc_33618_c;
drop procedure proc_33618_h; drop procedure proc_33618_h;
drop procedure proc_33618_c; 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. --echo End of 5.0 tests.
# #
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment