~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/blitzdb/tests/r/indexes.result

Add Solaris atomics fixes and test files. Add replication.h header to makefile.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
drop table if exists t1;
2
 
create table t1 (a int, b int, c int, primary key(a), index(b)) engine = blitzdb;
3
 
insert into t1 values (1, 1, 100), (2, 2, 200), (3, 3, 300), (4, 4, 400);
4
 
insert into t1 values (5, 5, 500), (6, 6, 600), (7, 7, 700), (8, 8, 800);
5
 
select * from t1 order by (a);
6
 
a       b       c
7
 
1       1       100
8
 
2       2       200
9
 
3       3       300
10
 
4       4       400
11
 
5       5       500
12
 
6       6       600
13
 
7       7       700
14
 
8       8       800
15
 
select * from t1 order by (a) desc;
16
 
a       b       c
17
 
8       8       800
18
 
7       7       700
19
 
6       6       600
20
 
5       5       500
21
 
4       4       400
22
 
3       3       300
23
 
2       2       200
24
 
1       1       100
25
 
explain select * from t1 where a <= 4;
26
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
27
 
1       SIMPLE  t1      range   PRIMARY PRIMARY 4       NULL    4       Using where
28
 
select * from t1 where a <= 4;
29
 
a       b       c
30
 
1       1       100
31
 
2       2       200
32
 
3       3       300
33
 
4       4       400
34
 
explain select * from t1 where a > 2 and a < 6;
35
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
36
 
1       SIMPLE  t1      range   PRIMARY PRIMARY 4       NULL    4       Using where
37
 
select * from t1 where a > 2 and a < 6;
38
 
a       b       c
39
 
3       3       300
40
 
4       4       400
41
 
5       5       500
42
 
explain select * from t1 where b <= 4;
43
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
44
 
1       SIMPLE  t1      range   b       b       5       NULL    4       Using where
45
 
select * from t1 where b <= 4;
46
 
a       b       c
47
 
1       1       100
48
 
2       2       200
49
 
3       3       300
50
 
4       4       400
51
 
explain select * from t1 where b > 2 and b < 6;
52
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
53
 
1       SIMPLE  t1      range   b       b       5       NULL    4       Using where
54
 
select * from t1 where b > 2 and b < 6;
55
 
a       b       c
56
 
3       3       300
57
 
4       4       400
58
 
5       5       500
59
 
explain select c from t1 where a = 8;
60
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
61
 
1       SIMPLE  t1      const   PRIMARY PRIMARY 4       const   1       
62
 
select c from t1 where a = 8;
63
 
c
64
 
800
65
 
explain select c from t1 where b = 3;
66
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
67
 
1       SIMPLE  t1      ref     b       b       5       const   4       Using where
68
 
select c from t1 where b = 3;
69
 
c
70
 
300
71
 
select * from t1 where a = 1;
72
 
a       b       c
73
 
1       1       100
74
 
select * from t1 where b = 1;
75
 
a       b       c
76
 
1       1       100
77
 
delete from t1 where a = 1;
78
 
select * from t1 where a = 1;
79
 
a       b       c
80
 
select * from t1 where b = 1;
81
 
a       b       c
82
 
select * from t1 where a >= 2 and a <= 4;
83
 
a       b       c
84
 
2       2       200
85
 
3       3       300
86
 
4       4       400
87
 
select * from t1 where b >= 2 and b <= 4;
88
 
a       b       c
89
 
2       2       200
90
 
3       3       300
91
 
4       4       400
92
 
delete from t1 where a >= 2 and a <= 4;
93
 
select * from t1 where a >= 2 and a <= 4;
94
 
a       b       c
95
 
select * from t1 where b >= 2 and b <= 4;
96
 
a       b       c
97
 
drop table t1;