2001-09-28 07:05:54 +02: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 16:36:59 +01:00
handler t2 read a=(SELECT 1);
2003-06-04 17:28:51 +02: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-28 07:05:54 +02:00
handler t2 read a first;
2001-04-07 00:18:33 +02:00
a b
14 aaa
2001-09-28 07:05:54 +02:00
handler t2 read a next;
2001-04-07 00:18:33 +02:00
a b
15 bbb
2001-09-28 07:05:54 +02:00
handler t2 read a next;
2001-04-07 00:18:33 +02:00
a b
16 ccc
2001-09-28 07:05:54 +02:00
handler t2 read a prev;
2001-04-07 00:18:33 +02:00
a b
15 bbb
2001-09-28 07:05:54 +02:00
handler t2 read a last;
2001-04-07 00:18:33 +02:00
a b
22 iii
2001-09-28 07:05:54 +02:00
handler t2 read a prev;
2001-04-07 00:18:33 +02:00
a b
21 hhh
2001-09-28 07:05:54 +02:00
handler t2 read a prev;
2001-04-07 00:18:33 +02:00
a b
20 ggg
2001-09-28 07:05:54 +02:00
handler t2 read a first;
2001-04-07 00:18:33 +02:00
a b
14 aaa
2001-09-28 07:05:54 +02:00
handler t2 read a prev;
2001-04-07 00:18:33 +02:00
a b
2001-09-28 07:05:54 +02:00
handler t2 read a last;
2001-04-07 00:18:33 +02:00
a b
22 iii
2001-09-28 07:05:54 +02:00
handler t2 read a prev;
2001-04-07 00:18:33 +02:00
a b
21 hhh
2001-09-28 07:05:54 +02:00
handler t2 read a next;
2001-04-07 00:18:33 +02:00
a b
22 iii
2001-09-28 07:05:54 +02:00
handler t2 read a next;
2001-04-07 00:18:33 +02:00
a b
2001-09-28 07:05:54 +02:00
handler t2 read a=(15);
2001-04-07 00:18:33 +02:00
a b
15 bbb
2001-09-28 07:05:54 +02:00
handler t2 read a=(16);
2001-04-15 20:14:40 +02:00
a b
16 ccc
2001-09-28 07:05:54 +02:00
handler t2 read a=(19,"fff");
2003-06-04 17:28:51 +02:00
ERROR 42000: Too many key parts specified. Max 1 parts allowed
2001-09-28 07:05:54 +02:00
handler t2 read b=(19,"fff");
2001-04-15 20:14:40 +02:00
a b
19 fff
2001-09-28 07:05:54 +02:00
handler t2 read b=(19,"yyy");
2001-04-15 20:14:40 +02:00
a b
19 yyy
2001-09-28 07:05:54 +02:00
handler t2 read b=(19);
2001-04-15 20:14:40 +02:00
a b
19 fff
2001-09-28 07:05:54 +02:00
handler t1 read a last;
2003-06-04 17:28:51 +02:00
ERROR 42S02: Unknown table 't1' in HANDLER
2001-09-28 07:05:54 +02:00
handler t2 read a=(11);
2001-04-15 20:14:40 +02:00
a b
2001-09-28 07:05:54 +02:00
handler t2 read a>=(11);
2001-04-15 20:14:40 +02:00
a b
14 aaa
2001-09-28 07:05:54 +02:00
handler t2 read a=(18);
2001-04-15 20:14:40 +02:00
a b
18 eee
2001-09-28 07:05:54 +02:00
handler t2 read a>=(18);
2001-04-15 20:14:40 +02:00
a b
18 eee
2001-09-28 07:05:54 +02:00
handler t2 read a>(18);
2001-04-15 20:14:40 +02:00
a b
19 fff
2001-09-28 07:05:54 +02:00
handler t2 read a<=(18);
2001-04-15 20:14:40 +02:00
a b
18 eee
2001-09-28 07:05:54 +02:00
handler t2 read a<(18);
2001-04-15 20:14:40 +02:00
a b
17 ddd
2001-09-28 07:05:54 +02: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-28 07:05:54 +02: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-28 07:05:54 +02: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-28 07:05:54 +02: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-28 07:05:54 +02: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-28 07:05:54 +02: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-28 07:05:54 +02:00
handler t2 read a=(19);
2001-04-15 20:14:40 +02:00
a b
19 fff
2001-09-28 07:05:54 +02:00
handler t2 read a=(19) where b="yyy";
2001-04-15 20:14:40 +02:00
a b
19 yyy
2001-09-28 07:05:54 +02:00
handler t2 read first;
2001-04-15 20:14:40 +02:00
a b
17 ddd
2001-09-28 07:05:54 +02:00
handler t2 read next;
2001-04-15 20:14:40 +02:00
a b
18 eee
2001-09-28 07:05:54 +02:00
handler t2 read next;
2001-04-15 20:14:40 +02:00
a b
19 fff
2001-09-28 07:05:54 +02:00
handler t2 read last;
2003-06-04 17:28:51 +02: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-28 07:05:54 +02: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 17:28:51 +02:00
ERROR 42S02: Unknown table 't2' in HANDLER
2003-02-22 18:22:39 +01:00
handler t1 open as t2;
2003-12-10 05:31:42 +01:00
alter table t1 engine=MyISAM;
2003-02-22 18:22:39 +01:00
handler t2 read first;
2003-06-04 17:28:51 +02:00
ERROR 42S02: Unknown table 't2' in HANDLER
2003-01-28 14:36:22 +01:00
drop table t1;
2003-07-04 11:41:01 +02: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;
2003-07-03 17:57:51 +02:00
create table t1(a int, index(a));
insert into t1 values (1), (2), (3);
handler t1 open;
handler t1 read a=(W);
2003-08-18 23:08:08 +02:00
ERROR 42S22: Unknown column 'W' in 'field list'
2003-07-04 12:55:25 +02:00
handler t1 read a=(a);
2003-08-18 23:08:08 +02:00
ERROR HY000: Wrong arguments to HANDLER ... READ
2003-07-03 17:57:51 +02:00
drop table t1;
2004-01-13 12:31:25 +01:00
create table t1 (a char(5));
insert into t1 values ("Ok");
handler t1 open as t;
handler t read first;
a
Ok
use mysql;
handler t read first;
a
Ok
handler t close;
handler test.t1 open as t;
handler t read first;
a
Ok
handler t close;
use test;
drop table t1;
2004-05-18 20:59:43 +02:00
create table t1 ( a int, b int, INDEX a (a) );
insert into t1 values (1,2), (2,1);
handler t1 open;
handler t1 read a=(1) where b=2;
a b
1 2
handler t1 read a=(1) where b=3;
a b
handler t1 read a=(1) where b=1;
a b
handler t1 close;
drop table t1;