~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to tests/r/rowid_order_innodb.result

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-10-02 14:17:48 UTC
  • mfrom: (1.1.1 upstream)
  • mto: (2.1.17 sid)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20101002141748-m6vbfbfjhrw1153e
Tags: 2010.09.1802-1
* New upstream release.
* Removed pid-file argument hack.
* Updated GPL-2 address to be new address.
* Directly copy in drizzledump.1 since debian doesn't have sphinx 1.0 yet.
* Link to jquery from libjs-jquery. Add it as a depend.
* Add drizzled.8 symlink to the install files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
SET SESSION STORAGE_ENGINE = InnoDB;
2
 
drop table if exists t1, t2, t3,t4;
3
 
create table t1 (
4
 
pk1 int not NULL,
5
 
key1 int,
6
 
key2 int,
7
 
PRIMARY KEY  (pk1),
8
 
KEY key1 (key1),
9
 
KEY key2 (key2)
10
 
);
11
 
insert into t1 values (-5, 1, 1),
12
 
(-100, 1, 1),
13
 
(3, 1, 1),
14
 
(0, 1, 1),
15
 
(10, 1, 1);
16
 
explain select * from t1 force index(key1, key2) where key1 < 3 or key2 < 3;
17
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
18
 
1       SIMPLE  t1      index_merge     key1,key2       key1,key2       5,5     NULL    4       Using sort_union(key1,key2); Using where
19
 
select * from t1 force index(key1, key2) where key1 < 3 or key2 < 3;
20
 
pk1     key1    key2
21
 
-100    1       1
22
 
-5      1       1
23
 
0       1       1
24
 
3       1       1
25
 
10      1       1
26
 
drop table t1;
27
 
create table t1 (
28
 
pk1 int not NULL,
29
 
key1 int,
30
 
key2 int,
31
 
PRIMARY KEY  (pk1),
32
 
KEY key1 (key1),
33
 
KEY key2 (key2)
34
 
);
35
 
insert into t1 values (0, 1, 1),
36
 
(0x00FFFFFF, 1, 1),
37
 
(0x00FFFFFE, 1, 1),
38
 
(1, 1, 1),
39
 
(2, 1, 1);
40
 
select * from t1 force index(key1, key2) where key1 < 3 or key2 < 3;
41
 
pk1     key1    key2
42
 
0       1       1
43
 
1       1       1
44
 
2       1       1
45
 
16777214        1       1
46
 
16777215        1       1
47
 
drop table t1;
48
 
create table t1 (
49
 
pk1 char(4) not NULL,
50
 
key1 int,
51
 
key2 int,
52
 
PRIMARY KEY  (pk1),
53
 
KEY key1 (key1),
54
 
KEY key2 (key2)
55
 
) collate utf8_general_ci;
56
 
insert into t1 values ('a1', 1, 1),
57
 
('b2', 1, 1),
58
 
('A3', 1, 1),
59
 
('B4', 1, 1);
60
 
select * from t1 force index(key1, key2) where key1 < 3 or key2 < 3;
61
 
pk1     key1    key2
62
 
a1      1       1
63
 
A3      1       1
64
 
b2      1       1
65
 
B4      1       1
66
 
drop table t1;
67
 
create table t1 (
68
 
pk1 int not NULL,
69
 
pk2 char(4) not NULL,
70
 
pk3 char(4) not NULL collate utf8_bin,
71
 
key1 int,
72
 
key2 int,
73
 
PRIMARY KEY  (pk1,pk2,pk3),
74
 
KEY key1 (key1),
75
 
KEY key2 (key2)
76
 
);
77
 
insert into t1 values
78
 
(1, 'u', 'u',        1, 1),
79
 
(1, 'u', 'b', 1, 1),
80
 
(1, 'u', 'x',        1, 1);
81
 
insert ignore into t1 select pk1, char(0xEC), pk3, key1, key2  from t1;
82
 
Warnings:
83
 
Warning 1366    Incorrect string value: '\xEC' for column 'pk2' at row 1
84
 
Warning 1366    Incorrect string value: '\xEC' for column 'pk2' at row 2
85
 
