Debian Codegraph @

mysql-test/suite/gcol/r/gcol_handler_innodb.result

raw
1 SET @@session.default_storage_engine = 'InnoDB';
2 create table t1 (a int,
3 b int generated always as (-a) virtual,
4 c int generated always as (-a) stored,
5 d char(1),
6 index (a),
7 index (c));
8 insert into t1 (a,d) values (4,'a'), (2,'b'), (1,'c'), (3,'d');
9 select * from t1;
10 a b c d
11 4 -4 -4 a
12 2 -2 -2 b
13 1 -1 -1 c
14 3 -3 -3 d
15 # HANDLER tbl_name OPEN
16 handler t1 open;
17 # HANDLER tbl_name READ non-gcol_index_name > (value1,value2,...)
18 handler t1 read a > (2);
19 a b c d
20 3 -3 -3 d
21 # HANDLER tbl_name READ non-gcol_index_name > (value1,value2,...) WHERE non-gcol_field=expr
22 handler t1 read a > (2) where d='c';
23 a b c d
24 # HANDLER tbl_name READ gcol_index_name = (value1,value2,...)
25 handler t1 read c = (-2);
26 a b c d
27 2 -2 -2 b
28 # HANDLER tbl_name READ gcol_index_name = (value1,value2,...) WHERE non-gcol_field=expr
29 handler t1 read c = (-2) where d='c';
30 a b c d
31 # HANDLER tbl_name READ non-gcol_index_name > (value1,value2,...) WHERE gcol_field=expr
32 handler t1 read a > (2) where b=-3 && c=-3;
33 a b c d
34 3 -3 -3 d
35 Warnings:
36 Warning 1287 '&&' is deprecated and will be removed in a future release. Please use AND instead
37 # HANDLER tbl_name READ gcol_index_name <= (value1,value2,...)
38 handler t1 read c <= (-2);
39 a b c d
40 2 -2 -2 b
41 # HANDLER tbl_name READ gcol_index_name > (value1,value2,...) WHERE gcol_field=expr
42 handler t1 read c <= (-2) where b=-3;
43 a b c d
44 3 -3 -3 d
45 # HANDLER tbl_name READ gcol_index_name FIRST
46 handler t1 read c first;
47 a b c d
48 4 -4 -4 a
49 # HANDLER tbl_name READ gcol_index_name NEXT
50 handler t1 read c next;
51 a b c d
52 3 -3 -3 d
53 # HANDLER tbl_name READ gcol_index_name PREV
54 handler t1 read c prev;
55 a b c d
56 4 -4 -4 a
57 # HANDLER tbl_name READ gcol_index_name LAST
58 handler t1 read c last;
59 a b c d
60 1 -1 -1 c
61 # HANDLER tbl_name READ FIRST where non-gcol=expr
62 handler t1 read FIRST where a >= 2;
63 a b c d
64 4 -4 -4 a
65 # HANDLER tbl_name READ FIRST where gcol=expr
66 handler t1 read FIRST where b >= -2;
67 a b c d
68 2 -2 -2 b
69 # HANDLER tbl_name READ NEXT where non-gcol=expr
70 handler t1 read NEXT where d='c';
71 a b c d
72 1 -1 -1 c
73 # HANDLER tbl_name READ NEXT where gcol=expr
74 handler t1 read NEXT where b<=-4;
75 a b c d
76 # HANDLER tbl_name CLOSE
77 handler t1 close;
78 drop table t1;
79 DROP VIEW IF EXISTS v1,v2;
80 DROP TABLE IF EXISTS t1,t2,t3;
81 DROP PROCEDURE IF EXISTS p1;
82 DROP FUNCTION IF EXISTS f1;
83 DROP TRIGGER IF EXISTS trg1;
84 DROP TRIGGER IF EXISTS trg2;
85 set sql_warnings = 0;