summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/storage_engine/handler.result
blob: be29b98cb78e917906241d5a1b92c6c24a8caeca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a <CHAR_COLUMN>, b <INT_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
INSERT INTO t1 (a,b) VALUES ('foobar',1000),('a',1),('bar',200),('foo',100);
HANDLER t1 OPEN AS h1;
HANDLER t1 READ FIRST;
ERROR 42S02: Unknown table 't1' in HANDLER
HANDLER h1 READ FIRST;
a	b
foobar	1000
HANDLER h1 READ NEXT;
a	b
a	1
HANDLER h1 READ FIRST WHERE a < 'foo';
a	b
a	1
HANDLER h1 READ NEXT;
a	b
bar	200
HANDLER h1 READ NEXT;
a	b
foo	100
HANDLER h1 READ NEXT;
a	b
HANDLER h1 READ FIRST LIMIT 2;
a	b
foobar	1000
a	1
HANDLER h1 READ NEXT;
a	b
bar	200
HANDLER h1 READ NEXT WHERE b>500 LIMIT 2;
a	b
HANDLER t1 OPEN;
HANDLER h1 READ FIRST WHERE b>500 LIMIT 5;
a	b
foobar	1000
HANDLER t1 READ NEXT;
a	b
foobar	1000
HANDLER h1 READ NEXT WHERE b<100;
a	b
HANDLER t1 CLOSE;
HANDLER h1 READ FIRST;
a	b
foobar	1000
HANDLER t1 CLOSE;
ERROR 42S02: Unknown table 't1' in HANDLER
DROP TABLE t1;
HANDLER h1 CLOSE;
ERROR 42S02: Unknown table 'h1' in HANDLER
CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>, <CUSTOM_INDEX> (a)) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
INSERT INTO t1 (b,a) VALUES ('a',1),('b',200),('f',100),('b',101),('c',2);
HANDLER t1 OPEN AS h1;
HANDLER h1 READ a = (100);
a	b
100	f
HANDLER h1 READ a <= (100) WHERE b < 'f';
a	b
2	c
HANDLER h1 READ a > (2) WHERE b IS NOT NULL LIMIT 2;
a	b
100	f
101	b
HANDLER h1 READ a FIRST;
a	b
1	a
HANDLER h1 READ a LAST;
a	b
200	b
HANDLER h1 READ a PREV;
a	b
101	b
HANDLER h1 READ a NEXT;
a	b
200	b
HANDLER h1 CLOSE;
DROP TABLE t1;