diff options
Diffstat (limited to 'mysql-test/r/sp.result')
-rw-r--r-- | mysql-test/r/sp.result | 600 |
1 files changed, 416 insertions, 184 deletions
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index 4a278cd4aec..4ac88b995dd 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -83,7 +83,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 @@ -196,7 +196,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 @@ -229,7 +229,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 @@ -248,7 +248,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))| @@ -256,7 +256,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 @@ -277,7 +277,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 @@ -291,7 +291,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 @@ -305,7 +305,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 @@ -328,7 +328,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 @@ -359,7 +359,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 @@ -378,7 +378,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 @@ -398,7 +398,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 @@ -418,7 +418,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 @@ -446,7 +446,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 @@ -456,8 +456,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 @@ -478,7 +478,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 @@ -492,7 +492,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 @@ -624,14 +624,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 @@ -750,8 +750,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; @@ -774,10 +774,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| @@ -792,11 +792,11 @@ sql security definer comment 'Characteristics procedure test' insert into t1 values ("chistics", 1)| show create procedure chistics| -Procedure sql_mode Create Procedure +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation chistics CREATE DEFINER=`root`@`localhost` PROCEDURE `chistics`() MODIFIES SQL DATA COMMENT 'Characteristics procedure test' -insert into t1 values ("chistics", 1) +insert into t1 values ("chistics", 1) latin1 latin1_swedish_ci latin1_swedish_ci call chistics()| select * from t1| id data @@ -804,12 +804,12 @@ chistics 1 delete from t1| alter procedure chistics sql security invoker| show create procedure chistics| -Procedure sql_mode Create Procedure +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation chistics CREATE DEFINER=`root`@`localhost` PROCEDURE `chistics`() MODIFIES SQL DATA SQL SECURITY INVOKER COMMENT 'Characteristics procedure test' -insert into t1 values ("chistics", 1) +insert into t1 values ("chistics", 1) latin1 latin1_swedish_ci latin1_swedish_ci drop procedure chistics| drop function if exists chistics| create function chistics() returns int @@ -819,12 +819,12 @@ sql security invoker comment 'Characteristics procedure test' return 42| show create function chistics| -Function sql_mode Create Function +Function sql_mode Create Function character_set_client collation_connection Database Collation chistics CREATE DEFINER=`root`@`localhost` FUNCTION `chistics`() RETURNS int(11) DETERMINISTIC SQL SECURITY INVOKER COMMENT 'Characteristics procedure test' -return 42 +return 42 latin1 latin1_swedish_ci latin1_swedish_ci select chistics()| chistics() 42 @@ -832,13 +832,13 @@ alter function chistics no sql comment 'Characteristics function test'| show create function chistics| -Function sql_mode Create Function +Function sql_mode Create Function character_set_client collation_connection Database Collation chistics CREATE DEFINER=`root`@`localhost` FUNCTION `chistics`() RETURNS int(11) NO SQL DETERMINISTIC SQL SECURITY INVOKER COMMENT 'Characteristics function test' -return 42 +return 42 latin1 latin1_swedish_ci latin1_swedish_ci drop function chistics| insert into t1 values ("foo", 1), ("bar", 2), ("zip", 3)| set @@sql_mode = 'ANSI'| @@ -940,16 +940,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 @@ -964,14 +964,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 @@ -980,7 +980,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 @@ -1013,7 +1013,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 @@ -1021,7 +1021,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 @@ -1032,7 +1032,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 @@ -1077,7 +1077,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 @@ -1184,8 +1184,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)| @@ -1228,12 +1228,12 @@ n f 20 2432902008176640000 drop table t3| show function status like '%f%'| -Db Name Type Definer Modified Created Security_type Comment -test fac FUNCTION root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +test fac FUNCTION root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER latin1 latin1_swedish_ci latin1_swedish_ci drop procedure ifac| drop function fac| show function status like '%f%'| -Db Name Type Definer Modified Created Security_type Comment +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation drop table if exists t3| create table t3 ( i int unsigned not null primary key, @@ -1295,7 +1295,7 @@ end; end while; end| show create procedure opp| -Procedure sql_mode Create Procedure +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation opp CREATE DEFINER=`root`@`localhost` PROCEDURE `opp`(n bigint unsigned, out pp bool) begin declare r double; @@ -1321,11 +1321,11 @@ set s = s+1; end; end if; end loop; -end +end latin1 latin1_swedish_ci latin1_swedish_ci show procedure status like '%p%'| -Db Name Type Definer Modified Created Security_type Comment -test ip PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER -test opp PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +test ip PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER latin1 latin1_swedish_ci latin1_swedish_ci +test opp PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER latin1 latin1_swedish_ci latin1_swedish_ci call ip(200)| select * from t3 where i=45 or i=100 or i=199| i p @@ -1336,7 +1336,7 @@ drop table t3| drop procedure opp| drop procedure ip| show procedure status like '%p%'| -Db Name Type Definer Modified Created Security_type Comment +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation drop table if exists t3| create table t3 ( f bigint unsigned not null )| drop procedure if exists fib| @@ -1364,7 +1364,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| @@ -1388,19 +1388,19 @@ create procedure bar(x char(16), y int) comment "111111111111" sql security invoker insert into test.t1 values (x, y)| show procedure status like 'bar'| -Db Name Type Definer Modified Created Security_type Comment -test bar PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 INVOKER 111111111111 +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +test bar PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 INVOKER 111111111111 latin1 latin1_swedish_ci latin1_swedish_ci alter procedure bar comment "2222222222" sql security definer| alter procedure bar comment "3333333333"| alter procedure bar| show create procedure bar| -Procedure sql_mode Create Procedure +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation bar CREATE DEFINER=`root`@`localhost` PROCEDURE `bar`(x char(16), y int) COMMENT '3333333333' -insert into test.t1 values (x, y) +insert into test.t1 values (x, y) latin1 latin1_swedish_ci latin1_swedish_ci show procedure status like 'bar'| -Db Name Type Definer Modified Created Security_type Comment -test bar PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER 3333333333 +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +test bar PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER 3333333333 latin1 latin1_swedish_ci latin1_swedish_ci drop procedure bar| drop procedure if exists p1| create procedure p1 () @@ -1823,7 +1823,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 @@ -1846,7 +1846,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 @@ -1866,10 +1866,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| @@ -1917,12 +1917,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| @@ -1965,24 +1965,24 @@ show create function bug2267_4; end| create function bug2267_4() returns int return 100| call bug2267_1()| -Db Name Type Definer Modified Created Security_type Comment -test bug2267_1 PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER -test bug2267_2 PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER -test bug2267_3 PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER -test bug2267_4 PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +test bug2267_1 PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER latin1 latin1_swedish_ci latin1_swedish_ci +test bug2267_2 PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER latin1 latin1_swedish_ci latin1_swedish_ci +test bug2267_3 PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER latin1 latin1_swedish_ci latin1_swedish_ci +test bug2267_4 PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER latin1 latin1_swedish_ci latin1_swedish_ci call bug2267_2()| -Db Name Type Definer Modified Created Security_type Comment -test bug2267_4 FUNCTION root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +test bug2267_4 FUNCTION root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER latin1 latin1_swedish_ci latin1_swedish_ci call bug2267_3()| -Procedure sql_mode Create Procedure +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation bug2267_1 CREATE DEFINER=`root`@`localhost` PROCEDURE `bug2267_1`() begin show procedure status; -end +end latin1 latin1_swedish_ci latin1_swedish_ci call bug2267_4()| -Function sql_mode Create Function +Function sql_mode Create Function character_set_client collation_connection Database Collation bug2267_4 CREATE DEFINER=`root`@`localhost` FUNCTION `bug2267_4`() RETURNS int(11) -return 100 +return 100 latin1 latin1_swedish_ci latin1_swedish_ci drop procedure bug2267_1| drop procedure bug2267_2| drop procedure bug2267_3| @@ -2071,7 +2071,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 @@ -2187,6 +2187,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 @@ -2312,22 +2313,22 @@ create function bug2564_4(x int, y int) returns int return x || y$ set @@sql_mode = ''| show create procedure bug2564_1| -Procedure sql_mode Create Procedure +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation bug2564_1 CREATE DEFINER=`root`@`localhost` PROCEDURE `bug2564_1`() COMMENT 'Joe''s procedure' -insert into `t1` values ("foo", 1) +insert into `t1` values ("foo", 1) latin1 latin1_swedish_ci latin1_swedish_ci show create procedure bug2564_2| -Procedure sql_mode Create Procedure +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation bug2564_2 ANSI_QUOTES CREATE DEFINER="root"@"localhost" PROCEDURE "bug2564_2"() -insert into "t1" values ('foo', 1) +insert into "t1" values ('foo', 1) latin1 latin1_swedish_ci latin1_swedish_ci show create function bug2564_3| -Function sql_mode Create Function +Function sql_mode Create Function character_set_client collation_connection Database Collation bug2564_3 CREATE DEFINER=`root`@`localhost` FUNCTION `bug2564_3`(x int, y int) RETURNS int(11) -return x || y +return x || y latin1 latin1_swedish_ci latin1_swedish_ci show create function bug2564_4| -Function sql_mode Create Function +Function sql_mode Create Function character_set_client collation_connection Database Collation bug2564_4 REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI CREATE DEFINER="root"@"localhost" FUNCTION "bug2564_4"(x int, y int) RETURNS int(11) -return x || y +return x || y latin1 latin1_swedish_ci latin1_swedish_ci drop procedure bug2564_1| drop procedure bug2564_2| drop function bug2564_3| @@ -2398,7 +2399,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| @@ -2459,7 +2460,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 @@ -2481,6 +2482,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 @@ -2497,6 +2499,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 @@ -2511,7 +2514,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 @@ -2533,6 +2536,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 @@ -2549,6 +2553,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 @@ -3625,12 +3630,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'| @@ -3717,7 +3728,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 @@ -3734,7 +3745,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 @@ -3789,7 +3800,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 @@ -3828,20 +3839,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| @@ -3993,11 +4004,11 @@ main_loop: begin return 42; end */;; show create function bug14723;; -Function sql_mode Create Function +Function sql_mode Create Function character_set_client collation_connection Database Collation bug14723 CREATE DEFINER=`root`@`localhost` FUNCTION `bug14723`() RETURNS bigint(20) main_loop: begin return 42; -end +end latin1 latin1_swedish_ci latin1_swedish_ci select bug14723();; bug14723() 42 @@ -4006,11 +4017,11 @@ main_loop: begin select 42; end */;; show create procedure bug14723;; -Procedure sql_mode Create Procedure +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation bug14723 CREATE DEFINER=`root`@`localhost` PROCEDURE `bug14723`() main_loop: begin select 42; -end +end latin1 latin1_swedish_ci latin1_swedish_ci call bug14723();; 42 42 @@ -4079,7 +4090,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 @@ -4100,7 +4111,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 @@ -4398,8 +4409,10 @@ call bug13012()| Table Op Msg_type Msg_text test.t1 repair status OK Table Op Msg_type Msg_text +test.t1 backup Warning The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead test.t1 backup status OK Table Op Msg_type Msg_text +test.t1 restore Warning The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead test.t1 restore status OK drop procedure bug13012| create view v1 as select * from t1| @@ -4467,8 +4480,8 @@ test.t3 analyze status Table is already up to date test.v1 analyze Error 'test.v1' is not BASE TABLE test.v1 analyze error Corrupt drop procedure bug13012| -drop view v1; -select * from t1| +drop view v1| +select * from t1 order by data| id data aa 0 aa 1 @@ -4784,22 +4797,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| @@ -4807,7 +4804,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)| @@ -4821,30 +4818,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| @@ -4906,7 +4903,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 @@ -4917,7 +4914,7 @@ create table t3 as select * from v1| show create table t3| Table Create Table t3 CREATE TABLE `t3` ( - `j` bigint(11) default NULL + `j` bigint(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select * from t3| j @@ -5079,21 +5076,21 @@ RETURN ""| CREATE FUNCTION mysqltest2.bug16211_f4() RETURNS CHAR(10) CHARSET koi8r RETURN ""| SHOW CREATE FUNCTION bug16211_f1| -Function sql_mode Create Function +Function sql_mode Create Function character_set_client collation_connection Database Collation bug16211_f1 CREATE DEFINER=`root`@`localhost` FUNCTION `bug16211_f1`() RETURNS char(10) CHARSET utf8 -RETURN "" +RETURN "" latin1 latin1_swedish_ci utf8_general_ci SHOW CREATE FUNCTION bug16211_f2| -Function sql_mode Create Function +Function sql_mode Create Function character_set_client collation_connection Database Collation bug16211_f2 CREATE DEFINER=`root`@`localhost` FUNCTION `bug16211_f2`() RETURNS char(10) CHARSET koi8r -RETURN "" +RETURN "" latin1 latin1_swedish_ci utf8_general_ci SHOW CREATE FUNCTION mysqltest2.bug16211_f3| -Function sql_mode Create Function +Function sql_mode Create Function character_set_client collation_connection Database Collation bug16211_f3 CREATE DEFINER=`root`@`localhost` FUNCTION `bug16211_f3`() RETURNS char(10) CHARSET utf8 -RETURN "" +RETURN "" latin1 latin1_swedish_ci utf8_general_ci SHOW CREATE FUNCTION mysqltest2.bug16211_f4| -Function sql_mode Create Function +Function sql_mode Create Function character_set_client collation_connection Database Collation bug16211_f4 CREATE DEFINER=`root`@`localhost` FUNCTION `bug16211_f4`() RETURNS char(10) CHARSET koi8r -RETURN "" +RETURN "" latin1 latin1_swedish_ci utf8_general_ci SELECT dtd_identifier FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_SCHEMA = "mysqltest1" AND ROUTINE_NAME = "bug16211_f1"| @@ -5129,21 +5126,21 @@ koi8r ALTER DATABASE mysqltest1 CHARACTER SET cp1251| ALTER DATABASE mysqltest2 CHARACTER SET cp1251| SHOW CREATE FUNCTION bug16211_f1| -Function sql_mode Create Function +Function sql_mode Create Function character_set_client collation_connection Database Collation bug16211_f1 CREATE DEFINER=`root`@`localhost` FUNCTION `bug16211_f1`() RETURNS char(10) CHARSET utf8 -RETURN "" +RETURN "" latin1 latin1_swedish_ci utf8_general_ci SHOW CREATE FUNCTION bug16211_f2| -Function sql_mode Create Function +Function sql_mode Create Function character_set_client collation_connection Database Collation bug16211_f2 CREATE DEFINER=`root`@`localhost` FUNCTION `bug16211_f2`() RETURNS char(10) CHARSET koi8r -RETURN "" +RETURN "" latin1 latin1_swedish_ci utf8_general_ci SHOW CREATE FUNCTION mysqltest2.bug16211_f3| -Function sql_mode Create Function +Function sql_mode Create Function character_set_client collation_connection Database Collation bug16211_f3 CREATE DEFINER=`root`@`localhost` FUNCTION `bug16211_f3`() RETURNS char(10) CHARSET utf8 -RETURN "" +RETURN "" latin1 latin1_swedish_ci utf8_general_ci SHOW CREATE FUNCTION mysqltest2.bug16211_f4| -Function sql_mode Create Function +Function sql_mode Create Function character_set_client collation_connection Database Collation bug16211_f4 CREATE DEFINER=`root`@`localhost` FUNCTION `bug16211_f4`() RETURNS char(10) CHARSET koi8r -RETURN "" +RETURN "" latin1 latin1_swedish_ci utf8_general_ci SELECT dtd_identifier FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_SCHEMA = "mysqltest1" AND ROUTINE_NAME = "bug16211_f1"| @@ -5388,9 +5385,9 @@ ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghi drop procedure if exists bug21416| create procedure bug21416() show create procedure bug21416| call bug21416()| -Procedure sql_mode Create Procedure +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation bug21416 CREATE DEFINER=`root`@`localhost` PROCEDURE `bug21416`() -show create procedure bug21416 +show create procedure bug21416 latin1 latin1_swedish_ci latin1_swedish_ci drop procedure bug21416| DROP PROCEDURE IF EXISTS bug21414| CREATE PROCEDURE bug21414() SELECT 1| @@ -5403,7 +5400,7 @@ DROP PROCEDURE bug21414| set names utf8| drop database if exists това_е_дълго_име_за_база_данни_нали| create database това_е_дълго_име_за_база_данни_нали| -INSERT INTO mysql.proc VALUES ('това_е_дълго_име_за_база_данни_нали','това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго','PROCEDURE','това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго','SQL','CONTAINS_SQL','NO','DEFINER','','','bad_body','root@localhost',now(), now(),'','')| +INSERT INTO mysql.proc VALUES ('това_е_дълго_име_за_база_данни_нали','това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго','PROCEDURE','това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго','SQL','CONTAINS_SQL','NO','DEFINER','','','bad_body','root@localhost',now(), now(),'','', 'utf8', 'utf8_general_ci', 'utf8_general_ci', 'n/a')| call това_е_дълго_име_за_база_данни_нали.това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго()| ERROR HY000: Failed to load routine това_е_дълго_име_за_база_данни_нали.това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6) drop database това_е_дълго_име_за_база_данни_нали| @@ -5668,6 +5665,113 @@ DROP PROCEDURE p1| DROP VIEW v1, v2| DROP TABLE t3, t4| 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 1582 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 1582 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 1582 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 1582 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| @@ -5748,6 +5852,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| @@ -6027,7 +6132,7 @@ select bug20777(-9223372036854775808) as 'lower bounds signed bigint'; lower bounds signed bigint 0 Warnings: -Warning 1264 Out of range value adjusted for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 select bug20777(9223372036854775807) as 'upper bounds signed bigint'; upper bounds signed bigint 9223372036854775807 @@ -6041,12 +6146,12 @@ select bug20777(18446744073709551616) as 'upper bounds unsigned bigint + 1'; upper bounds unsigned bigint + 1 18446744073709551615 Warnings: -Warning 1264 Out of range value adjusted for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 select bug20777(-1) as 'lower bounds unsigned bigint - 1'; lower bounds unsigned bigint - 1 0 Warnings: -Warning 1264 Out of range value adjusted for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 create table examplebug20777 as select 0 as 'i', bug20777(9223372036854775806) as '2**63-2', @@ -6059,24 +6164,24 @@ bug20777(18446744073709551616) as '2**64', bug20777(0) as '0', bug20777(-1) as '-1'; Warnings: -Warning 1264 Out of range value adjusted for column 'f1' at row 1 -Warning 1264 Out of range value adjusted for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 insert into examplebug20777 values (1, 9223372036854775806, 9223372036854775807, 223372036854775808, 9223372036854775809, 18446744073709551614, 18446744073709551615, 8446744073709551616, 0, -1); Warnings: -Warning 1264 Out of range value adjusted for column '-1' at row 1 +Warning 1264 Out of range value for column '-1' at row 1 show create table examplebug20777; Table Create Table examplebug20777 CREATE TABLE `examplebug20777` ( - `i` int(1) NOT NULL default '0', - `2**63-2` bigint(20) unsigned default NULL, - `2**63-1` bigint(20) unsigned default NULL, - `2**63` bigint(20) unsigned default NULL, - `2**63+1` bigint(20) unsigned default NULL, - `2**64-2` bigint(20) unsigned default NULL, - `2**64-1` bigint(20) unsigned default NULL, - `2**64` bigint(20) unsigned default NULL, - `0` bigint(20) unsigned default NULL, - `-1` bigint(20) unsigned default NULL + `i` int(1) NOT NULL DEFAULT '0', + `2**63-2` bigint(20) unsigned DEFAULT NULL, + `2**63-1` bigint(20) unsigned DEFAULT NULL, + `2**63` bigint(20) unsigned DEFAULT NULL, + `2**63+1` bigint(20) unsigned DEFAULT NULL, + `2**64-2` bigint(20) unsigned DEFAULT NULL, + `2**64-1` bigint(20) unsigned DEFAULT NULL, + `2**64` bigint(20) unsigned DEFAULT NULL, + `0` bigint(20) unsigned DEFAULT NULL, + `-1` bigint(20) unsigned DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select * from examplebug20777 order by i; i 2**63-2 2**63-1 2**63 2**63+1 2**64-2 2**64-1 2**64 0 -1 @@ -6140,9 +6245,9 @@ DROP FUNCTION bug5274_f2| drop procedure if exists proc_21513| create procedure proc_21513()`my_label`:BEGIN END| show create procedure proc_21513| -Procedure sql_mode Create Procedure +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation proc_21513 CREATE DEFINER=`root`@`localhost` PROCEDURE `proc_21513`() -`my_label`:BEGIN END +`my_label`:BEGIN END utf8 utf8_general_ci latin1_swedish_ci drop procedure proc_21513| End of 5.0 tests. drop table t1,t2; @@ -6176,8 +6281,8 @@ INSERT INTO t1 VALUES (1),(2); CREATE FUNCTION metered(a INT) RETURNS INT RETURN 12; CREATE VIEW v1 AS SELECT test.metered(a) as metered FROM t1; SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `test`.`metered`(`t1`.`a`) AS `metered` from `t1` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `test`.`metered`(`t1`.`a`) AS `metered` from `t1` utf8 utf8_general_ci DROP VIEW v1; DROP FUNCTION metered; DROP TABLE t1; @@ -6273,6 +6378,144 @@ Level Code Message use test; drop procedure sp_bug29050; drop table t1; +SET NAMES latin1; +CREATE PROCEDURE p1() +BEGIN +DECLARE INT; +SELECT ; +END| +CALL p1(); + +NULL +SET NAMES default; +DROP PROCEDURE p1; +drop procedure if exists proc_25411_a; +drop procedure if exists proc_25411_b; +drop procedure if exists proc_25411_c; +create procedure proc_25411_a() +begin +/* real comment */ +select 1; +/*! select 2; */ +select 3; +/*!00000 select 4; */ +/*!99999 select 5; */ +end +$$ +create procedure proc_25411_b( +/* real comment */ +/*! p1 int, */ +/*!00000 p2 int */ +/*!99999 ,p3 int */ +) +begin +select p1, p2; +end +$$ +create procedure proc_25411_c() +begin +select 1/*!,2*//*!00000,3*//*!99999,4*/; +select 1/*! ,2*//*!00000 ,3*//*!99999 ,4*/; +select 1/*!,2 *//*!00000,3 *//*!99999,4 */; +select 1/*! ,2 *//*!00000 ,3 *//*!99999 ,4 */; +select 1 /*!,2*/ /*!00000,3*/ /*!99999,4*/ ; +end +$$ +show create procedure proc_25411_a; +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +proc_25411_a CREATE DEFINER=`root`@`localhost` PROCEDURE `proc_25411_a`() +begin +/* real comment */ +select 1; + select 2; +select 3; + select 4; + +end utf8 utf8_general_ci latin1_swedish_ci +call proc_25411_a(); +1 +1 +2 +2 +3 +3 +4 +4 +show create procedure proc_25411_b; +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +proc_25411_b CREATE DEFINER=`root`@`localhost` PROCEDURE `proc_25411_b`( +/* real comment */ + p1 int, + p2 int + +) +begin +select p1, p2; +end utf8 utf8_general_ci latin1_swedish_ci +select name, param_list, body from mysql.proc where name like "%25411%"; +name param_list body +proc_25411_a begin +/* real comment */ +select 1; + select 2; +select 3; + select 4; + +end +proc_25411_b +/* real comment */ + p1 int, + p2 int + + begin +select p1, p2; +end +proc_25411_c begin +select 1,2,3; +select 1 ,2 ,3; +select 1,2 ,3 ; +select 1 ,2 ,3 ; +select 1 ,2 ,3 ; +end +call proc_25411_b(10, 20); +p1 p2 +10 20 +show create procedure proc_25411_c; +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +proc_25411_c CREATE DEFINER=`root`@`localhost` PROCEDURE `proc_25411_c`() +begin +select 1,2,3; +select 1 ,2 ,3; +select 1,2 ,3 ; +select 1 ,2 ,3 ; +select 1 ,2 ,3 ; +end utf8 utf8_general_ci latin1_swedish_ci +call proc_25411_c(); +1 2 3 +1 2 3 +1 2 3 +1 2 3 +1 2 3 +1 2 3 +1 2 3 +1 2 3 +1 2 3 +1 2 3 +drop procedure proc_25411_a; +drop procedure proc_25411_b; +drop procedure proc_25411_c; +drop procedure if exists proc_26302; +create procedure proc_26302() +select 1 /* testing */; +show create procedure proc_26302; +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +proc_26302 CREATE DEFINER=`root`@`localhost` PROCEDURE `proc_26302`() +select 1 /* testing */ utf8 utf8_general_ci latin1_swedish_ci +select ROUTINE_NAME, ROUTINE_DEFINITION from information_schema.ROUTINES +where ROUTINE_NAME = "proc_26302"; +ROUTINE_NAME ROUTINE_DEFINITION +proc_26302 select 1 /* testing */ +drop procedure proc_26302; CREATE FUNCTION f1() RETURNS INT DETERMINISTIC RETURN 2; CREATE FUNCTION f2(I INT) RETURNS INT DETERMINISTIC RETURN 3; CREATE TABLE t1 (c1 INT, INDEX(c1)); @@ -6303,15 +6546,4 @@ DROP VIEW v1; DROP FUNCTION f1; DROP FUNCTION f2; DROP TABLE t1; -SET NAMES latin1; -CREATE PROCEDURE p1() -BEGIN -DECLARE INT; -SELECT ; -END| -CALL p1(); - -NULL -SET NAMES default; -DROP PROCEDURE p1; End of 5.0 tests |