Loading mysql-test/r/ndb_read_multi_range.result +104 −0 Original line number Diff line number Diff line Loading @@ -263,3 +263,107 @@ a b c d 10 10 10 10 drop table t2; drop table t1; CREATE TABLE t1 ( a int(11) NOT NULL, b int(11) NOT NULL, c datetime default NULL, PRIMARY KEY (a), KEY idx_bc (b,c) ) ENGINE=ndbcluster; INSERT INTO t1 VALUES (406989,67,'2006-02-23 17:08:46'), (150078,67,'2005-10-26 11:17:45'), (406993,67,'2006-02-27 11:20:57'), (245655,67,'2005-12-08 15:59:08'), (406994,67,'2006-02-27 11:26:46'), (256,67,NULL), (398341,67,'2006-02-20 04:48:44'), (254,67,NULL),(1120,67,NULL), (406988,67,'2006-02-23 17:07:22'), (255,67,NULL), (398340,67,'2006-02-20 04:38:53'),(406631,67,'2006-02-23 10:49:42'), (245653,67,'2005-12-08 15:59:07'),(406992,67,'2006-02-24 16:47:18'), (245654,67,'2005-12-08 15:59:08'),(406995,67,'2006-02-28 11:55:00'), (127261,67,'2005-10-13 12:17:58'),(406991,67,'2006-02-24 16:42:32'), (245652,67,'2005-12-08 15:58:27'),(398545,67,'2006-02-20 04:53:13'), (154504,67,'2005-10-28 11:53:01'),(9199,67,NULL),(1,67,'2006-02-23 15:01:35'), (223456,67,NULL),(4101,67,NULL),(1133,67,NULL), (406990,67,'2006-02-23 18:01:45'),(148815,67,'2005-10-25 15:34:17'), (148812,67,'2005-10-25 15:30:01'),(245651,67,'2005-12-08 15:58:27'), (154503,67,'2005-10-28 11:52:38'); create table t11 select * from t1 where b = 67 AND (c IS NULL OR c > NOW()) order by 3 asc; create table t12 select * from t1 where b = 67 AND (c IS NULL OR c > NOW()) order by 3 desc; create table t21 select * from t1 where b = 67 AND (c IS NULL OR c > '2005-12-08') order by 3 asc; create table t22 select * from t1 where b = 67 AND (c IS NULL OR c > '2005-12-08') order by 3 desc; select * from t11 order by 1,2,3; a b c 254 67 NULL 255 67 NULL 256 67 NULL 1120 67 NULL 1133 67 NULL 4101 67 NULL 9199 67 NULL 223456 67 NULL select * from t12 order by 1,2,3; a b c 254 67 NULL 255 67 NULL 256 67 NULL 1120 67 NULL 1133 67 NULL 4101 67 NULL 9199 67 NULL 223456 67 NULL select * from t21 order by 1,2,3; a b c 1 67 2006-02-23 15:01:35 254 67 NULL 255 67 NULL 256 67 NULL 1120 67 NULL 1133 67 NULL 4101 67 NULL 9199 67 NULL 223456 67 NULL 245651 67 2005-12-08 15:58:27 245652 67 2005-12-08 15:58:27 245653 67 2005-12-08 15:59:07 245654 67 2005-12-08 15:59:08 245655 67 2005-12-08 15:59:08 398340 67 2006-02-20 04:38:53 398341 67 2006-02-20 04:48:44 398545 67 2006-02-20 04:53:13 406631 67 2006-02-23 10:49:42 406988 67 2006-02-23 17:07:22 406989 67 2006-02-23 17:08:46 406990 67 2006-02-23 18:01:45 406991 67 2006-02-24 16:42:32 406992 67 2006-02-24 16:47:18 406993 67 2006-02-27 11:20:57 406994 67 2006-02-27 11:26:46 406995 67 2006-02-28 11:55:00 select * from t22 order by 1,2,3; a b c 1 67 2006-02-23 15:01:35 254 67 NULL 255 67 NULL 256 67 NULL 1120 67 NULL 1133 67 NULL 4101 67 NULL 9199 67 NULL 223456 67 NULL 245651 67 2005-12-08 15:58:27 245652 67 2005-12-08 15:58:27 245653 67 2005-12-08 15:59:07 245654 67 2005-12-08 15:59:08 245655 67 2005-12-08 15:59:08 398340 67 2006-02-20 04:38:53 398341 67 2006-02-20 04:48:44 398545 67 2006-02-20 04:53:13 406631 67 2006-02-23 10:49:42 406988 67 2006-02-23 17:07:22 406989 67 2006-02-23 17:08:46 406990 67 2006-02-23 18:01:45 406991 67 2006-02-24 16:42:32 406992 67 2006-02-24 16:47:18 406993 67 2006-02-27 11:20:57 406994 67 2006-02-27 11:26:46 406995 67 2006-02-28 11:55:00 DROP TABLE t1, t11, t12, t21, t22; mysql-test/r/ps.result +46 −0 Original line number Diff line number Diff line Loading @@ -880,3 +880,49 @@ select row_count(); row_count() 1 drop table t1; create table t1 (a int, b int); insert into t1 (a,b) values (2,8),(1,9),(3,7); prepare stmt from "select * from t1 order by ?"; execute stmt using @a; a b 2 8 1 9 3 7 set @a=1; execute stmt using @a; a b 1 9 2 8 3 7 set @a=2; execute stmt using @a; a b 3 7 2 8 1 9 deallocate prepare stmt; select * from t1 order by 1; a b 1 9 2 8 3 7 prepare stmt from "select * from t1 order by ?+1"; set @a=0; execute stmt using @a; a b 2 8 1 9 3 7 set @a=1; execute stmt using @a; a b 2 8 1 9 3 7 deallocate prepare stmt; select * from t1 order by 1+1; a b 2 8 1 9 3 7 drop table t1; mysql-test/r/sp-error.result +10 −2 Original line number Diff line number Diff line Loading @@ -634,10 +634,18 @@ flush tables; return 5; end| ERROR 0A000: FLUSH is not allowed in stored function or trigger create procedure bug9529_90123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123() create procedure bug9529_901234567890123456789012345678901234567890123456789012345() begin end| ERROR 42000: Identifier name 'bug9529_90123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890' is too long ERROR 42000: Identifier name 'bug9529_901234567890123456789012345678901234567890123456789012345' is too long drop procedure if exists bug17015_0123456789012345678901234567890123456789012345678901234| create procedure bug17015_0123456789012345678901234567890123456789012345678901234() begin end| show procedure status like 'bug17015%'| Db Name Type Definer Modified Created Security_type Comment test bug17015_0123456789012345678901234567890123456789012345678901234 PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER drop procedure bug17015_0123456789012345678901234567890123456789012345678901234| drop procedure if exists bug10969| create procedure bug10969() begin Loading mysql-test/r/sp-prelocking.result +23 −0 Original line number Diff line number Diff line Loading @@ -214,3 +214,26 @@ drop function f1; drop function f2; drop function f3; drop procedure sp1; drop table if exists t1; drop view if exists v1, v2, v3; drop function if exists bug15683; create table t1 (f1 bigint, f2 varchar(20), f3 bigint); insert into t1 set f1 = 1, f2 = 'schoenenbourg', f3 = 1; create view v1 as select 1 from t1 union all select 1; create view v2 as select 1 from v1; create view v3 as select 1 as f1 from v2; create function bug15683() returns bigint begin return (select count(*) from v3); end| prepare stmt from "select bug15683()"; execute stmt; bug15683() 2 execute stmt; bug15683() 2 deallocate prepare stmt; drop table t1; drop view v1, v2, v3; drop function bug15683; mysql-test/r/sp.result +35 −0 Original line number Diff line number Diff line Loading @@ -4812,4 +4812,39 @@ f1 bug13575(f1) 3 ccc drop function bug13575; drop table t3| drop procedure if exists bug16474_1| drop procedure if exists bug16474_2| delete from t1| 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; end| create procedure bug16474_2(x int) select id from t1 order by x| call bug16474_1()| id c b a call bug16474_2(1)| id c b a call bug16474_2(2)| id c b a drop procedure bug16474_1| drop procedure bug16474_2| set @x = 2| select * from t1 order by @x| id data c 2 b 3 a 1 delete from t1| drop table t1,t2; Loading
mysql-test/r/ndb_read_multi_range.result +104 −0 Original line number Diff line number Diff line Loading @@ -263,3 +263,107 @@ a b c d 10 10 10 10 drop table t2; drop table t1; CREATE TABLE t1 ( a int(11) NOT NULL, b int(11) NOT NULL, c datetime default NULL, PRIMARY KEY (a), KEY idx_bc (b,c) ) ENGINE=ndbcluster; INSERT INTO t1 VALUES (406989,67,'2006-02-23 17:08:46'), (150078,67,'2005-10-26 11:17:45'), (406993,67,'2006-02-27 11:20:57'), (245655,67,'2005-12-08 15:59:08'), (406994,67,'2006-02-27 11:26:46'), (256,67,NULL), (398341,67,'2006-02-20 04:48:44'), (254,67,NULL),(1120,67,NULL), (406988,67,'2006-02-23 17:07:22'), (255,67,NULL), (398340,67,'2006-02-20 04:38:53'),(406631,67,'2006-02-23 10:49:42'), (245653,67,'2005-12-08 15:59:07'),(406992,67,'2006-02-24 16:47:18'), (245654,67,'2005-12-08 15:59:08'),(406995,67,'2006-02-28 11:55:00'), (127261,67,'2005-10-13 12:17:58'),(406991,67,'2006-02-24 16:42:32'), (245652,67,'2005-12-08 15:58:27'),(398545,67,'2006-02-20 04:53:13'), (154504,67,'2005-10-28 11:53:01'),(9199,67,NULL),(1,67,'2006-02-23 15:01:35'), (223456,67,NULL),(4101,67,NULL),(1133,67,NULL), (406990,67,'2006-02-23 18:01:45'),(148815,67,'2005-10-25 15:34:17'), (148812,67,'2005-10-25 15:30:01'),(245651,67,'2005-12-08 15:58:27'), (154503,67,'2005-10-28 11:52:38'); create table t11 select * from t1 where b = 67 AND (c IS NULL OR c > NOW()) order by 3 asc; create table t12 select * from t1 where b = 67 AND (c IS NULL OR c > NOW()) order by 3 desc; create table t21 select * from t1 where b = 67 AND (c IS NULL OR c > '2005-12-08') order by 3 asc; create table t22 select * from t1 where b = 67 AND (c IS NULL OR c > '2005-12-08') order by 3 desc; select * from t11 order by 1,2,3; a b c 254 67 NULL 255 67 NULL 256 67 NULL 1120 67 NULL 1133 67 NULL 4101 67 NULL 9199 67 NULL 223456 67 NULL select * from t12 order by 1,2,3; a b c 254 67 NULL 255 67 NULL 256 67 NULL 1120 67 NULL 1133 67 NULL 4101 67 NULL 9199 67 NULL 223456 67 NULL select * from t21 order by 1,2,3; a b c 1 67 2006-02-23 15:01:35 254 67 NULL 255 67 NULL 256 67 NULL 1120 67 NULL 1133 67 NULL 4101 67 NULL 9199 67 NULL 223456 67 NULL 245651 67 2005-12-08 15:58:27 245652 67 2005-12-08 15:58:27 245653 67 2005-12-08 15:59:07 245654 67 2005-12-08 15:59:08 245655 67 2005-12-08 15:59:08 398340 67 2006-02-20 04:38:53 398341 67 2006-02-20 04:48:44 398545 67 2006-02-20 04:53:13 406631 67 2006-02-23 10:49:42 406988 67 2006-02-23 17:07:22 406989 67 2006-02-23 17:08:46 406990 67 2006-02-23 18:01:45 406991 67 2006-02-24 16:42:32 406992 67 2006-02-24 16:47:18 406993 67 2006-02-27 11:20:57 406994 67 2006-02-27 11:26:46 406995 67 2006-02-28 11:55:00 select * from t22 order by 1,2,3; a b c 1 67 2006-02-23 15:01:35 254 67 NULL 255 67 NULL 256 67 NULL 1120 67 NULL 1133 67 NULL 4101 67 NULL 9199 67 NULL 223456 67 NULL 245651 67 2005-12-08 15:58:27 245652 67 2005-12-08 15:58:27 245653 67 2005-12-08 15:59:07 245654 67 2005-12-08 15:59:08 245655 67 2005-12-08 15:59:08 398340 67 2006-02-20 04:38:53 398341 67 2006-02-20 04:48:44 398545 67 2006-02-20 04:53:13 406631 67 2006-02-23 10:49:42 406988 67 2006-02-23 17:07:22 406989 67 2006-02-23 17:08:46 406990 67 2006-02-23 18:01:45 406991 67 2006-02-24 16:42:32 406992 67 2006-02-24 16:47:18 406993 67 2006-02-27 11:20:57 406994 67 2006-02-27 11:26:46 406995 67 2006-02-28 11:55:00 DROP TABLE t1, t11, t12, t21, t22;
mysql-test/r/ps.result +46 −0 Original line number Diff line number Diff line Loading @@ -880,3 +880,49 @@ select row_count(); row_count() 1 drop table t1; create table t1 (a int, b int); insert into t1 (a,b) values (2,8),(1,9),(3,7); prepare stmt from "select * from t1 order by ?"; execute stmt using @a; a b 2 8 1 9 3 7 set @a=1; execute stmt using @a; a b 1 9 2 8 3 7 set @a=2; execute stmt using @a; a b 3 7 2 8 1 9 deallocate prepare stmt; select * from t1 order by 1; a b 1 9 2 8 3 7 prepare stmt from "select * from t1 order by ?+1"; set @a=0; execute stmt using @a; a b 2 8 1 9 3 7 set @a=1; execute stmt using @a; a b 2 8 1 9 3 7 deallocate prepare stmt; select * from t1 order by 1+1; a b 2 8 1 9 3 7 drop table t1;
mysql-test/r/sp-error.result +10 −2 Original line number Diff line number Diff line Loading @@ -634,10 +634,18 @@ flush tables; return 5; end| ERROR 0A000: FLUSH is not allowed in stored function or trigger create procedure bug9529_90123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123() create procedure bug9529_901234567890123456789012345678901234567890123456789012345() begin end| ERROR 42000: Identifier name 'bug9529_90123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890' is too long ERROR 42000: Identifier name 'bug9529_901234567890123456789012345678901234567890123456789012345' is too long drop procedure if exists bug17015_0123456789012345678901234567890123456789012345678901234| create procedure bug17015_0123456789012345678901234567890123456789012345678901234() begin end| show procedure status like 'bug17015%'| Db Name Type Definer Modified Created Security_type Comment test bug17015_0123456789012345678901234567890123456789012345678901234 PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER drop procedure bug17015_0123456789012345678901234567890123456789012345678901234| drop procedure if exists bug10969| create procedure bug10969() begin Loading
mysql-test/r/sp-prelocking.result +23 −0 Original line number Diff line number Diff line Loading @@ -214,3 +214,26 @@ drop function f1; drop function f2; drop function f3; drop procedure sp1; drop table if exists t1; drop view if exists v1, v2, v3; drop function if exists bug15683; create table t1 (f1 bigint, f2 varchar(20), f3 bigint); insert into t1 set f1 = 1, f2 = 'schoenenbourg', f3 = 1; create view v1 as select 1 from t1 union all select 1; create view v2 as select 1 from v1; create view v3 as select 1 as f1 from v2; create function bug15683() returns bigint begin return (select count(*) from v3); end| prepare stmt from "select bug15683()"; execute stmt; bug15683() 2 execute stmt; bug15683() 2 deallocate prepare stmt; drop table t1; drop view v1, v2, v3; drop function bug15683;
mysql-test/r/sp.result +35 −0 Original line number Diff line number Diff line Loading @@ -4812,4 +4812,39 @@ f1 bug13575(f1) 3 ccc drop function bug13575; drop table t3| drop procedure if exists bug16474_1| drop procedure if exists bug16474_2| delete from t1| 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; end| create procedure bug16474_2(x int) select id from t1 order by x| call bug16474_1()| id c b a call bug16474_2(1)| id c b a call bug16474_2(2)| id c b a drop procedure bug16474_1| drop procedure bug16474_2| set @x = 2| select * from t1 order by @x| id data c 2 b 3 a 1 delete from t1| drop table t1,t2;