2001-09-27 23:05:54 -06:00
drop table if exists t1;
create table t1 (a int, b char(10), key a(a), key b(a,b));
insert into t1 values
(17,"ddd"),(18,"eee"),(19,"fff"),(19,"yyy"),
(14,"aaa"),(15,"bbb"),(16,"ccc"),(16,"xxx"),
(20,"ggg"),(21,"hhh"),(22,"iii");
handler t1 open as t2;
2003-01-10 17:36:59 +02:00
handler t2 read a=(SELECT 1);
2003-06-04 18:28:51 +03:00
ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT 1)' at line 1
2001-09-27 23:05:54 -06:00
handler t2 read a first;
2001-04-07 00:18:33 +02:00
a b
14 aaa
2001-09-27 23:05:54 -06:00
handler t2 read a next;
2001-04-07 00:18:33 +02:00
a b
15 bbb
2001-09-27 23:05:54 -06:00
handler t2 read a next;
2001-04-07 00:18:33 +02:00
a b
16 ccc
2001-09-27 23:05:54 -06:00
handler t2 read a prev;
2001-04-07 00:18:33 +02:00
a b
15 bbb
2001-09-27 23:05:54 -06:00
handler t2 read a last;
2001-04-07 00:18:33 +02:00
a b
22 iii
2001-09-27 23:05:54 -06:00
handler t2 read a prev;
2001-04-07 00:18:33 +02:00
a b
21 hhh
2001-09-27 23:05:54 -06:00
handler t2 read a prev;
2001-04-07 00:18:33 +02:00
a b
20 ggg
2001-09-27 23:05:54 -06:00
handler t2 read a first;
2001-04-07 00:18:33 +02:00
a b
14 aaa
2001-09-27 23:05:54 -06:00
handler t2 read a prev;
2001-04-07 00:18:33 +02:00
a b
2001-09-27 23:05:54 -06:00
handler t2 read a last;
2001-04-07 00:18:33 +02:00
a b
22 iii
2001-09-27 23:05:54 -06:00
handler t2 read a prev;
2001-04-07 00:18:33 +02:00
a b
21 hhh
2001-09-27 23:05:54 -06:00
handler t2 read a next;
2001-04-07 00:18:33 +02:00
a b
22 iii
2001-09-27 23:05:54 -06:00
handler t2 read a next;
2001-04-07 00:18:33 +02:00
a b
2001-09-27 23:05:54 -06:00
handler t2 read a=(15);
2001-04-07 00:18:33 +02:00
a b
15 bbb
2001-09-27 23:05:54 -06:00
handler t2 read a=(16);
2001-04-15 20:14:40 +02:00
a b
16 ccc
2001-09-27 23:05:54 -06:00
handler t2 read a=(19,"fff");
2003-06-04 18:28:51 +03:00
ERROR 42000: Too many key parts specified. Max 1 parts allowed
2001-09-27 23:05:54 -06:00
handler t2 read b=(19,"fff");
2001-04-15 20:14:40 +02:00
a b
19 fff
2001-09-27 23:05:54 -06:00
handler t2 read b=(19,"yyy");
2001-04-15 20:14:40 +02:00
a b
19 yyy
2001-09-27 23:05:54 -06:00
handler t2 read b=(19);
2001-04-15 20:14:40 +02:00
a b
19 fff
2001-09-27 23:05:54 -06:00
handler t1 read a last;
2003-06-04 18:28:51 +03:00
ERROR 42S02: Unknown table 't1' in HANDLER
2001-09-27 23:05:54 -06:00
handler t2 read a=(11);
2001-04-15 20:14:40 +02:00
a b
2001-09-27 23:05:54 -06:00
handler t2 read a>=(11);
2001-04-15 20:14:40 +02:00
a b
14 aaa
2001-09-27 23:05:54 -06:00
handler t2 read a=(18);
2001-04-15 20:14:40 +02:00
a b
18 eee
2001-09-27 23:05:54 -06:00
handler t2 read a>=(18);
2001-04-15 20:14:40 +02:00
a b
18 eee
2001-09-27 23:05:54 -06:00
handler t2 read a>(18);
2001-04-15 20:14:40 +02:00
a b
19 fff
2001-09-27 23:05:54 -06:00
handler t2 read a<=(18);
2001-04-15 20:14:40 +02:00
a b
18 eee
2001-09-27 23:05:54 -06:00
handler t2 read a<(18);
2001-04-15 20:14:40 +02:00
a b
17 ddd
2001-09-27 23:05:54 -06:00
handler t2 read a first limit 5;
2001-04-15 20:14:40 +02:00
a b
14 aaa
15 bbb
16 ccc
16 xxx
17 ddd
2001-09-27 23:05:54 -06:00
handler t2 read a next limit 3;
2001-04-15 20:14:40 +02:00
a b
18 eee
19 fff
19 yyy
2001-09-27 23:05:54 -06:00
handler t2 read a prev limit 10;
2001-04-15 20:14:40 +02:00
a b
19 fff
18 eee
17 ddd
16 xxx
16 ccc
15 bbb
14 aaa
2001-09-27 23:05:54 -06:00
handler t2 read a>=(16) limit 4;
2001-04-15 20:14:40 +02:00
a b
16 ccc
16 xxx
17 ddd
18 eee
2001-09-27 23:05:54 -06:00
handler t2 read a>=(16) limit 2,2;
2001-04-15 20:14:40 +02:00
a b
17 ddd
18 eee
2001-09-27 23:05:54 -06:00
handler t2 read a last limit 3;
2001-04-15 20:14:40 +02:00
a b
22 iii
21 hhh
20 ggg
2001-09-27 23:05:54 -06:00
handler t2 read a=(19);
2001-04-15 20:14:40 +02:00
a b
19 fff
2001-09-27 23:05:54 -06:00
handler t2 read a=(19) where b="yyy";
2001-04-15 20:14:40 +02:00
a b
19 yyy
2001-09-27 23:05:54 -06:00
handler t2 read first;
2001-04-15 20:14:40 +02:00
a b
17 ddd
2001-09-27 23:05:54 -06:00
handler t2 read next;
2001-04-15 20:14:40 +02:00
a b
18 eee
2001-09-27 23:05:54 -06:00
handler t2 read next;
2001-04-15 20:14:40 +02:00
a b
19 fff
2001-09-27 23:05:54 -06:00
handler t2 read last;
2003-06-04 18:28:51 +03:00
ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
2001-09-27 23:05:54 -06:00
handler t2 close;
2003-01-28 14:36:22 +01:00
handler t1 open as t2;
drop table t1;
create table t1 (a int);
insert into t1 values (17);
handler t2 read first;
2003-06-04 18:28:51 +03:00
ERROR 42S02: Unknown table 't2' in HANDLER
2003-02-22 18:22:39 +01:00
handler t1 open as t2;
alter table t1 type=MyISAM;
handler t2 read first;
2003-06-04 18:28:51 +03:00
ERROR 42S02: Unknown table 't2' in HANDLER
2003-01-28 14:36:22 +01:00
drop table t1;
2003-07-04 14:41:01 +05:00
create table t1 (a int);
insert into t1 values (1),(2),(3),(4),(5),(6);
delete from t1 limit 2;
handler t1 open;
handler t1 read first;
a
3
handler t1 read first limit 1,1;
a
4
handler t1 read first limit 2,2;
a
5
6
delete from t1 limit 3;
handler t1 read first;
a
6
drop table t1;