1--source include/have_rocksdb.inc
2
3create table test (
4  a bigint(20) not null,
5  b bigint(20) not null,
6  c varchar(500) not null,
7  d bigint(20) not null,
8  e bigint(20) not null,
9  f varchar(500) not null,
10  g varchar(500) not null,
11  h varchar(500) not null,
12  i varchar(1000) not null,
13  j varchar(16384) not null,
14  k varchar(200) not null,
15  l varchar(500) not null,
16  m varchar(100) not null,
17  n bigint(20) not null,
18  primary key (a, b, m, c(100), l(100), d, e, f(100), g(100), h(100), n),
19  key n (n),
20  key d (d, a)
21) engine = rocksdb default charset = latin1;
22
23--disable_query_log
24let $i = 1000;
25while ($i) {
26  --eval insert into test values (10, 1, "i", $i / 100, $i, "f", "g", "h", "i", "j", "k", "l", "m", $i);
27  --eval insert into test values (10, 2, "i", $i / 100, $i, "f", "g", "h", "i", "j", "k", "l", "m", $i);
28  --eval insert into test values (10, 3, "i", $i / 100, $i, "f", "g", "h", "i", "j", "k", "l", "m", $i);
29  --eval insert into test values (10, 4, "i", $i / 100, $i, "f", "g", "h", "i", "j", "k", "l", "m", $i);
30  --eval insert into test values (10, 5, "i", $i / 100, $i, "f", "g", "h", "i", "j", "k", "l", "m", $i);
31  dec $i;
32}
33set global rocksdb_force_flush_memtable_now = true;
34analyze table test;
35--enable_query_log
36
37--replace_column 9 #
38explain
39select * from test where d = 10 and a = 10 and b = 2;
40select * from test where d = 10 and a = 10 and b = 2;
41
42
43drop table test;
44