summaryrefslogtreecommitdiff
path: root/mysql-test/r/sp.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r/sp.result')
-rw-r--r--mysql-test/r/sp.result272
1 files changed, 55 insertions, 217 deletions
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result
index ed858ba27ee..74c03987a6a 100644
--- a/mysql-test/r/sp.result
+++ b/mysql-test/r/sp.result
@@ -438,145 +438,6 @@ id data
i 3
delete from t1|
drop procedure i|
-drop procedure if exists goto1|
-create procedure goto1()
-begin
-declare y int;
-label a;
-select * from t1;
-select count(*) into y from t1;
-if y > 2 then
-goto b;
-end if;
-insert into t1 values ("j", y);
-goto a;
-label b;
-end|
-call goto1()|
-id data
-id data
-j 0
-id data
-j 0
-j 1
-id data
-j 0
-j 1
-j 2
-drop procedure goto1|
-drop procedure if exists goto2|
-create procedure goto2(a int)
-begin
-declare x int default 0;
-declare continue handler for sqlstate '42S98' set x = 1;
-label a;
-select * from t1;
-b:
-while x < 2 do
-begin
-declare continue handler for sqlstate '42S99' set x = 2;
-if a = 0 then
-set x = x + 1;
-iterate b;
-elseif a = 1 then
-leave b;
-elseif a = 2 then
-set a = 1;
-goto a;
-end if;
-end;
-end while b;
-select * from t1;
-end|
-call goto2(0)|
-id data
-j 0
-j 1
-j 2
-id data
-j 0
-j 1
-j 2
-call goto2(1)|
-id data
-j 0
-j 1
-j 2
-id data
-j 0
-j 1
-j 2
-call goto2(2)|
-id data
-j 0
-j 1
-j 2
-id data
-j 0
-j 1
-j 2
-id data
-j 0
-j 1
-j 2
-drop procedure goto2|
-delete from t1|
-drop procedure if exists goto3|
-create procedure goto3()
-begin
-label L1;
-begin
-end;
-goto L1;
-end|
-drop procedure goto3|
-drop procedure if exists goto4|
-create procedure goto4()
-begin
-begin
-label lab1;
-begin
-goto lab1;
-end;
-end;
-end|
-drop procedure goto4|
-drop procedure if exists goto5|
-create procedure goto5()
-begin
-begin
-begin
-goto lab1;
-end;
-label lab1;
-end;
-end|
-drop procedure goto5|
-drop procedure if exists goto6|
-create procedure goto6()
-begin
-label L1;
-goto L5;
-begin
-label L2;
-goto L1;
-goto L5;
-begin
-label L3;
-goto L1;
-goto L2;
-goto L3;
-goto L4;
-goto L5;
-end;
-goto L2;
-goto L4;
-label L4;
-end;
-label L5;
-goto L1;
-end|
-drop procedure goto6|
insert into t1 values ("foo", 3), ("bar", 19)|
insert into t2 values ("x", 9, 4.1), ("y", -1, 19.2), ("z", 3, 2.2)|
drop procedure if exists sel1|
@@ -1227,7 +1088,7 @@ a
select * from v1|
a
3
-select * from v1, v2|
+select * from v1, t1|
ERROR HY000: Table 't1' was not locked with LOCK TABLES
select f4()|
ERROR HY000: Table 't2' was not locked with LOCK TABLES
@@ -1396,60 +1257,6 @@ drop procedure opp|
drop procedure ip|
show procedure status like '%p%'|
Db Name Type Definer Modified Created Security_type Comment
-drop table if exists fib|
-create table fib ( f bigint unsigned not null )|
-drop procedure if exists fib|
-create procedure fib(n int unsigned)
-begin
-if n > 1 then
-begin
-declare x, y bigint unsigned;
-declare c cursor for select f from fib order by f desc limit 2;
-open c;
-fetch c into y;
-fetch c into x;
-close c;
-insert into fib values (x+y);
-call fib(n-1);
-end;
-end if;
-end|
-insert into fib values (0), (1)|
-call fib(3)|
-select * from fib order by f asc|
-f
-0
-1
-1
-2
-delete from fib|
-insert into fib values (0), (1)|
-call fib(20)|
-select * from fib order by f asc|
-f
-0
-1
-1
-2
-3
-5
-8
-13
-21
-34
-55
-89
-144
-233
-377
-610
-987
-1597
-2584
-4181
-6765
-drop table fib|
-drop procedure fib|
drop procedure if exists bar|
create procedure bar(x char(16), y int)
comment "111111111111" sql security invoker
@@ -2506,20 +2313,6 @@ s1
1
drop procedure bug4905|
drop table t3|
-drop function if exists bug6022|
-drop function if exists bug6022|
-create function bug6022(x int) returns int
-begin
-if x < 0 then
-return 0;
-else
-return bug6022(x-1);
-end if;
-end|
-select bug6022(5)|
-bug6022(5)
-0
-drop function bug6022|
drop procedure if exists bug6029|
drop procedure if exists bug6029|
create procedure bug6029()
@@ -2971,15 +2764,6 @@ select @x|
set global query_cache_size = @qcs1|
delete from t1|
drop function bug9902|
-drop procedure if exists bug6898|
-create procedure bug6898()
-begin
-goto label1;
-label label1;
-begin end;
-goto label1;
-end|
-drop procedure bug6898|
drop function if exists bug9102|
create function bug9102() returns blob return 'a'|
select bug9102()|
@@ -3224,4 +3008,58 @@ bbbbb 2
ccccc 3
drop procedure bug10136|
drop table t3|
+drop procedure if exists bug11529|
+create procedure bug11529()
+begin
+declare c cursor for select id, data from t1 where data in (10,13);
+open c;
+begin
+declare vid char(16);
+declare vdata int;
+declare exit handler for not found begin end;
+while true do
+fetch c into vid, vdata;
+end while;
+end;
+close c;
+end|
+insert into t1 values
+('Name1', 10),
+('Name2', 11),
+('Name3', 12),
+('Name4', 13),
+('Name5', 14)|
+call bug11529()|
+call bug11529()|
+delete from t1|
+drop procedure bug11529|
+drop procedure if exists bug6063|
+drop procedure if exists bug7088_1|
+drop procedure if exists bug7088_2|
+create procedure bug6063()
+lâbel: begin end|
+call bug6063()|
+show create procedure bug6063|
+Procedure sql_mode Create Procedure
+bug6063 CREATE PROCEDURE `test`.`bug6063`()
+l?bel: begin end
+set character set utf8|
+create procedure bug7088_1()
+label1: begin end label1|
+create procedure bug7088_2()
+läbel1: begin end|
+call bug7088_1()|
+call bug7088_2()|
+set character set default|
+show create procedure bug7088_1|
+Procedure sql_mode Create Procedure
+bug7088_1 CREATE PROCEDURE `test`.`bug7088_1`()
+label1: begin end label1
+show create procedure bug7088_2|
+Procedure sql_mode Create Procedure
+bug7088_2 CREATE PROCEDURE `test`.`bug7088_2`()
+läbel1: begin end
+drop procedure bug6063|
+drop procedure bug7088_1|
+drop procedure bug7088_2|
drop table t1,t2;