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.result262
1 files changed, 188 insertions, 74 deletions
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result
index 269c4104a05..d480d5a3f2e 100644
--- a/mysql-test/r/sp.result
+++ b/mysql-test/r/sp.result
@@ -1,37 +1,16 @@
use test;
-drop table if exists t1,t2,t3,t4;
-drop procedure if exists goto1;
-drop procedure if exists goto2;
-drop procedure if exists goto3;
-drop procedure if exists goto4;
-drop procedure if exists goto5;
-drop procedure if exists goto6;
-drop procedure if exists into_outfile;
-drop procedure if exists into_dumpfile;
-drop procedure if exists create_select;
-drop procedure if exists bar;
-drop procedure if exists hndlr1;
-drop procedure if exists hndlr2;
-drop procedure if exists hndlr3;
-drop procedure if exists hndlr4;
-drop procedure if exists cur1;
-drop procedure if exists cur2;
-drop procedure if exists chistics;
-drop procedure if exists chistics2;
-drop procedure if exists modes;
-drop procedure if exists dummy;
-drop procedure if exists bug;
-drop procedure if exists bug2;
-drop function if exists fac;
+drop table if exists t1;
create table t1 (
id char(16) not null,
data int not null
);
+drop table if exists t2;
create table t2 (
s char(16),
i int,
d double
);
+drop procedure if exists foo42;
create procedure foo42()
insert into test.t1 values ("foo", 42);
call foo42();
@@ -40,6 +19,7 @@ id data
foo 42
delete from t1;
drop procedure foo42;
+drop procedure if exists bar;
create procedure bar(x char(16), y int)
insert into test.t1 values (x, y);
call bar("bar", 666);
@@ -47,11 +27,13 @@ select * from t1;
id data
bar 666
delete from t1;
+drop procedure if exists empty|
create procedure empty()
begin
end|
call empty()|
drop procedure empty|
+drop procedure if exists scope|
create procedure scope(a int, b float)
begin
declare b int;
@@ -61,6 +43,7 @@ declare c int;
end;
end|
drop procedure scope|
+drop procedure if exists two|
create procedure two(x1 char(16), x2 char(16), y int)
begin
insert into test.t1 values (x1, y);
@@ -73,6 +56,7 @@ one 3
two 3
delete from t1|
drop procedure two|
+drop procedure if exists locset|
create procedure locset(x char(16), y int)
begin
declare z1, z2 int;
@@ -86,6 +70,7 @@ id data
locset 21
delete from t1|
drop procedure locset|
+drop procedure if exists setcontext|
create procedure setcontext()
begin
declare data int default 2;
@@ -100,7 +85,9 @@ foo 1
kaka 3
delete from t1|
drop procedure setcontext|
+drop table if exists t3|
create table t3 ( d date, i int, f double, s varchar(32) )|
+drop procedure if exists nullset|
create procedure nullset()
begin
declare ld date;
@@ -128,6 +115,7 @@ NULL NULL NULL lf = 0
NULL 1 1 ls is null
drop table t3|
drop procedure nullset|
+drop procedure if exists mixset|
create procedure mixset(x char(16), y int)
begin
declare z int;
@@ -143,12 +131,14 @@ id data @z
mixset 666 19
delete from t1|
drop procedure mixset|
+drop procedure if exists zip|
create procedure zip(x char(16), y int)
begin
declare z int;
call zap(y, z);
call bar(x, z);
end|
+drop procedure if exists zap|
create procedure zap(x int, out y int)
begin
declare z int;
@@ -166,12 +156,16 @@ select @zap|
@zap
8
drop procedure zap|
+drop procedure if exists c1|
create procedure c1(x int)
call c2("c", x)|
+drop procedure if exists c2|
create procedure c2(s char(16), x int)
call c3(x, s)|
+drop procedure if exists c3|
create procedure c3(x int, s char(16))
call c4("level", x, s)|
+drop procedure if exists c4|
create procedure c4(l char(8), x int, s char(16))
insert into t1 values (concat(l,s), x)|
call c1(42)|
@@ -183,16 +177,19 @@ drop procedure c1|
drop procedure c2|
drop procedure c3|
drop procedure c4|
+drop procedure if exists iotest|
create procedure iotest(x1 char(16), x2 char(16), y int)
begin
call inc2(x2, y);
insert into test.t1 values (x1, y);
end|
+drop procedure if exists inc2|
create procedure inc2(x char(16), y int)
begin
call inc(y);
insert into test.t1 values (x, y);
end|
+drop procedure if exists inc|
create procedure inc(inout io int)
set io = io + 1|
call iotest("io1", "io2", 1)|
@@ -203,6 +200,7 @@ io1 1
delete from t1|
drop procedure iotest|
drop procedure inc2|
+drop procedure if exists incr|
create procedure incr(inout x int)
call inc(x)|
select @zap|
@@ -214,12 +212,14 @@ select @zap|
9
drop procedure inc|
drop procedure incr|
+drop procedure if exists cbv1|
create procedure cbv1()
begin
declare y int default 3;
call cbv2(y+1, y);
insert into test.t1 values ("cbv1", y);
end|
+drop procedure if exists cbv2|
create procedure cbv2(y1 int, inout y2 int)
begin
set y2 = 4711;
@@ -234,8 +234,10 @@ delete from t1|
drop procedure cbv1|
drop procedure cbv2|
insert into t2 values ("a", 1, 1.1), ("b", 2, 1.2), ("c", 3, 1.3)|
+drop procedure if exists sub1|
create procedure sub1(id char(16), x int)
insert into test.t1 values (id, x)|
+drop procedure if exists sub3|
create function sub3(i int) returns int
return i+1|
call sub1("sub1a", (select 7))|
@@ -254,6 +256,7 @@ sub3((select max(i) from t2))
drop procedure sub1|
drop function sub3|
delete from t2|
+drop procedure if exists a0|
create procedure a0(x int)
while x do
set x = x-1;
@@ -271,6 +274,7 @@ a0 1
a0 0
delete from t1|
drop procedure a0|
+drop procedure if exists a|
create procedure a(x int)
while x > 0 do
set x = x-1;
@@ -284,6 +288,7 @@ a 1
a 0
delete from t1|
drop procedure a|
+drop procedure if exists b|
create procedure b(x int)
repeat
insert into test.t1 values (repeat("b",3), x);
@@ -297,12 +302,14 @@ bbb 2
bbb 1
delete from t1|
drop procedure b|
+drop procedure if exists b2|
create procedure b2(x int)
repeat(select 1 into outfile 'b2');
insert into test.t1 values (repeat("b2",3), x);
set x = x-1;
until x = 0 end repeat|
drop procedure b2|
+drop procedure if exists c|
create procedure c(x int)
hmm: while x > 0 do
insert into test.t1 values ("c", x);
@@ -318,6 +325,7 @@ c 2
c 1
delete from t1|
drop procedure c|
+drop procedure if exists d|
create procedure d(x int)
hmm: while x > 0 do
insert into test.t1 values ("d", x);
@@ -331,6 +339,7 @@ id data
d 3
delete from t1|
drop procedure d|
+drop procedure if exists e|
create procedure e(x int)
foo: loop
if x = 0 then
@@ -347,6 +356,7 @@ e 2
e 1
delete from t1|
drop procedure e|
+drop procedure if exists f|
create procedure f(x int)
if x < 0 then
insert into test.t1 values ("f", 0);
@@ -365,6 +375,7 @@ f 1
f 2
delete from t1|
drop procedure f|
+drop procedure if exists g|
create procedure g(x int)
case
when x < 0 then
@@ -384,6 +395,7 @@ g 1
g 2
delete from t1|
drop procedure g|
+drop procedure if exists h|
create procedure h(x int)
case x
when 0 then
@@ -403,6 +415,7 @@ h1 1
h? 17
delete from t1|
drop procedure h|
+drop procedure if exists i|
create procedure i(x int)
foo:
begin
@@ -418,6 +431,7 @@ id data
i 3
delete from t1|
drop procedure i|
+drop procedure if exists goto1|
create procedure goto1()
begin
declare y int;
@@ -443,6 +457,7 @@ 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;
@@ -499,6 +514,7 @@ j 1
j 2
drop procedure goto2|
delete from t1|
+drop procedure if exists goto3|
create procedure goto3()
begin
label L1;
@@ -507,6 +523,7 @@ end;
goto L1;
end|
drop procedure goto3|
+drop procedure if exists goto4|
create procedure goto4()
begin
begin
@@ -517,6 +534,7 @@ end;
end;
end|
drop procedure goto4|
+drop procedure if exists goto5|
create procedure goto5()
begin
begin
@@ -527,6 +545,7 @@ label lab1;
end;
end|
drop procedure goto5|
+drop procedure if exists goto6|
create procedure goto6()
begin
label L1;
@@ -553,6 +572,7 @@ 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|
create procedure sel1()
begin
select * from t1;
@@ -562,6 +582,7 @@ id data
foo 3
bar 19
drop procedure sel1|
+drop procedure if exists sel2|
create procedure sel2()
begin
select * from t1;
@@ -578,6 +599,7 @@ z 3 2.2
drop procedure sel2|
delete from t1|
delete from t2|
+drop procedure if exists into_test|
create procedure into_test(x char(16), y int)
begin
insert into test.t1 values (x, y);
@@ -591,6 +613,7 @@ into 100
into2 102
delete from t1|
drop procedure into_test|
+drop procedure if exists into_tes2|
create procedure into_test2(x char(16), y int)
begin
insert into test.t1 values (x, y);
@@ -604,6 +627,7 @@ into 100 100
into2 102 100
delete from t1|
drop procedure into_test2|
+drop procedure if exists into_test3|
create procedure into_test3()
begin
declare x char(16);
@@ -621,6 +645,7 @@ into3 19 0
delete from t1|
delete from t2|
drop procedure into_test3|
+drop procedure if exists into_test4|
create procedure into_test4()
begin
declare x int;
@@ -644,6 +669,7 @@ into4 77
delete from t1|
drop table t3|
drop procedure into_test4|
+drop procedure if exists into_outfile|
create procedure into_outfile(x char(16), y int)
begin
insert into test.t1 values (x, y);
@@ -653,6 +679,7 @@ end|
call into_outfile("ofile", 1)|
delete from t1|
drop procedure into_outfile|
+drop procedure if exists into_dumpfile|
create procedure into_dumpfile(x char(16), y int)
begin
insert into test.t1 values (x, y);
@@ -662,6 +689,7 @@ end|
call into_dumpfile("dfile", 1)|
delete from t1|
drop procedure into_dumpfile|
+drop procedure if exists create_select|
create procedure create_select(x char(16), y int)
begin
insert into test.t1 values (x, y);
@@ -677,27 +705,32 @@ cs 90 cs2 92
drop table if exists t3|
delete from t1|
drop procedure create_select|
+drop function if exists e|
create function e() returns double
return 2.7182818284590452354|
set @e = e()|
select e(), @e|
e() @e
2.718281828459 2.718281828459
+drop function if exists inc|
create function inc(i int) returns int
return i+1|
select inc(1), inc(99), inc(-71)|
inc(1) inc(99) inc(-71)
2 100 -70
+drop function if exists mul|
create function mul(x int, y int) returns int
return x*y|
select mul(1,1), mul(3,5), mul(4711, 666)|
mul(1,1) mul(3,5) mul(4711, 666)
1 15 3137526
+drop function if exists append|
create function append(s1 char(8), s2 char(8)) returns char(16)
return concat(s1, s2)|
select append("foo", "bar")|
append("foo", "bar")
foobar
+drop function if exists fac|
create function fac(n int unsigned) returns bigint unsigned
begin
declare f bigint unsigned default 1;
@@ -710,6 +743,7 @@ end|
select fac(1), fac(2), fac(5), fac(10)|
fac(1) fac(2) fac(5) fac(10)
1 2 120 3628800
+drop function if exists fun|
create function fun(d double, i int, u int unsigned) returns double
return mul(inc(i), fac(u)) / e()|
select fun(2.3, 3, 5)|
@@ -737,6 +771,7 @@ drop function inc|
drop function mul|
drop function append|
drop function fun|
+drop procedure if exists hndlr1|
create procedure hndlr1(val int)
begin
declare x int default 0;
@@ -755,6 +790,7 @@ id data
hndlr1 42
delete from t1|
drop procedure hndlr1|
+drop procedure if exists hndlr2|
create procedure hndlr2(val int)
begin
declare x int default 0;
@@ -770,6 +806,7 @@ id data
hndlr2 1
delete from t1|
drop procedure hndlr2|
+drop procedure if exists hndlr3|
create procedure hndlr3(val int)
begin
declare x int default 0;
@@ -798,6 +835,7 @@ delete from t1|
drop procedure hndlr3|
drop table if exists t3|
create table t3 ( id char(16), data int )|
+drop procedure if exists hndlr4|
create procedure hndlr4()
begin
declare x int default 0;
@@ -812,6 +850,7 @@ id data
z NULL
drop table t3|
drop procedure hndlr4|
+drop procedure if exists cur1|
create procedure cur1()
begin
declare a char(16);
@@ -839,6 +878,7 @@ zap 663
drop procedure cur1|
drop table if exists t3|
create table t3 ( s char(16), i int )|
+drop procedure if exists cur2|
create procedure cur2()
begin
declare done int default 0;
@@ -875,6 +915,7 @@ delete from t1|
delete from t2|
drop table t3|
drop procedure cur2|
+drop procedure if exists chistics|
create procedure chistics()
language sql
modifies sql data
@@ -902,6 +943,7 @@ chistics CREATE PROCEDURE `test`.`chistics`()
COMMENT 'Characteristics procedure test'
insert into t1 values ("chistics", 1)
drop procedure chistics|
+drop function if exists chistics|
create function chistics() returns int
language sql
deterministic
@@ -932,6 +974,7 @@ return 42
drop function chistics|
insert into t1 values ("foo", 1), ("bar", 2), ("zip", 3)|
set @@sql_mode = 'ANSI'|
+drop procedure if exists modes$
create procedure modes(out c1 int, out c2 int)
begin
declare done int default 0;
@@ -968,12 +1011,14 @@ use test|
drop database sp_db2|
create database sp_db3|
use sp_db3|
+drop procedure if exists dummy|
create procedure dummy(out x int)
set x = 42|
use test|
drop database sp_db3|
select type,db,name from mysql.proc where db = 'sp_db3'|
type db name
+drop procedure if exists rc|
create procedure rc()
begin
delete from t1;
@@ -1001,7 +1046,8 @@ select row_count()|
row_count()
-1
drop procedure rc|
-create procedure bug(a_id char(16), a_data int)
+drop procedure if exists bug822|
+create procedure bug822(a_id char(16), a_data int)
begin
declare n int;
select count(*) into n from t1 where id = a_id and data = a_data;
@@ -1009,16 +1055,17 @@ if n = 0 then
insert into t1 (id, data) values (a_id, a_data);
end if;
end|
-call bug('foo', 42)|
-call bug('foo', 42)|
-call bug('bar', 666)|
+call bug822('foo', 42)|
+call bug822('foo', 42)|
+call bug822('bar', 666)|
select * from t1|
id data
foo 42
bar 666
delete from t1|
-drop procedure bug|
-create procedure bug()
+drop procedure bug822|
+drop procedure if exists bug1495|
+create procedure bug1495()
begin
declare x int;
select data into x from t1 order by id limit 1;
@@ -1029,18 +1076,19 @@ insert into t1 values ("more", x+10);
end if;
end|
insert into t1 values ('foo', 12)|
-call bug()|
+call bug1495()|
delete from t1 where id='foo'|
insert into t1 values ('bar', 7)|
-call bug()|
+call bug1495()|
delete from t1 where id='bar'|
select * from t1|
id data
less 2
more 17
delete from t1|
-drop procedure bug|
-create procedure bug(s char(16))
+drop procedure bug1495|
+drop procedure if exists bug1547|
+create procedure bug1547(s char(16))
begin
declare x int;
select data into x from t1 where s = id limit 1;
@@ -1051,8 +1099,8 @@ insert into t1 values ("more", x+10);
end if;
end|
insert into t1 values ("foo", 12), ("bar", 7)|
-call bug("foo")|
-call bug("bar")|
+call bug1547("foo")|
+call bug1547("bar")|
select * from t1|
id data
foo 12
@@ -1060,34 +1108,37 @@ bar 7
less 2
more 17
delete from t1|
-drop procedure bug|
+drop procedure bug1547|
drop table if exists t70|
create table t70 (s1 int,s2 int)|
insert into t70 values (1,2)|
-create procedure bug(out p1 int, out p2 int)
+drop procedure if exists bug1656|
+create procedure bug1656(out p1 int, out p2 int)
select * into p1, p1 from t70|
-call bug(@1, @2)|
+call bug1656(@1, @2)|
select @1, @2|
@1 @2
2 NULL
drop table t70|
-drop procedure bug|
+drop procedure bug1656|
drop table if exists t3|
create table t3(a int)|
-create procedure bug()
+drop procedure if exists bug1862|
+create procedure bug1862()
begin
insert into t3 values(2);
flush tables;
end|
-call bug()|
-call bug()|
+call bug1862()|
+call bug1862()|
select * from t3|
a
2
2
drop table t3|
-drop procedure bug|
-create procedure bug()
+drop procedure bug1862|
+drop procedure if exists bug1874|
+create procedure bug1874()
begin
declare x int;
declare y double;
@@ -1101,7 +1152,7 @@ select avg(data) into y from t1;
insert into t2 values ("avg", 0, y);
end|
insert into t1 (data) values (3), (1), (5), (9), (4)|
-call bug()|
+call bug1874()|
select * from t2|
s i d
max 9 0
@@ -1110,8 +1161,9 @@ sum 22 0
avg 0 4.4
delete from t1|
delete from t2|
-drop procedure bug|
-create procedure bug()
+drop procedure bug1874|
+drop procedure if exists bug2260|
+create procedure bug2260()
begin
declare v1 int;
declare c1 cursor for select data from t1;
@@ -1121,23 +1173,27 @@ fetch c1 into v1;
set @x2 = 2;
close c1;
end|
-call bug()|
+call bug2260()|
select @x2|
@x2
2
-drop procedure bug|
+drop procedure bug2260|
+drop procedure if exists bug2267_1|
create procedure bug2267_1()
begin
show procedure status;
end|
+drop procedure if exists bug2267_2|
create procedure bug2267_2()
begin
show function status;
end|
+drop procedure if exists bug2267_3|
create procedure bug2267_3()
begin
show create procedure bug2267_1;
end|
+drop procedure if exists bug2267_4|
create procedure bug2267_4()
begin
show create function fac;
@@ -1172,38 +1228,44 @@ drop procedure bug2267_1|
drop procedure bug2267_2|
drop procedure bug2267_3|
drop procedure bug2267_4|
-create procedure bug(x int)
+drop procedure if exists bug2227|
+create procedure bug2227(x int)
begin
declare y float default 2.6;
declare z char(16) default "zzz";
select 1.3, x, y, 42, z;
end|
-call bug(9)|
+call bug2227(9)|
1.3 x y 42 z
1.3 9 2.6 42 zzz
-drop procedure bug|
-create procedure bug()
+drop procedure bug2227|
+drop procedure if exists bug2614|
+create procedure bug2614()
begin
drop table if exists t3;
create table t3 (id int default '0' not null);
insert into t3 select 12;
insert into t3 select * from t3;
end|
-call bug()|
-call bug()|
+call bug2614()|
+call bug2614()|
drop table t3|
-drop procedure bug|
-create function bug () returns int
+drop procedure bug2614|
+drop function if exists bug2674|
+create function bug2674() returns int
return @@sort_buffer_size|
set @osbs = @@sort_buffer_size|
set @@sort_buffer_size = 262000|
-select bug()|
-bug()
+select bug2674()|
+bug2674()
262000
-drop function bug|
+drop function bug2674|
set @@sort_buffer_size = @osbs|
+drop procedure if exists bug3259_1 |
create procedure bug3259_1 () begin end|
+drop procedure if exists BUG3259_2 |
create procedure BUG3259_2 () begin end|
+drop procedure if exists Bug3259_3 |
create procedure Bug3259_3 () begin end|
call BUG3259_1()|
call BUG3259_1()|
@@ -1214,48 +1276,52 @@ call bUG3259_3()|
drop procedure bUg3259_1|
drop procedure BuG3259_2|
drop procedure BUG3259_3|
-create function bug() returns char(10) character set latin2
+drop function if exists bug2772|
+create function bug2772() returns char(10) character set latin2
return 'a'|
-select bug()|
-bug()
+select bug2772()|
+bug2772()
a
-drop function bug|
-create procedure bug(out x int)
+drop function bug2772|
+drop procedure if exists bug2776_1|
+create procedure bug2776_1(out x int)
begin
declare v int;
set v = default;
set x = v;
end|
-create procedure bug2(out x int)
+drop procedure if exists bug2776_2|
+create procedure bug2776_2(out x int)
begin
declare v int default 42;
set v = default;
set x = v;
end|
set @x = 1|
-call bug(@x)|
+call bug2776_1(@x)|
select @x|
@x
NULL
-call bug2(@x)|
+call bug2776_2(@x)|
select @x|
@x
42
-drop procedure bug|
-drop procedure bug2|
+drop procedure bug2776_1|
+drop procedure bug2776_2|
drop table if exists t3|
create table t3 (s1 smallint)|
insert into t3 values (123456789012)|
Warnings:
Warning 1264 Out of range value adjusted for column 's1' at row 1
-create procedure bug()
+drop procedure if exists bug2780|
+create procedure bug2780()
begin
declare exit handler for sqlwarning set @x = 1;
set @x = 0;
insert into t3 values (123456789012);
insert into t3 values (0);
end|
-call bug()|
+call bug2780()|
select @x|
@x
1
@@ -1263,12 +1329,13 @@ select * from t3|
s1
32767
32767
-drop procedure bug|
+drop procedure bug2780|
drop table t3|
create table t3 (content varchar(10) )|
insert into t3 values ("test1")|
insert into t3 values ("test2")|
create table t4 (f1 int, rc int, t3 int)|
+drop procedure if exists bug1863|
create procedure bug1863(in1 int)
begin
declare ind int default 0;
@@ -1314,6 +1381,7 @@ insert t3 (OrderID,MarketID) values (1,1)|
insert t3 (OrderID,MarketID) values (2,2)|
insert t4 (MarketID,Market,Status) values (1,"MarketID One","A")|
insert t4 (MarketID,Market,Status) values (2,"MarketID Two","A")|
+drop procedure if exists bug2656_1|
create procedure bug2656_1()
begin
select
@@ -1321,6 +1389,7 @@ m.Market
from t4 m JOIN t3 o
ON o.MarketID != 1 and o.MarketID = m.MarketID;
end |
+drop procedure if exists bug2656_2|
create procedure bug2656_2()
begin
select
@@ -1345,6 +1414,7 @@ MarketID Two
drop procedure bug2656_1|
drop procedure bug2656_2|
drop table t3, t4|
+drop procedure if exists bug3426|
create procedure bug3426(in_time int unsigned, out x int)
begin
if in_time is null then
@@ -1389,6 +1459,7 @@ Warning 1265 Data truncated for column 'ach' at row 2
insert into t4 values (1 , 'bCh1' )|
Warnings:
Warning 1265 Data truncated for column 'bch' at row 1
+drop procedure if exists bug3448|
create procedure bug3448()
select * from t3 inner join t4 on t3.a = t4.b|
select * from t3 inner join t4 on t3.a = t4.b|
@@ -1416,6 +1487,7 @@ insert into t3 (title,body) values
('1001 MySQL Tricks','1. Never run mysqld as root. 2. ...'),
('MySQL vs. YourSQL','In the following database comparison ...'),
('MySQL Security','When configured properly, MySQL ...')|
+drop procedure if exists bug3734 |
create procedure bug3734 (param1 varchar(100))
select * from t3 where match (title,body) against (param1)|
call bug3734('database')|
@@ -1427,6 +1499,7 @@ id title body
6 MySQL Security When configured properly, MySQL ...
drop procedure bug3734|
drop table t3|
+drop procedure if exists bug3863|
create procedure bug3863()
begin
set @a = 0;
@@ -1450,6 +1523,7 @@ msg text not null,
primary key (id),
unique key rid (rid, id)
)|
+drop procedure if exists bug2460_1|
create procedure bug2460_1(in v int)
begin
( select n0.id from t3 as n0 where n0.id = v )
@@ -1473,6 +1547,7 @@ call bug2460_1(2)|
id
2
1
+drop procedure if exists bug2460_2|
create procedure bug2460_2()
begin
drop table if exists t3;
@@ -1488,16 +1563,20 @@ drop procedure bug2460_1|
drop procedure bug2460_2|
drop table t3|
set @@sql_mode = ''|
+drop procedure if exists bug2564_1|
create procedure bug2564_1()
comment 'Joe''s procedure'
insert into `t1` values ("foo", 1)|
set @@sql_mode = 'ANSI_QUOTES'|
+drop procedure if exists bug2564_2|
create procedure bug2564_2()
insert into "t1" values ('foo', 1)|
set @@sql_mode = ''$
+drop function if exists bug2564_3$
create function bug2564_3(x int, y int) returns int
return x || y$
set @@sql_mode = 'ANSI'$
+drop function if exists bug2564_4$
create function bug2564_4(x int, y int) returns int
return x || y$
set @@sql_mode = ''|
@@ -1522,6 +1601,7 @@ drop procedure bug2564_1|
drop procedure bug2564_2|
drop function bug2564_3|
drop function bug2564_4|
+drop function if exists bug3132|
create function bug3132(s char(20)) returns char(50)
return concat('Hello, ', s, '!')|
select bug3132('Bob') union all select bug3132('Judy')|
@@ -1529,6 +1609,7 @@ bug3132('Bob')
Hello, Bob!
Hello, Judy!
drop function bug3132|
+drop procedure if exists bug3843|
create procedure bug3843()
analyze table t1|
call bug3843()|
@@ -1544,6 +1625,7 @@ drop procedure bug3843|
drop table if exists t3|
create table t3 ( s1 char(10) )|
insert into t3 values ('a'), ('b')|
+drop procedure if exists bug3368|
create procedure bug3368(v char(10))
begin
select group_concat(v) from t3;
@@ -1559,6 +1641,10 @@ drop table t3|
drop table if exists t3|
create table t3 (f1 int, f2 int);
insert into t3 values (1,1);
+--disable_warnings|
+drop procedure if exists bug4579_1|
+Warnings:
+Note 1305 PROCEDURE bug4579_1 does not exist
create procedure bug4579_1 ()
begin
declare sf1 int;
@@ -1566,6 +1652,7 @@ select f1 into sf1 from t3 where f1=1 and f2=1;
update t3 set f2 = f2 + 1 where f1=1 and f2=1;
call bug4579_2();
end|
+drop procedure if exists bug4579_2|
create procedure bug4579_2 ()
begin
end|
@@ -1580,6 +1667,7 @@ drop table t3|
drop table if exists t3|
create table t3 (f1 int, f2 int, f3 int)|
insert into t3 values (1,1,1)|
+drop procedure if exists bug4726|
create procedure bug4726()
begin
declare tmp_o_id INT;
@@ -1599,6 +1687,7 @@ drop table t3|
drop table if exists t3|
create table t3 (s1 int)|
insert into t3 values (3), (4)|
+drop procedure if exists bug4318|
create procedure bug4318()
handler t3 read next|
handler t3 open|
@@ -1611,6 +1700,7 @@ s1
handler t3 close|
drop procedure bug4318|
drop table t3|
+drop procedure if exists bug4902|
create procedure bug4902()
begin
show charset like 'foo';
@@ -1737,6 +1827,7 @@ Tables_in_test (foo)
Variable_name Value
Level Code Message
drop procedure bug4902|
+drop procedure if exists bug4902_2|
create procedure bug4902_2()
begin
show processlist;
@@ -1749,6 +1840,7 @@ Id User Host db Command Time State Info
# root localhost test Query # NULL show processlist
drop procedure bug4902_2|
drop table if exists t3|
+drop procedure if exists bug4904|
create procedure bug4904()
begin
declare continue handler for sqlstate 'HY000' begin end;
@@ -1758,6 +1850,7 @@ call bug4904()|
ERROR 42S02: Table 'test.t3' doesn't exist
drop procedure bug4904|
create table t3 (s1 char character set latin1, s2 char character set latin2)|
+drop procedure if exists bug4904|
create procedure bug4904 ()
begin
declare continue handler for sqlstate 'HY000' begin end;
@@ -1766,6 +1859,7 @@ end|
call bug4904()|
drop procedure bug4904|
drop table t3|
+drop procedure if exists bug336|
create procedure bug336(out y int)
begin
declare x int;
@@ -1779,6 +1873,7 @@ select @y|
5
delete from t1|
drop procedure bug336|
+drop procedure if exists bug3157|
create procedure bug3157()
begin
if exists(select * from t1) then
@@ -1796,6 +1891,7 @@ select @n|
2
delete from t1|
drop procedure bug3157|
+drop procedure if exists bug5251|
create procedure bug5251()
begin
end|
@@ -1807,6 +1903,7 @@ where db='test' and name='bug5251' and created = @c1|
count(*)
1
drop procedure bug5251|
+drop procedure if exists bug5251|
create procedure bug5251()
checksum table t1|
call bug5251()|
@@ -1816,6 +1913,7 @@ call bug5251()|
Table Checksum
test.t1 0
drop procedure bug5251|
+drop procedure if exists bug5287|
create procedure bug5287(param1 int)
label1:
begin
@@ -1828,6 +1926,7 @@ end loop;
end|
call bug5287(1)|
drop procedure bug5287|
+drop procedure if exists bug5307|
create procedure bug5307()
begin
end; set @x = 3|
@@ -1836,9 +1935,11 @@ select @x|
@x
3
drop procedure bug5307|
+drop procedure if exists bug5258|
create procedure bug5258()
begin
end|
+drop procedure if exists bug5258_aux|
create procedure bug5258_aux()
begin
declare c, m char(19);
@@ -1854,6 +1955,7 @@ Ok
Ok
drop procedure bug5258|
drop procedure bug5258_aux|
+drop function if exists bug4487|
create function bug4487() returns char
begin
declare v char;
@@ -1864,6 +1966,7 @@ bug4487()
NULL
drop function bug4487|
drop procedure if exists bug4941|
+drop procedure if exists bug4941|
create procedure bug4941(out x int)
begin
declare c cursor for select i from t2 limit 1;
@@ -1880,6 +1983,7 @@ NULL
delete from t1|
drop procedure bug4941|
drop procedure if exists bug3583|
+drop procedure if exists bug3583|
create procedure bug3583()
begin
declare c int;
@@ -1927,6 +2031,7 @@ drop procedure bug3583|
drop table if exists t3|
drop procedure if exists bug4905|
create table t3 (s1 int,primary key (s1))|
+drop procedure if exists bug4905|
create procedure bug4905()
begin
declare v int;
@@ -1951,6 +2056,7 @@ s1
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
@@ -1964,6 +2070,7 @@ bug6022(5)
0
drop function bug6022|
drop procedure if exists bug6029|
+drop procedure if exists bug6029|
create procedure bug6029()
begin
declare exit handler for 1136 select '1136';
@@ -1985,6 +2092,7 @@ drop procedure bug6029|
drop table t3|
drop table if exists fac|
create table fac (n int unsigned not null primary key, f bigint unsigned)|
+drop procedure if exists ifac|
create procedure ifac(n int unsigned)
begin
declare i int unsigned default 1;
@@ -2044,6 +2152,7 @@ insert into primes values
(30, 131), (31, 137), (32, 139), (33, 149), (34, 151),
(35, 157), (36, 163), (37, 167), (38, 173), (39, 179),
(40, 181), (41, 191), (42, 193), (43, 197), (44, 199)|
+drop procedure if exists opp|
create procedure opp(n bigint unsigned, out pp bool)
begin
declare r double;
@@ -2070,6 +2179,7 @@ end;
end if;
end loop;
end|
+drop procedure if exists ip|
create procedure ip(m int unsigned)
begin
declare p bigint unsigned;
@@ -2133,6 +2243,7 @@ Db Name Type Definer Modified Created Security_type Comment
drop table if exists fib|
create table fib ( f bigint unsigned not null )|
insert into fib values (1), (1)|
+drop procedure if exists fib|
create procedure fib(n int unsigned)
begin
if n > 0 then
@@ -2175,6 +2286,7 @@ f
17711
drop table fib|
drop procedure fib|
+drop procedure if exists bar|
create procedure bar(x char(16), y int)
comment "111111111111" sql security invoker
insert into test.t1 values (x, y)|
@@ -2195,6 +2307,7 @@ test bar PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINE
drop procedure bar|
drop table t1;
drop table t2;
+drop procedure if exists p1;
create procedure p1 () select (select s1 from t1) from t1;
create table t1 (s1 int);
call p1();
@@ -2205,6 +2318,7 @@ call p1();
1
drop procedure p1;
drop table t1;
+drop function if exists foo;
create function `foo` () returns int return 5;
select `foo` ();
`foo` ()