Warning 1366    Incorrect string value: '\xEC' for column 'pk2' at row 3
86
 
insert ignore into t1 select pk1, 'x', pk3, key1, key2  from t1 where pk2='u';
87
 
insert ignore into t1 select 2, pk2, pk3, key1, key2  from t1;
88
 
select * from t1;
89
 
pk1     pk2     pk3     key1    key2
90
 
1               b       1       1
91
 
1               u       1       1
92
 
1               x       1       1
93
 
1       u       b       1       1
94
 
1       u       u       1       1
95
 
1       u       x       1       1
96
 
1       x       b       1       1
97
 
1       x       u       1       1
98
 
1       x       x       1       1
99
 
2               b       1       1
100
 
2               u       1       1
101
 
2               x       1       1
102
 
2       u       b       1       1
103
 
2       u       u       1       1
104
 
2       u       x       1       1
105
 
2       x       b       1       1
106
 
2       x       u       1       1
107
 
2       x       x       1       1
108
 
select * from t1 force index(key1, key2) where key1 < 3 or key2 < 3;
109
 
pk1     pk2     pk3     key1    key2
110
 
1               b       1       1
111
 
1               u       1       1
112
 
1               x       1       1
113
 
1       u       b       1       1
114
 
1       u       u       1       1
115
 
1       u       x       1       1
116
 
1       x       b       1       1
117
 
1       x       u       1       1
118
 
1       x       x       1       1
119
 
2               b       1       1
120
 
2               u       1       1
121
 
2               x       1       1
122
 
2       u       b       1       1
123
 
2       u       u       1       1
124
 
2       u       x       1       1
125
 
2       x       b       1       1
126
 
2       x       u       1       1
127
 
2       x       x       1       1
128
 
alter table t1 drop primary key;
129
 
select * from t1;
130
 
pk1     pk2     pk3     key1    key2
131
 
1               b       1       1
132
 
1               u       1       1
133
 
1               x       1       1
134
 
1       u       b       1       1
135
 
1       u       u       1       1
136
 
1       u       x       1       1
137
 
1       x       b       1       1
138
 
1       x       u       1       1
139
 
1       x       x       1       1
140
 
2               b       1       1
141
 
2               u       1       1
142
 
2               x       1       1
143
 
2       u       b       1       1
144
 
2       u       u       1       1
145
 
2       u       x       1       1
146
 
2       x       b       1       1
147
 
2       x       u       1       1
148
 
2       x       x       1       1
149
 
select * from t1 force index(key1, key2) where key1 < 3 or key2 < 3;
150
 
pk1     pk2     pk3     key1    key2
151
 
1               b       1       1
152
 
1               u       1       1
153
 
1               x       1       1
154
 
1       u       b       1       1
155
 
1       u       u       1       1
156
 
1       u       x       1       1
157
 
1       x       b       1       1
158
 
1       x       u       1       1
159
 
1       x       x       1       1
160
 
2               b       1       1
161
 
2               u       1       1
162
 
2               x       1       1
163
 
2       u       b       1       1
164
 
2       u       u       1       1
165
 
2       u       x       1       1
166
 
2       x       b       1       1
167
 
2       x       u       1       1
168
 
2       x       x       1       1
169
 
drop table t1;
170
 
create table t1  (
171
 
pk1 varchar(8) NOT NULL default '',
172
 
pk2 varchar(4) NOT NULL default '',
173
 
key1 int,
174
 
key2 int,
175
 
primary key(pk1, pk2),
176
 
KEY key1 (key1),
177
 
KEY key2 (key2)
178
 
);
179
 
insert into t1 values ('','empt',2,2),
180
 
('a','a--a',2,2),
181
 
('bb','b--b',2,2),
182
 
('ccc','c--c',2,2),
183
 
('dddd','d--d',2,2);
184
 
select * from t1 force index(key1, key2) where key1 < 3 or key2 < 3;
185
 
pk1     pk2     key1    key2
186
 
        empt    2       2
187
 
a       a--a    2       2
188
 
bb      b--b    2       2
189
 
ccc     c--c    2       2
190
 
dddd    d--d    2       2
191
 
drop table t1;