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.result320
1 files changed, 206 insertions, 114 deletions
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result
index 34f2aa94000..c46558fb08f 100644
--- a/mysql-test/r/sp.result
+++ b/mysql-test/r/sp.result
@@ -78,7 +78,7 @@ replace t1 set data = data, id = "bar";
update t1 set id = "kaka", data = 3 where t1.data = data;
end|
call setcontext()|
-select * from t1|
+select * from t1 order by data|
id data
foo 1
kaka 3
@@ -191,7 +191,7 @@ drop procedure if exists inc|
create procedure inc(inout io int)
set io = io + 1|
call iotest("io1", "io2", 1)|
-select * from t1|
+select * from t1 order by data desc|
id data
io2 2
io1 1
@@ -224,7 +224,7 @@ set y2 = 4711;
insert into test.t1 values ("cbv2", y1);
end|
call cbv1()|
-select * from t1|
+select * from t1 order by data|
id data
cbv2 4
cbv1 4711
@@ -243,7 +243,7 @@ set x = (select sum(t.i) from test.t2 t);
insert into test.t1 values (id, x);
end|
drop procedure if exists sub3|
-create function sub3(i int) returns int
+create function sub3(i int) returns int deterministic
return i+1|
call sub1("sub1a", (select 7))|
call sub1("sub1b", (select max(i) from t2))|
@@ -251,7 +251,7 @@ call sub1("sub1c", (select i,d from t2 limit 1))|
ERROR 21000: Operand should contain 1 column(s)
call sub1("sub1d", (select 1 from (select 1) a))|
call sub2("sub2")|
-select * from t1|
+select * from t1 order by id|
id data
sub1a 7
sub1b 3
@@ -272,7 +272,7 @@ set x = x-1;
insert into test.t1 values ("a0", x);
end while|
call a0(3)|
-select * from t1|
+select * from t1 order by data desc|
id data
a0 2
a0 1
@@ -286,7 +286,7 @@ set x = x-1;
insert into test.t1 values ("a", x);
end while|
call a(3)|
-select * from t1|
+select * from t1 order by data desc|
id data
a 2
a 1
@@ -300,7 +300,7 @@ insert into test.t1 values (repeat("b",3), x);
set x = x-1;
until x = 0 end repeat|
call b(3)|
-select * from t1|
+select * from t1 order by data desc|
id data
bbb 3
bbb 2
@@ -323,7 +323,7 @@ iterate hmm;
insert into test.t1 values ("x", x);
end while hmm|
call c(3)|
-select * from t1|
+select * from t1 order by data desc|
id data
c 3
c 2
@@ -354,7 +354,7 @@ insert into test.t1 values ("e", x);
set x = x-1;
end loop foo|
call e(3)|
-select * from t1|
+select * from t1 order by data desc|
id data
e 3
e 2
@@ -373,7 +373,7 @@ end if|
call f(-2)|
call f(0)|
call f(4)|
-select * from t1|
+select * from t1 order by data|
id data
f 0
f 1
@@ -393,7 +393,7 @@ end case|
call g(-42)|
call g(0)|
call g(1)|
-select * from t1|
+select * from t1 order by data|
id data
g 0
g 1
@@ -413,7 +413,7 @@ end case|
call h(0)|
call h(1)|
call h(17)|
-select * from t1|
+select * from t1 order by data|
id data
h0 0
h1 1
@@ -441,7 +441,7 @@ 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;
+select * from t1 order by data;
end|
call sel1()|
id data
@@ -451,8 +451,8 @@ drop procedure sel1|
drop procedure if exists sel2|
create procedure sel2()
begin
-select * from t1;
-select * from t2;
+select * from t1 order by data;
+select * from t2 order by s;
end|
call sel2()|
id data
@@ -473,7 +473,7 @@ select id,data into x,y from test.t1 limit 1;
insert into test.t1 values (concat(x, "2"), y+2);
end|
call into_test("into", 100)|
-select * from t1|
+select * from t1 order by data|
id data
into 100
into2 102
@@ -487,7 +487,7 @@ select id,data into x,@z from test.t1 limit 1;
insert into test.t1 values (concat(x, "2"), y+2);
end|
call into_test2("into", 100)|
-select id,data,@z from t1|
+select id,data,@z from t1 order by data|
id data @z
into 100 100
into2 102 100
@@ -619,14 +619,14 @@ insert into t2 values (append("a", "b"), mul(2,mul(3,4)), fun(1.7, 4, 6))|
select * from t2 where s = append("a", "b")|
s i d
ab 24 1324.36598821719
-select * from t2 where i = mul(4,3) or i = mul(mul(3,4),2)|
+select * from t2 where i = mul(4,3) or i = mul(mul(3,4),2) order by i|
s i d
xxxyyy 12 2.71828182845905
ab 24 1324.36598821719
select * from t2 where d = e()|
s i d
xxxyyy 12 2.71828182845905
-select * from t2|
+select * from t2 order by i|
s i d
xxxyyy 12 2.71828182845905
ab 24 1324.36598821719
@@ -745,8 +745,8 @@ drop procedure if exists cur2|
create procedure cur2()
begin
declare done int default 0;
-declare c1 cursor for select id,data from test.t1;
-declare c2 cursor for select i from test.t2;
+declare c1 cursor for select id,data from test.t1 order by id,data;
+declare c2 cursor for select i from test.t2 order by i;
declare continue handler for sqlstate '02000' set done = 1;
open c1;
open c2;
@@ -769,10 +769,10 @@ close c1;
close c2;
end|
call cur2()|
-select * from t3|
+select * from t3 order by i,s|
s i
-foo 40
bar 3
+foo 40
zap 663
delete from t1|
delete from t2|
@@ -935,16 +935,16 @@ return (select sum(data) from t1)|
select f1()|
f1()
3
-select id, f1() from t1|
+select id, f1() from t1 order by id|
id f1()
a 3
b 3
create function f2() returns int
-return (select data from t1 where data <= (select sum(data) from t1) limit 1)|
+return (select data from t1 where data <= (select sum(data) from t1) order by data limit 1)|
select f2()|
f2()
1
-select id, f2() from t1|
+select id, f2() from t1 order by id|
id f2()
a 1
b 1
@@ -959,14 +959,14 @@ end|
select f3()|
f3()
1
-select id, f3() from t1|
+select id, f3() from t1 order by id|
id f3()
a 1
b 1
select f1(), f3()|
f1() f3()
3 1
-select id, f1(), f3() from t1|
+select id, f1(), f3() from t1 order by id|
id f1() f3()
a 3 1
b 3 1
@@ -975,7 +975,7 @@ return (select d from t1, t2 where t1.data = t2.i and t1.id= "b")|
select f4()|
f4()
2
-select s, f4() from t2|
+select s, f4() from t2 order by s|
s f4()
a 2
b 2
@@ -1008,7 +1008,7 @@ return (select sum(data) from t1 where data <= f1())|
select f6()|
f6()
2
-select id, f6() from t1|
+select id, f6() from t1 order by id|
id f6()
a 2
b 2
@@ -1016,7 +1016,7 @@ create view v1 (a) as select f1()|
select * from v1|
a
3
-select id, a from t1, v1|
+select id, a from t1, v1 order by id|
id a
a 3
b 3
@@ -1027,7 +1027,7 @@ create view v2 (a) as select a*10 from v1|
select * from v2|
a
30
-select id, a from t1, v2|
+select id, a from t1, v2 order by id|
id a
a 30
b 30
@@ -1072,7 +1072,7 @@ lock tables t1 read, t1 as t11 read|
select f3()|
f3()
1
-select id, f3() from t1 as t11|
+select id, f3() from t1 as t11 order by id|
id f3()
a 1
b 1
@@ -1179,8 +1179,8 @@ drop function f12_2|
drop view v0|
drop view v1|
drop view v2|
-delete from t1 |
-delete from t2 |
+truncate table t1 |
+truncate table t2 |
drop table t4|
drop table if exists t3|
create table t3 (n int unsigned not null primary key, f bigint unsigned)|
@@ -1359,7 +1359,7 @@ f
1
1
2
-delete from t3|
+truncate table t3|
insert into t3 values (0), (1)|
call fib(10)|
select * from t3 order by f asc|
@@ -1497,10 +1497,10 @@ insert into t3 (a) values (1)|
create procedure h_ee()
deterministic
begin
-declare continue handler for 1062 -- ER_DUP_ENTRY
+declare continue handler for 1582 -- ER_DUP_ENTRY_WITH_KEY_NAME
select 'Outer (bad)' as 'h_ee';
begin
-declare continue handler for 1062 -- ER_DUP_ENTRY
+declare continue handler for 1582 -- ER_DUP_ENTRY_WITH_KEY_NAME
select 'Inner (good)' as 'h_ee';
insert into t3 values (1);
end;
@@ -1508,7 +1508,7 @@ end|
create procedure h_es()
deterministic
begin
-declare continue handler for 1062 -- ER_DUP_ENTRY
+declare continue handler for 1582 -- ER_DUP_ENTRY_WITH_KEY_NAME
select 'Outer (good)' as 'h_es';
begin
-- integrity constraint violation
@@ -1545,7 +1545,7 @@ end|
create procedure h_ex()
deterministic
begin
-declare continue handler for 1062 -- ER_DUP_ENTRY
+declare continue handler for 1582 -- ER_DUP_ENTRY_WITH_KEY_NAME
select 'Outer (good)' as 'h_ex';
begin
declare continue handler for sqlexception
@@ -1560,7 +1560,7 @@ begin
declare continue handler for sqlstate '23000'
select 'Outer (bad)' as 'h_se';
begin
-declare continue handler for 1062 -- ER_DUP_ENTRY
+declare continue handler for 1582 -- ER_DUP_ENTRY_WITH_KEY_NAME
select 'Inner (good)' as 'h_se';
insert into t3 values (1);
end;
@@ -1700,7 +1700,7 @@ begin
declare continue handler for sqlexception
select 'Outer (bad)' as 'h_xe';
begin
-declare continue handler for 1062 -- ER_DUP_ENTRY
+declare continue handler for 1582 -- ER_DUP_ENTRY_WITH_KEY_NAME
select 'Inner (good)' as 'h_xe';
insert into t3 values (1);
end;
@@ -1818,7 +1818,7 @@ delete from t1|
call bug822('foo', 42)|
call bug822('foo', 42)|
call bug822('bar', 666)|
-select * from t1|
+select * from t1 order by data|
id data
foo 42
bar 666
@@ -1841,7 +1841,7 @@ delete from t1 where id='foo'|
insert into t1 values ('bar', 7)|
call bug1495()|
delete from t1 where id='bar'|
-select * from t1|
+select * from t1 order by data|
id data
less 2
more 17
@@ -1861,10 +1861,10 @@ end|
insert into t1 values ("foo", 12), ("bar", 7)|
call bug1547("foo")|
call bug1547("bar")|
-select * from t1|
+select * from t1 order by id|
id data
-foo 12
bar 7
+foo 12
less 2
more 17
delete from t1|
@@ -1912,12 +1912,12 @@ insert into t2 values ("avg", 0, y);
end|
insert into t1 (data) values (3), (1), (5), (9), (4)|
call bug1874()|
-select * from t2|
+select * from t2 order by i|
s i d
-max 9 0
+avg 0 4.4
min 1 0
+max 9 0
sum 22 0
-avg 0 4.4
delete from t1|
delete from t2|
drop procedure bug1874|
@@ -2066,7 +2066,7 @@ drop procedure bug2776_2|
create table t3 (s1 smallint)|
insert into t3 values (123456789012)|
Warnings:
-Warning 1264 Out of range value adjusted for column 's1' at row 1
+Warning 1264 Out of range value for column 's1' at row 1
drop procedure if exists bug2780|
create procedure bug2780()
begin
@@ -2182,6 +2182,7 @@ set @stamped_time=in_time;
set x=2;
end if;
end|
+set time_zone='+03:00';
call bug3426(1000, @i)|
select @i, from_unixtime(@stamped_time, '%d-%m-%Y %h:%i:%s') as time|
@i time
@@ -2393,7 +2394,7 @@ create table t3 as select bug2773()|
show create table t3|
Table Create Table
t3 CREATE TABLE `t3` (
- `bug2773()` int(11) default NULL
+ `bug2773()` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t3|
drop function bug2773|
@@ -2454,7 +2455,7 @@ tinyint 1 -128 127 0 0 YES YES NO YES YES NO NULL,0 A very small integer
tinyint unsigned 1 0 255 0 0 YES YES YES YES YES NO NULL,0 A very small integer
Table Create Table
t1 CREATE TABLE `t1` (
- `id` char(16) NOT NULL default '',
+ `id` char(16) NOT NULL DEFAULT '',
`data` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
Database Create Database
@@ -2476,6 +2477,7 @@ Create view Tables To create new views
Create user Server Admin To create new users
Delete Tables To delete existing rows
Drop Databases,Tables To drop databases, tables, and views
+Event Server Admin To create, alter, drop and execute events
Execute Functions,Procedures To execute stored routines
File File access on server To read and write files on the server
Grant option Databases,Tables,Functions,Procedures To give to other users those privileges you possess
@@ -2492,6 +2494,7 @@ Show databases Server Admin To see all databases with SHOW DATABASES
Show view Tables To see views with SHOW CREATE VIEW
Shutdown Server Admin To shut down the server
Super Server Admin To use KILL thread, SET GLOBAL, CHANGE MASTER, etc.
+Trigger Tables To use triggers
Update Tables To update existing rows
Usage Server Admin No privileges - allow connect only
Variable_name Value
@@ -2506,7 +2509,7 @@ tinyint 1 -128 127 0 0 YES YES NO YES YES NO NULL,0 A very small integer
tinyint unsigned 1 0 255 0 0 YES YES YES YES YES NO NULL,0 A very small integer
Table Create Table
t1 CREATE TABLE `t1` (
- `id` char(16) NOT NULL default '',
+ `id` char(16) NOT NULL DEFAULT '',
`data` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
Database Create Database
@@ -2528,6 +2531,7 @@ Create view Tables To create new views
Create user Server Admin To create new users
Delete Tables To delete existing rows
Drop Databases,Tables To drop databases, tables, and views
+Event Server Admin To create, alter, drop and execute events
Execute Functions,Procedures To execute stored routines
File File access on server To read and write files on the server
Grant option Databases,Tables,Functions,Procedures To give to other users those privileges you possess
@@ -2544,6 +2548,7 @@ Show databases Server Admin To see all databases with SHOW DATABASES
Show view Tables To see views with SHOW CREATE VIEW
Shutdown Server Admin To shut down the server
Super Server Admin To use KILL thread, SET GLOBAL, CHANGE MASTER, etc.
+Trigger Tables To use triggers
Update Tables To update existing rows
Usage Server Admin No privileges - allow connect only
Variable_name Value
@@ -3620,12 +3625,18 @@ call bug11333(10)|
drop procedure bug11333|
drop table t3|
drop function if exists bug9048|
-create function bug9048(f1 char binary) returns char binary
+create function bug9048(f1 char binary) returns char
begin
set f1= concat( 'hello', f1 );
return f1;
end|
drop function bug9048|
+create function bug9048(f1 char binary) returns char binary
+begin
+set f1= concat( 'hello', f1 );
+return f1;
+end|
+ERROR 42000: This version of MySQL doesn't yet support 'return value collation'
drop procedure if exists bug12849_1|
create procedure bug12849_1(inout x char) select x into x|
set @var='a'|
@@ -3712,7 +3723,7 @@ begin
select bug12379();
end|
select bug12379()|
-ERROR 23000: Duplicate entry 'X' for key 1
+ERROR 23000: Duplicate entry 'X' for key 'PRIMARY'
select 1|
1
1
@@ -3729,7 +3740,7 @@ select 3|
3
3
call bug12379_3()|
-ERROR 23000: Duplicate entry 'X' for key 1
+ERROR 23000: Duplicate entry 'X' for key 'PRIMARY'
select 4|
4
4
@@ -3784,7 +3795,7 @@ s1
0
1
call bug6127()|
-ERROR 23000: Duplicate entry '0' for key 1
+ERROR 23000: Duplicate entry '0' for key 's1'
select * from t3|
s1
0
@@ -3823,20 +3834,20 @@ end|
call bug12589_1()|
Table Create Table
tm1 CREATE TEMPORARY TABLE `tm1` (
- `spv1` decimal(3,3) default NULL
+ `spv1` decimal(3,3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
Warnings:
-Warning 1264 Out of range value adjusted for column 'spv1' at row 1
+Warning 1264 Out of range value for column 'spv1' at row 1
Warning 1366 Incorrect decimal value: 'test' for column 'spv1' at row 1
call bug12589_2()|
Table Create Table
tm1 CREATE TEMPORARY TABLE `tm1` (
- `spv1` decimal(6,3) default NULL
+ `spv1` decimal(6,3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
call bug12589_3()|
Table Create Table
tm1 CREATE TEMPORARY TABLE `tm1` (
- `spv1` decimal(6,3) default NULL
+ `spv1` decimal(6,3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop procedure bug12589_1|
drop procedure bug12589_2|
@@ -4074,7 +4085,7 @@ select res;
end|
create table t3 (a int)|
insert into t3 values (0)|
-create view v1 as select a from t3;
+create view v1 as select a from t3|
create procedure bug10100pt(level int, lim int)
begin
if level < lim then
@@ -4095,7 +4106,7 @@ else
select * from v1;
end if;
end|
-prepare stmt2 from "select * from t3;";
+prepare stmt2 from "select * from t3;"|
create procedure bug10100pd(level int, lim int)
begin
if level < lim then
@@ -4422,6 +4433,8 @@ test.t3 analyze status Table is already up to date
test.v1 analyze error 'test.v1' is not BASE TABLE
Warnings:
Error 1347 'test.v1' is not BASE TABLE
+Error 1347 'test.v1' is not BASE TABLE
+Error 1347 'test.v1' is not BASE TABLE
call bug13012()|
Table Op Msg_type Msg_text
test.t1 repair status OK
@@ -4440,6 +4453,8 @@ test.t3 analyze status Table is already up to date
test.v1 analyze error 'test.v1' is not BASE TABLE
Warnings:
Error 1347 'test.v1' is not BASE TABLE
+Error 1347 'test.v1' is not BASE TABLE
+Error 1347 'test.v1' is not BASE TABLE
call bug13012()|
Table Op Msg_type Msg_text
test.t1 repair status OK
@@ -4458,9 +4473,11 @@ test.t3 analyze status Table is already up to date
test.v1 analyze error 'test.v1' is not BASE TABLE
Warnings:
Error 1347 'test.v1' is not BASE TABLE
+Error 1347 'test.v1' is not BASE TABLE
+Error 1347 'test.v1' is not BASE TABLE
drop procedure bug13012|
-drop view v1;
-select * from t1|
+drop view v1|
+select * from t1 order by data|
id data
aa 0
aa 1
@@ -4688,10 +4705,10 @@ insert into t3 values (1)|
create procedure bug15011()
deterministic
begin
-declare continue handler for 1062
+declare continue handler for 1582
select 'Outer' as 'Handler';
begin
-declare continue handler for 1062
+declare continue handler for 1582
select 'Inner' as 'Handler';
insert into t3 values (1);
end;
@@ -4776,22 +4793,6 @@ i
0
drop table t3|
drop procedure bug16887|
-create table t3 (f1 int, f2 varchar(3), primary key(f1)) engine=innodb|
-insert into t3 values (1,'aaa'),(2,'bbb'),(3,'ccc')|
-CREATE FUNCTION bug13575 ( p1 integer )
-returns varchar(3)
-BEGIN
-DECLARE v1 VARCHAR(10) DEFAULT null;
-SELECT f2 INTO v1 FROM t3 WHERE f1 = p1;
-RETURN v1;
-END|
-select distinct f1, bug13575(f1) from t3 order by f1|
-f1 bug13575(f1)
-1 aaa
-2 bbb
-3 ccc
-drop function bug13575;
-drop table t3|
drop procedure if exists bug16474_1|
drop procedure if exists bug16474_2|
delete from t1|
@@ -4799,7 +4800,7 @@ insert into t1 values ('c', 2), ('b', 3), ('a', 1)|
create procedure bug16474_1()
begin
declare x int;
-select id from t1 order by x;
+select id from t1 order by x, id;
end|
drop procedure if exists bug14945|
create table t3 (id int not null auto_increment primary key)|
@@ -4813,30 +4814,30 @@ id
drop table t3|
drop procedure bug14945|
create procedure bug16474_2(x int)
-select id from t1 order by x|
+select id from t1 order by x, id|
call bug16474_1()|
id
-c
-b
a
+b
+c
call bug16474_2(1)|
id
-c
-b
a
+b
+c
call bug16474_2(2)|
id
-c
-b
a
+b
+c
drop procedure bug16474_1|
drop procedure bug16474_2|
set @x = 2|
-select * from t1 order by @x|
+select * from t1 order by @x, data|
id data
+a 1
c 2
b 3
-a 1
delete from t1|
drop function if exists bug15728|
drop table if exists t3|
@@ -4898,7 +4899,7 @@ create table t3 as select bug12472() as i|
show create table t3|
Table Create Table
t3 CREATE TABLE `t3` (
- `i` int(11) default NULL
+ `i` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select * from t3|
i
@@ -4909,7 +4910,7 @@ create table t3 as select * from v1|
show create table t3|
Table Create Table
t3 CREATE TABLE `t3` (
- `j` int(11) default NULL
+ `j` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select * from t3|
j
@@ -5397,7 +5398,7 @@ drop database if exists това_е_дълго_име_за_база_данни_
create database това_е_дълго_име_за_база_данни_нали|
INSERT INTO mysql.proc VALUES ('това_е_дълго_име_за_база_данни_нали','това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго','PROCEDURE','това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго','SQL','CONTAINS_SQL','NO','DEFINER','','','bad_body','root@localhost',now(), now(),'','')|
call това_е_дълго_име_за_база_данни_нали.това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго()|
-ERROR HY000: Failed to load routine това_е_дълго_име_за_база_данни_нали.това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
+ERROR HY000: Failed to load routine това_е_дълго_име_за_база_данни_нали.. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
drop database това_е_дълго_име_за_база_данни_нали|
CREATE TABLE t3 (
Member_ID varchar(15) NOT NULL,
@@ -5616,24 +5617,114 @@ Called B
Called B
drop procedure proc_21462_a|
drop procedure proc_21462_b|
-drop table if exists t3|
-drop procedure if exists proc_bug19733|
-create table t3 (s1 int)|
-create procedure proc_bug19733()
-begin
-declare v int default 0;
-while v < 100 do
-create index i on t3 (s1);
-drop index i on t3;
-set v = v + 1;
-end while;
-end|
-call proc_bug19733()|
-call proc_bug19733()|
-call proc_bug19733()|
-drop procedure proc_bug19733|
-drop table t3|
End of 5.0 tests
+Begin of 5.1 tests
+drop function if exists pi;
+create function pi() returns varchar(50)
+return "pie, my favorite desert.";
+Warnings:
+Note 1581 This function 'pi' has the same name as a native function
+SET @save_sql_mode=@@sql_mode;
+SET SQL_MODE='IGNORE_SPACE';
+select pi(), pi ();
+pi() pi ()
+3.141593 3.141593
+select test.pi(), test.pi ();
+test.pi() test.pi ()
+pie, my favorite desert. pie, my favorite desert.
+SET SQL_MODE='';
+select pi(), pi ();
+pi() pi ()
+3.141593 3.141593
+select test.pi(), test.pi ();
+test.pi() test.pi ()
+pie, my favorite desert. pie, my favorite desert.
+SET @@sql_mode=@save_sql_mode;
+drop function pi;
+drop function if exists test.database;
+drop function if exists test.current_user;
+drop function if exists test.md5;
+create database nowhere;
+use nowhere;
+drop database nowhere;
+SET @save_sql_mode=@@sql_mode;
+SET SQL_MODE='IGNORE_SPACE';
+select database(), database ();
+database() database ()
+NULL NULL
+select current_user(), current_user ();
+current_user() current_user ()
+root@localhost root@localhost
+select md5("aaa"), md5 ("aaa");
+md5("aaa") md5 ("aaa")
+47bce5c74f589f4867dbd57e9ca9f808 47bce5c74f589f4867dbd57e9ca9f808
+SET SQL_MODE='';
+select database(), database ();
+database() database ()
+NULL NULL
+select current_user(), current_user ();
+current_user() current_user ()
+root@localhost root@localhost
+select md5("aaa"), md5 ("aaa");
+md5("aaa") md5 ("aaa")
+47bce5c74f589f4867dbd57e9ca9f808 47bce5c74f589f4867dbd57e9ca9f808
+use test;
+create function `database`() returns varchar(50)
+return "Stored function database";
+Warnings:
+Note 1581 This function 'database' has the same name as a native function
+create function `current_user`() returns varchar(50)
+return "Stored function current_user";
+Warnings:
+Note 1581 This function 'current_user' has the same name as a native function
+create function md5(x varchar(50)) returns varchar(50)
+return "Stored function md5";
+Warnings:
+Note 1581 This function 'md5' has the same name as a native function
+SET SQL_MODE='IGNORE_SPACE';
+select database(), database ();
+database() database ()
+test test
+select current_user(), current_user ();
+current_user() current_user ()
+root@localhost root@localhost
+select md5("aaa"), md5 ("aaa");
+md5("aaa") md5 ("aaa")
+47bce5c74f589f4867dbd57e9ca9f808 47bce5c74f589f4867dbd57e9ca9f808
+select test.database(), test.database ();
+test.database() test.database ()
+Stored function database Stored function database
+select test.current_user(), test.current_user ();
+test.current_user() test.current_user ()
+Stored function current_user Stored function current_user
+select test.md5("aaa"), test.md5 ("aaa");
+test.md5("aaa") test.md5 ("aaa")
+Stored function md5 Stored function md5
+SET SQL_MODE='';
+select database(), database ();
+database() database ()
+test test
+select current_user(), current_user ();
+current_user() current_user ()
+root@localhost root@localhost
+select md5("aaa"), md5 ("aaa");
+md5("aaa") md5 ("aaa")
+47bce5c74f589f4867dbd57e9ca9f808 47bce5c74f589f4867dbd57e9ca9f808
+select test.database(), test.database ();
+test.database() test.database ()
+Stored function database Stored function database
+select test.current_user(), test.current_user ();
+test.current_user() test.current_user ()
+Stored function current_user Stored function current_user
+select test.md5("aaa"), test.md5 ("aaa");
+test.md5("aaa") test.md5 ("aaa")
+Stored function md5 Stored function md5
+SET @@sql_mode=@save_sql_mode;
+drop function test.database;
+drop function test.current_user;
+drop function md5;
+use test;
+End of 5.1 tests
DROP TABLE IF EXISTS bug23760|
DROP TABLE IF EXISTS bug23760_log|
DROP PROCEDURE IF EXISTS bug23760_update_log|
@@ -5714,6 +5805,7 @@ bug23760_rc_test(ROW_COUNT())
DROP TABLE bug23760, bug23760_log|
DROP PROCEDURE bug23760_update_log|
DROP PROCEDURE bug23760_test_row_count|
+DROP PROCEDURE bug23760_test_row_count2|
DROP FUNCTION bug23760_rc_test|
DROP PROCEDURE IF EXISTS bug24117|
DROP TABLE IF EXISTS t3|