MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
QueryAllPrimitivesTest.java
1 /*
2  Copyright 2010 Sun Microsystems, Inc.
3  All rights reserved. Use is subject to license terms.
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; version 2 of the License.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program; if not, write to the Free Software
16  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18 
19 package testsuite.clusterj;
20 
21 import testsuite.clusterj.model.AllPrimitives;
22 import testsuite.clusterj.model.IdBase;
23 
25 
26  @Override
27  public Class getInstanceType() {
28  return AllPrimitives.class;
29  }
30 
31  @Override
32  void createInstances(int number) {
33  createAllPrimitivesInstances(10);
34  }
35 
78  public void test() {
79  btreeIndexScanInt();
80  hashIndexScanInt();
81  bothIndexScanInt();
82  noneIndexScanInt();
83 
84  btreeIndexScanByte();
85  hashIndexScanByte();
86  bothIndexScanByte();
87  noneIndexScanByte();
88 
89  btreeIndexScanShort();
90  hashIndexScanShort();
91  bothIndexScanShort();
92  noneIndexScanShort();
93 
94  btreeIndexScanLong();
95  hashIndexScanLong();
96  bothIndexScanLong();
97  noneIndexScanLong();
98  failOnError();
99  }
100 
101  public void btreeIndexScanInt() {
102  equalQuery("int_not_null_btree", "idx_int_not_null_btree", 8, 8);
103  greaterEqualQuery("int_not_null_btree", "idx_int_not_null_btree", 7, 7, 8, 9);
104  greaterThanQuery("int_not_null_btree", "idx_int_not_null_btree", 6, 7, 8, 9);
105  lessEqualQuery("int_not_null_btree", "idx_int_not_null_btree", 4, 4, 3, 2, 1, 0);
106  lessThanQuery("int_not_null_btree", "idx_int_not_null_btree", 4, 3, 2, 1, 0);
107  betweenQuery("int_not_null_btree", "idx_int_not_null_btree", 4, 6, 4, 5, 6);
108  greaterEqualAndLessEqualQuery("int_not_null_btree", "idx_int_not_null_btree", 4, 6, 4, 5, 6);
109  greaterThanAndLessEqualQuery("int_not_null_btree", "idx_int_not_null_btree", 4, 6, 5, 6);
110  greaterEqualAndLessThanQuery("int_not_null_btree", "idx_int_not_null_btree", 4, 6, 4, 5);
111  greaterThanAndLessThanQuery("int_not_null_btree", "idx_int_not_null_btree", 4, 6, 5);
112 
113  equalQuery("int_null_btree", "idx_int_null_btree", 8, 8);
114  greaterEqualQuery("int_null_btree", "idx_int_null_btree", 7, 7, 8, 9);
115  greaterThanQuery("int_null_btree", "idx_int_null_btree", 6, 7, 8, 9);
116  lessEqualQuery("int_null_btree", "idx_int_null_btree", 4, 4, 3, 2, 1, 0);
117  lessThanQuery("int_null_btree", "idx_int_null_btree", 4, 3, 2, 1, 0);
118  betweenQuery("int_null_btree", "idx_int_null_btree", 4, 6, 4, 5, 6);
119  greaterEqualAndLessEqualQuery("int_null_btree", "idx_int_null_btree", 4, 6, 4, 5, 6);
120  greaterThanAndLessEqualQuery("int_null_btree", "idx_int_null_btree", 4, 6, 5, 6);
121  greaterEqualAndLessThanQuery("int_null_btree", "idx_int_null_btree", 4, 6, 4, 5);
122  greaterThanAndLessThanQuery("int_null_btree", "idx_int_null_btree", 4, 6, 5);
123  }
124 
125  public void hashIndexScanInt() {
126  equalQuery("int_not_null_hash", "idx_int_not_null_hash", 8, 8);
127  greaterEqualQuery("int_not_null_hash", "none", 7, 7, 8, 9);
128  greaterThanQuery("int_not_null_hash", "none", 6, 7, 8, 9);
129  lessEqualQuery("int_not_null_hash", "none", 4, 4, 3, 2, 1, 0);
130  lessThanQuery("int_not_null_hash", "none", 4, 3, 2, 1, 0);
131  betweenQuery("int_not_null_hash", "none", 4, 6, 4, 5, 6);
132  greaterEqualAndLessEqualQuery("int_not_null_hash", "none", 4, 6, 4, 5, 6);
133  greaterThanAndLessEqualQuery("int_not_null_hash", "none", 4, 6, 5, 6);
134  greaterEqualAndLessThanQuery("int_not_null_hash", "none", 4, 6, 4, 5);
135  greaterThanAndLessThanQuery("int_not_null_hash", "none", 4, 6, 5);
136 
137  equalQuery("int_null_hash", "idx_int_null_hash", 8, 8);
138  greaterEqualQuery("int_null_hash", "none", 7, 7, 8, 9);
139  greaterThanQuery("int_null_hash", "none", 6, 7, 8, 9);
140  lessEqualQuery("int_null_hash", "none", 4, 4, 3, 2, 1, 0);
141  lessThanQuery("int_null_hash", "none", 4, 3, 2, 1, 0);
142  betweenQuery("int_null_hash", "none", 4, 6, 4, 5, 6);
143  greaterEqualAndLessEqualQuery("int_null_hash", "none", 4, 6, 4, 5, 6);
144  greaterThanAndLessEqualQuery("int_null_hash", "none", 4, 6, 5, 6);
145  greaterEqualAndLessThanQuery("int_null_hash", "none", 4, 6, 4, 5);
146  greaterThanAndLessThanQuery("int_null_hash", "none", 4, 6, 5);
147  }
148 
149  public void bothIndexScanInt() {
150  equalQuery("int_not_null_both", "idx_int_not_null_both", 8, 8);
151  greaterEqualQuery("int_not_null_both", "idx_int_not_null_both", 7, 7, 8, 9);
152  greaterThanQuery("int_not_null_both", "idx_int_not_null_both", 6, 7, 8, 9);
153  lessEqualQuery("int_not_null_both", "idx_int_not_null_both", 4, 4, 3, 2, 1, 0);
154  lessThanQuery("int_not_null_both", "idx_int_not_null_both", 4, 3, 2, 1, 0);
155  betweenQuery("int_not_null_both", "idx_int_not_null_both", 4, 6, 4, 5, 6);
156  greaterEqualAndLessEqualQuery("int_not_null_both", "idx_int_not_null_both", 4, 6, 4, 5, 6);
157  greaterThanAndLessEqualQuery("int_not_null_both", "idx_int_not_null_both", 4, 6, 5, 6);
158  greaterEqualAndLessThanQuery("int_not_null_both", "idx_int_not_null_both", 4, 6, 4, 5);
159  greaterThanAndLessThanQuery("int_not_null_both", "idx_int_not_null_both", 4, 6, 5);
160 
161  equalQuery("int_null_both", "idx_int_null_both", 8, 8);
162  greaterEqualQuery("int_null_both", "idx_int_null_both", 7, 7, 8, 9);
163  greaterThanQuery("int_null_both", "idx_int_null_both", 6, 7, 8, 9);
164  lessEqualQuery("int_null_both", "idx_int_null_both", 4, 4, 3, 2, 1, 0);
165  lessThanQuery("int_null_both", "idx_int_null_both", 4, 3, 2, 1, 0);
166  betweenQuery("int_null_both", "idx_int_null_both", 4, 6, 4, 5, 6);
167  greaterEqualAndLessEqualQuery("int_null_both", "idx_int_null_both", 4, 6, 4, 5, 6);
168  greaterThanAndLessEqualQuery("int_null_both", "idx_int_null_both", 4, 6, 5, 6);
169  greaterEqualAndLessThanQuery("int_null_both", "idx_int_null_both", 4, 6, 4, 5);
170  greaterThanAndLessThanQuery("int_null_both", "idx_int_null_both", 4, 6, 5);
171  }
172 
173  public void noneIndexScanInt() {
174  equalQuery("int_not_null_none", "none", 8, 8);
175  greaterEqualQuery("int_not_null_none", "none", 7, 7, 8, 9);
176  greaterThanQuery("int_not_null_none", "none", 6, 7, 8, 9);
177  lessEqualQuery("int_not_null_none", "none", 4, 4, 3, 2, 1, 0);
178  lessThanQuery("int_not_null_none", "none", 4, 3, 2, 1, 0);
179  betweenQuery("int_not_null_none", "none", 4, 6, 4, 5, 6);
180  greaterEqualAndLessEqualQuery("int_not_null_none", "none", 4, 6, 4, 5, 6);
181  greaterThanAndLessEqualQuery("int_not_null_none", "none", 4, 6, 5, 6);
182  greaterEqualAndLessThanQuery("int_not_null_none", "none", 4, 6, 4, 5);
183  greaterThanAndLessThanQuery("int_not_null_none", "none", 4, 6, 5);
184 
185  equalQuery("int_not_null_none", "none", 8, 8);
186  greaterEqualQuery("int_not_null_none", "none", 7, 7, 8, 9);
187  greaterThanQuery("int_not_null_none", "none", 6, 7, 8, 9);
188  lessEqualQuery("int_not_null_none", "none", 4, 4, 3, 2, 1, 0);
189  lessThanQuery("int_not_null_none", "none", 4, 3, 2, 1, 0);
190  betweenQuery("int_not_null_none", "none", 4, 6, 4, 5, 6);
191 
192  greaterEqualAndLessEqualQuery("int_not_null_none", "none", 4, 6, 4, 5, 6);
193  greaterThanAndLessEqualQuery("int_not_null_none", "none", 4, 6, 5, 6);
194  greaterEqualAndLessThanQuery("int_not_null_none", "none", 4, 6, 4, 5);
195  greaterThanAndLessThanQuery("int_not_null_none", "none", 4, 6, 5);
196  }
197 
198  public void btreeIndexScanByte() {
199  equalQuery("byte_not_null_btree", "idx_byte_not_null_btree", (byte)8, 8);
200  greaterEqualQuery("byte_not_null_btree", "idx_byte_not_null_btree", (byte)7, 7, 8, 9);
201  greaterThanQuery("byte_not_null_btree", "idx_byte_not_null_btree", (byte)6, 7, 8, 9);
202  lessEqualQuery("byte_not_null_btree", "idx_byte_not_null_btree", (byte)4, 4, 3, 2, 1, 0);
203  lessThanQuery("byte_not_null_btree", "idx_byte_not_null_btree", (byte)4, 3, 2, 1, 0);
204  betweenQuery("byte_not_null_btree", "idx_byte_not_null_btree", (byte)4, (byte)6, 4, 5, 6);
205  greaterEqualAndLessEqualQuery("byte_not_null_btree", "idx_byte_not_null_btree", (byte)4, (byte)6, 4, 5, 6);
206  greaterThanAndLessEqualQuery("byte_not_null_btree", "idx_byte_not_null_btree", (byte)4, (byte)6, 5, 6);
207  greaterEqualAndLessThanQuery("byte_not_null_btree", "idx_byte_not_null_btree", (byte)4, (byte)6, 4, 5);
208  greaterThanAndLessThanQuery("byte_not_null_btree", "idx_byte_not_null_btree", (byte)4, (byte)6, 5);
209 
210  equalQuery("byte_null_btree", "idx_byte_null_btree", (byte)8, 8);
211  greaterEqualQuery("byte_null_btree", "idx_byte_null_btree", (byte)7, 7, 8, 9);
212  greaterThanQuery("byte_null_btree", "idx_byte_null_btree", (byte)6, 7, 8, 9);
213  lessEqualQuery("byte_null_btree", "idx_byte_null_btree", (byte)4, 4, 3, 2, 1, 0);
214  lessThanQuery("byte_null_btree", "idx_byte_null_btree", (byte)4, 3, 2, 1, 0);
215  betweenQuery("byte_null_btree", "idx_byte_null_btree", (byte)4, (byte)6, 4, 5, 6);
216  greaterEqualAndLessEqualQuery("byte_null_btree", "idx_byte_null_btree", (byte)4, (byte)6, 4, 5, 6);
217  greaterThanAndLessEqualQuery("byte_null_btree", "idx_byte_null_btree", (byte)4, (byte)6, 5, 6);
218  greaterEqualAndLessThanQuery("byte_null_btree", "idx_byte_null_btree", (byte)4, (byte)6, 4, 5);
219  greaterThanAndLessThanQuery("byte_null_btree", "idx_byte_null_btree", (byte)4, (byte)6, 5);
220  }
221 
222  public void hashIndexScanByte() {
223  equalQuery("byte_not_null_hash", "idx_byte_not_null_hash", (byte)8, 8);
224  greaterEqualQuery("byte_not_null_hash", "none", (byte)7, 7, 8, 9);
225  greaterThanQuery("byte_not_null_hash", "none", (byte)6, 7, 8, 9);
226  lessEqualQuery("byte_not_null_hash", "none", (byte)4, 4, 3, 2, 1, 0);
227  lessThanQuery("byte_not_null_hash", "none", (byte)4, 3, 2, 1, 0);
228  betweenQuery("byte_not_null_hash", "none", (byte)4, (byte)6, 4, 5, 6);
229  greaterEqualAndLessEqualQuery("byte_not_null_hash", "none", (byte)4, (byte)6, 4, 5, 6);
230  greaterThanAndLessEqualQuery("byte_not_null_hash", "none", (byte)4, (byte)6, 5, 6);
231  greaterEqualAndLessThanQuery("byte_not_null_hash", "none", (byte)4, (byte)6, 4, 5);
232  greaterThanAndLessThanQuery("byte_not_null_hash", "none", (byte)4, (byte)6, 5);
233 
234  equalQuery("byte_null_hash", "idx_byte_null_hash", (byte)8, 8);
235  greaterEqualQuery("byte_null_hash", "none", (byte)7, 7, 8, 9);
236  greaterThanQuery("byte_null_hash", "none", (byte)6, 7, 8, 9);
237  lessEqualQuery("byte_null_hash", "none", (byte)4, 4, 3, 2, 1, 0);
238  lessThanQuery("byte_null_hash", "none", (byte)4, 3, 2, 1, 0);
239  betweenQuery("byte_null_hash", "none", (byte)4, (byte)6, 4, 5, 6);
240  greaterEqualAndLessEqualQuery("byte_null_hash", "none", (byte)4, (byte)6, 4, 5, 6);
241  greaterThanAndLessEqualQuery("byte_null_hash", "none", (byte)4, (byte)6, 5, 6);
242  greaterEqualAndLessThanQuery("byte_null_hash", "none", (byte)4, (byte)6, 4, 5);
243  greaterThanAndLessThanQuery("byte_null_hash", "none", (byte)4, (byte)6, 5);
244  }
245 
246  public void bothIndexScanByte() {
247  equalQuery("byte_not_null_both", "idx_byte_not_null_both", (byte)8, 8);
248  greaterEqualQuery("byte_not_null_both", "idx_byte_not_null_both", (byte)7, 7, 8, 9);
249  greaterThanQuery("byte_not_null_both", "idx_byte_not_null_both", (byte)6, 7, 8, 9);
250  lessEqualQuery("byte_not_null_both", "idx_byte_not_null_both", (byte)4, 4, 3, 2, 1, 0);
251  lessThanQuery("byte_not_null_both", "idx_byte_not_null_both", (byte)4, 3, 2, 1, 0);
252  betweenQuery("byte_not_null_both", "idx_byte_not_null_both", (byte)4, (byte)6, 4, 5, 6);
253  greaterEqualAndLessEqualQuery("byte_not_null_both", "idx_byte_not_null_both", (byte)4, (byte)6, 4, 5, 6);
254  greaterThanAndLessEqualQuery("byte_not_null_both", "idx_byte_not_null_both", (byte)4, (byte)6, 5, 6);
255  greaterEqualAndLessThanQuery("byte_not_null_both", "idx_byte_not_null_both", (byte)4, (byte)6, 4, 5);
256  greaterThanAndLessThanQuery("byte_not_null_both", "idx_byte_not_null_both", (byte)4, (byte)6, 5);
257 
258  equalQuery("byte_null_both", "idx_byte_null_both", (byte)8, 8);
259  greaterEqualQuery("byte_null_both", "idx_byte_null_both", (byte)7, 7, 8, 9);
260  greaterThanQuery("byte_null_both", "idx_byte_null_both", (byte)6, 7, 8, 9);
261  lessEqualQuery("byte_null_both", "idx_byte_null_both", (byte)4, 4, 3, 2, 1, 0);
262  lessThanQuery("byte_null_both", "idx_byte_null_both", (byte)4, 3, 2, 1, 0);
263  betweenQuery("byte_null_both", "idx_byte_null_both", (byte)4, (byte)6, 4, 5, 6);
264  greaterEqualAndLessEqualQuery("byte_null_both", "idx_byte_null_both", (byte)4, (byte)6, 4, 5, 6);
265  greaterThanAndLessEqualQuery("byte_null_both", "idx_byte_null_both", (byte)4, (byte)6, 5, 6);
266  greaterEqualAndLessThanQuery("byte_null_both", "idx_byte_null_both", (byte)4, (byte)6, 4, 5);
267  greaterThanAndLessThanQuery("byte_null_both", "idx_byte_null_both", (byte)4, (byte)6, 5);
268  }
269 
270  public void noneIndexScanByte() {
271  equalQuery("byte_not_null_none", "none", (byte)8, 8);
272  greaterEqualQuery("byte_not_null_none", "none", (byte)7, 7, 8, 9);
273  greaterThanQuery("byte_not_null_none", "none", (byte)6, 7, 8, 9);
274  lessEqualQuery("byte_not_null_none", "none", (byte)4, 4, 3, 2, 1, 0);
275  lessThanQuery("byte_not_null_none", "none", (byte)4, 3, 2, 1, 0);
276  betweenQuery("byte_not_null_none", "none", (byte)4, (byte)6, 4, 5, 6);
277  greaterEqualAndLessEqualQuery("byte_not_null_none", "none", (byte)4, (byte)6, 4, 5, 6);
278  greaterThanAndLessEqualQuery("byte_not_null_none", "none", (byte)4, (byte)6, 5, 6);
279  greaterEqualAndLessThanQuery("byte_not_null_none", "none", (byte)4, (byte)6, 4, 5);
280  greaterThanAndLessThanQuery("byte_not_null_none", "none", (byte)4, (byte)6, 5);
281 
282  equalQuery("byte_null_none", "none", (byte)8, 8);
283  greaterEqualQuery("byte_null_none", "none", (byte)7, 7, 8, 9);
284  greaterThanQuery("byte_null_none", "none", (byte)6, 7, 8, 9);
285  lessEqualQuery("byte_null_none", "none", (byte)4, 4, 3, 2, 1, 0);
286  lessThanQuery("byte_null_none", "none", (byte)4, 3, 2, 1, 0);
287  betweenQuery("byte_null_none", "none", (byte)4, (byte)6, 4, 5, 6);
288  greaterEqualAndLessEqualQuery("byte_null_none", "none", (byte)4, (byte)6, 4, 5, 6);
289  greaterThanAndLessEqualQuery("byte_null_none", "none", (byte)4, (byte)6, 5, 6);
290  greaterEqualAndLessThanQuery("byte_null_none", "none", (byte)4, (byte)6, 4, 5);
291  greaterThanAndLessThanQuery("byte_null_none", "none", (byte)4, (byte)6, 5);
292  }
293 
294  public void btreeIndexScanShort() {
295  equalQuery("short_not_null_btree", "idx_short_not_null_btree", (short)8, 8);
296  greaterEqualQuery("short_not_null_btree", "idx_short_not_null_btree", (short)7, 7, 8, 9);
297  greaterThanQuery("short_not_null_btree", "idx_short_not_null_btree", (short)6, 7, 8, 9);
298  lessEqualQuery("short_not_null_btree", "idx_short_not_null_btree", (short)4, 4, 3, 2, 1, 0);
299  lessThanQuery("short_not_null_btree", "idx_short_not_null_btree", (short)4, 3, 2, 1, 0);
300  betweenQuery("short_not_null_btree", "idx_short_not_null_btree", (short)4, (short)6, 4, 5, 6);
301  greaterEqualAndLessEqualQuery("short_not_null_btree", "idx_short_not_null_btree", (short)4, (short)6, 4, 5, 6);
302  greaterThanAndLessEqualQuery("short_not_null_btree", "idx_short_not_null_btree", (short)4, (short)6, 5, 6);
303  greaterEqualAndLessThanQuery("short_not_null_btree", "idx_short_not_null_btree", (short)4, (short)6, 4, 5);
304  greaterThanAndLessThanQuery("short_not_null_btree", "idx_short_not_null_btree", (short)4, (short)6, 5);
305 
306  equalQuery("short_null_btree", "idx_short_null_btree", (short)8, 8);
307  greaterEqualQuery("short_null_btree", "idx_short_null_btree", (short)7, 7, 8, 9);
308  greaterThanQuery("short_null_btree", "idx_short_null_btree", (short)6, 7, 8, 9);
309  lessEqualQuery("short_null_btree", "idx_short_null_btree", (short)4, 4, 3, 2, 1, 0);
310  lessThanQuery("short_null_btree", "idx_short_null_btree", (short)4, 3, 2, 1, 0);
311  betweenQuery("short_null_btree", "idx_short_null_btree", (short)4, (short)6, 4, 5, 6);
312  greaterEqualAndLessEqualQuery("short_null_btree", "idx_short_null_btree", (short)4, (short)6, 4, 5, 6);
313  greaterThanAndLessEqualQuery("short_null_btree", "idx_short_null_btree", (short)4, (short)6, 5, 6);
314  greaterEqualAndLessThanQuery("short_null_btree", "idx_short_null_btree", (short)4, (short)6, 4, 5);
315  greaterThanAndLessThanQuery("short_null_btree", "idx_short_null_btree", (short)4, (short)6, 5);
316  }
317 
318  public void hashIndexScanShort() {
319  equalQuery("short_not_null_hash", "idx_short_not_null_hash", (short)8, 8);
320  greaterEqualQuery("short_not_null_hash", "none", (short)7, 7, 8, 9);
321  greaterThanQuery("short_not_null_hash", "none", (short)6, 7, 8, 9);
322  lessEqualQuery("short_not_null_hash", "none", (short)4, 4, 3, 2, 1, 0);
323  lessThanQuery("short_not_null_hash", "none", (short)4, 3, 2, 1, 0);
324  betweenQuery("short_not_null_hash", "none", (short)4, (short)6, 4, 5, 6);
325  greaterEqualAndLessEqualQuery("short_not_null_hash", "none", (short)4, (short)6, 4, 5, 6);
326  greaterThanAndLessEqualQuery("short_not_null_hash", "none", (short)4, (short)6, 5, 6);
327  greaterEqualAndLessThanQuery("short_not_null_hash", "none", (short)4, (short)6, 4, 5);
328  greaterThanAndLessThanQuery("short_not_null_hash", "none", (short)4, (short)6, 5);
329 
330  equalQuery("short_null_hash", "idx_short_null_hash", (short)8, 8);
331  greaterEqualQuery("short_null_hash", "none", (short)7, 7, 8, 9);
332  greaterThanQuery("short_null_hash", "none", (short)6, 7, 8, 9);
333  lessEqualQuery("short_null_hash", "none", (short)4, 4, 3, 2, 1, 0);
334  lessThanQuery("short_null_hash", "none", (short)4, 3, 2, 1, 0);
335  betweenQuery("short_null_hash", "none", (short)4, (short)6, 4, 5, 6);
336  greaterEqualAndLessEqualQuery("short_null_hash", "none", (short)4, (short)6, 4, 5, 6);
337  greaterThanAndLessEqualQuery("short_null_hash", "none", (short)4, (short)6, 5, 6);
338  greaterEqualAndLessThanQuery("short_null_hash", "none", (short)4, (short)6, 4, 5);
339  greaterThanAndLessThanQuery("short_null_hash", "none", (short)4, (short)6, 5);
340  }
341 
342  public void bothIndexScanShort() {
343  equalQuery("short_not_null_both", "idx_short_not_null_both", (short)8, 8);
344  greaterEqualQuery("short_not_null_both", "idx_short_not_null_both", (short)7, 7, 8, 9);
345  greaterThanQuery("short_not_null_both", "idx_short_not_null_both", (short)6, 7, 8, 9);
346  lessEqualQuery("short_not_null_both", "idx_short_not_null_both", (short)4, 4, 3, 2, 1, 0);
347  lessThanQuery("short_not_null_both", "idx_short_not_null_both", (short)4, 3, 2, 1, 0);
348  betweenQuery("short_not_null_both", "idx_short_not_null_both", (short)4, (short)6, 4, 5, 6);
349  greaterEqualAndLessEqualQuery("short_not_null_both", "idx_short_not_null_both", (short)4, (short)6, 4, 5, 6);
350  greaterThanAndLessEqualQuery("short_not_null_both", "idx_short_not_null_both", (short)4, (short)6, 5, 6);
351  greaterEqualAndLessThanQuery("short_not_null_both", "idx_short_not_null_both", (short)4, (short)6, 4, 5);
352  greaterThanAndLessThanQuery("short_not_null_both", "idx_short_not_null_both", (short)4, (short)6, 5);
353 
354  equalQuery("short_null_both", "idx_short_null_both", (short)8, 8);
355  greaterEqualQuery("short_null_both", "idx_short_null_both", (short)7, 7, 8, 9);
356  greaterThanQuery("short_null_both", "idx_short_null_both", (short)6, 7, 8, 9);
357  lessEqualQuery("short_null_both", "idx_short_null_both", (short)4, 4, 3, 2, 1, 0);
358  lessThanQuery("short_null_both", "idx_short_null_both", (short)4, 3, 2, 1, 0);
359  betweenQuery("short_null_both", "idx_short_null_both", (short)4, (short)6, 4, 5, 6);
360  greaterEqualAndLessEqualQuery("short_null_both", "idx_short_null_both", (short)4, (short)6, 4, 5, 6);
361  greaterThanAndLessEqualQuery("short_null_both", "idx_short_null_both", (short)4, (short)6, 5, 6);
362  greaterEqualAndLessThanQuery("short_null_both", "idx_short_null_both", (short)4, (short)6, 4, 5);
363  greaterThanAndLessThanQuery("short_null_both", "idx_short_null_both", (short)4, (short)6, 5);
364  }
365 
366  public void noneIndexScanShort() {
367  equalQuery("short_not_null_none", "none", (short)8, 8);
368  greaterEqualQuery("short_not_null_none", "none", (short)7, 7, 8, 9);
369  greaterThanQuery("short_not_null_none", "none", (short)6, 7, 8, 9);
370  lessEqualQuery("short_not_null_none", "none", (short)4, 4, 3, 2, 1, 0);
371  lessThanQuery("short_not_null_none", "none", (short)4, 3, 2, 1, 0);
372  betweenQuery("short_not_null_none", "none", (short)4, (short)6, 4, 5, 6);
373  greaterEqualAndLessEqualQuery("short_not_null_none", "none", (short)4, (short)6, 4, 5, 6);
374  greaterThanAndLessEqualQuery("short_not_null_none", "none", (short)4, (short)6, 5, 6);
375  greaterEqualAndLessThanQuery("short_not_null_none", "none", (short)4, (short)6, 4, 5);
376  greaterThanAndLessThanQuery("short_not_null_none", "none", (short)4, (short)6, 5);
377 
378  equalQuery("short_null_none", "none", (short)8, 8);
379  greaterEqualQuery("short_null_none", "none", (short)7, 7, 8, 9);
380  greaterThanQuery("short_null_none", "none", (short)6, 7, 8, 9);
381  lessEqualQuery("short_null_none", "none", (short)4, 4, 3, 2, 1, 0);
382  lessThanQuery("short_null_none", "none", (short)4, 3, 2, 1, 0);
383  betweenQuery("short_null_none", "none", (short)4, (short)6, 4, 5, 6);
384  greaterEqualAndLessEqualQuery("short_null_none", "none", (short)4, (short)6, 4, 5, 6);
385  greaterThanAndLessEqualQuery("short_null_none", "none", (short)4, (short)6, 5, 6);
386  greaterEqualAndLessThanQuery("short_null_none", "none", (short)4, (short)6, 4, 5);
387  greaterThanAndLessThanQuery("short_null_none", "none", (short)4, (short)6, 5);
388  }
389 
390  public void btreeIndexScanLong() {
391  equalQuery("long_not_null_btree", "idx_long_not_null_btree", (long)8, 8);
392  greaterEqualQuery("long_not_null_btree", "idx_long_not_null_btree", (long)7, 7, 8, 9);
393  greaterThanQuery("long_not_null_btree", "idx_long_not_null_btree", (long)6, 7, 8, 9);
394  lessEqualQuery("long_not_null_btree", "idx_long_not_null_btree", (long)4, 4, 3, 2, 1, 0);
395  lessThanQuery("long_not_null_btree", "idx_long_not_null_btree", (long)4, 3, 2, 1, 0);
396  betweenQuery("long_not_null_btree", "idx_long_not_null_btree", (long)4, (long)6, 4, 5, 6);
397  greaterEqualAndLessEqualQuery("long_not_null_btree", "idx_long_not_null_btree", (long)4, (long)6, 4, 5, 6);
398  greaterThanAndLessEqualQuery("long_not_null_btree", "idx_long_not_null_btree", (long)4, (long)6, 5, 6);
399  greaterEqualAndLessThanQuery("long_not_null_btree", "idx_long_not_null_btree", (long)4, (long)6, 4, 5);
400  greaterThanAndLessThanQuery("long_not_null_btree", "idx_long_not_null_btree", (long)4, (long)6, 5);
401 
402  equalQuery("long_null_btree", "idx_long_null_btree", (long)8, 8);
403  greaterEqualQuery("long_null_btree", "idx_long_null_btree", (long)7, 7, 8, 9);
404  greaterThanQuery("long_null_btree", "idx_long_null_btree", (long)6, 7, 8, 9);
405  lessEqualQuery("long_null_btree", "idx_long_null_btree", (long)4, 4, 3, 2, 1, 0);
406  lessThanQuery("long_null_btree", "idx_long_null_btree", (long)4, 3, 2, 1, 0);
407  betweenQuery("long_null_btree", "idx_long_null_btree", (long)4, (long)6, 4, 5, 6);
408  greaterEqualAndLessEqualQuery("long_null_btree", "idx_long_null_btree", (long)4, (long)6, 4, 5, 6);
409  greaterThanAndLessEqualQuery("long_null_btree", "idx_long_null_btree", (long)4, (long)6, 5, 6);
410  greaterEqualAndLessThanQuery("long_null_btree", "idx_long_null_btree", (long)4, (long)6, 4, 5);
411  greaterThanAndLessThanQuery("long_null_btree", "idx_long_null_btree", (long)4, (long)6, 5);
412  }
413 
414  public void hashIndexScanLong() {
415  equalQuery("long_not_null_hash", "idx_long_not_null_hash", (long)8, 8);
416  greaterEqualQuery("long_not_null_hash", "none", (long)7, 7, 8, 9);
417  greaterThanQuery("long_not_null_hash", "none", (long)6, 7, 8, 9);
418  lessEqualQuery("long_not_null_hash", "none", (long)4, 4, 3, 2, 1, 0);
419  lessThanQuery("long_not_null_hash", "none", (long)4, 3, 2, 1, 0);
420  betweenQuery("long_not_null_hash", "none", (long)4, (long)6, 4, 5, 6);
421  greaterEqualAndLessEqualQuery("long_not_null_hash", "none", (long)4, (long)6, 4, 5, 6);
422  greaterThanAndLessEqualQuery("long_not_null_hash", "none", (long)4, (long)6, 5, 6);
423  greaterEqualAndLessThanQuery("long_not_null_hash", "none", (long)4, (long)6, 4, 5);
424  greaterThanAndLessThanQuery("long_not_null_hash", "none", (long)4, (long)6, 5);
425 
426  equalQuery("long_null_hash", "idx_long_null_hash", (long)8, 8);
427  greaterEqualQuery("long_null_hash", "none", (long)7, 7, 8, 9);
428  greaterThanQuery("long_null_hash", "none", (long)6, 7, 8, 9);
429  lessEqualQuery("long_null_hash", "none", (long)4, 4, 3, 2, 1, 0);
430  lessThanQuery("long_null_hash", "none", (long)4, 3, 2, 1, 0);
431  betweenQuery("long_null_hash", "none", (long)4, (long)6, 4, 5, 6);
432  greaterEqualAndLessEqualQuery("long_null_hash", "none", (long)4, (long)6, 4, 5, 6);
433  greaterThanAndLessEqualQuery("long_null_hash", "none", (long)4, (long)6, 5, 6);
434  greaterEqualAndLessThanQuery("long_null_hash", "none", (long)4, (long)6, 4, 5);
435  greaterThanAndLessThanQuery("long_null_hash", "none", (long)4, (long)6, 5);
436  }
437 
438  public void bothIndexScanLong() {
439  equalQuery("long_not_null_both", "idx_long_not_null_both", (long)8, 8);
440  greaterEqualQuery("long_not_null_both", "idx_long_not_null_both", (long)7, 7, 8, 9);
441  greaterThanQuery("long_not_null_both", "idx_long_not_null_both", (long)6, 7, 8, 9);
442  lessEqualQuery("long_not_null_both", "idx_long_not_null_both", (long)4, 4, 3, 2, 1, 0);
443  lessThanQuery("long_not_null_both", "idx_long_not_null_both", (long)4, 3, 2, 1, 0);
444  betweenQuery("long_not_null_both", "idx_long_not_null_both", (long)4, (long)6, 4, 5, 6);
445  greaterEqualAndLessEqualQuery("long_not_null_both", "idx_long_not_null_both", (long)4, (long)6, 4, 5, 6);
446  greaterThanAndLessEqualQuery("long_not_null_both", "idx_long_not_null_both", (long)4, (long)6, 5, 6);
447  greaterEqualAndLessThanQuery("long_not_null_both", "idx_long_not_null_both", (long)4, (long)6, 4, 5);
448  greaterThanAndLessThanQuery("long_not_null_both", "idx_long_not_null_both", (long)4, (long)6, 5);
449 
450  equalQuery("long_null_both", "idx_long_null_both", (long)8, 8);
451  greaterEqualQuery("long_null_both", "idx_long_null_both", (long)7, 7, 8, 9);
452  greaterThanQuery("long_null_both", "idx_long_null_both", (long)6, 7, 8, 9);
453  lessEqualQuery("long_null_both", "idx_long_null_both", (long)4, 4, 3, 2, 1, 0);
454  lessThanQuery("long_null_both", "idx_long_null_both", (long)4, 3, 2, 1, 0);
455  betweenQuery("long_null_both", "idx_long_null_both", (long)4, (long)6, 4, 5, 6);
456  greaterEqualAndLessEqualQuery("long_null_both", "idx_long_null_both", (long)4, (long)6, 4, 5, 6);
457  greaterThanAndLessEqualQuery("long_null_both", "idx_long_null_both", (long)4, (long)6, 5, 6);
458  greaterEqualAndLessThanQuery("long_null_both", "idx_long_null_both", (long)4, (long)6, 4, 5);
459  greaterThanAndLessThanQuery("long_null_both", "idx_long_null_both", (long)4, (long)6, 5);
460  }
461 
462  public void noneIndexScanLong() {
463  equalQuery("long_not_null_none", "none", (long)8, 8);
464  greaterEqualQuery("long_not_null_none", "none", (long)7, 7, 8, 9);
465  greaterThanQuery("long_not_null_none", "none", (long)6, 7, 8, 9);
466  lessEqualQuery("long_not_null_none", "none", (long)4, 4, 3, 2, 1, 0);
467  lessThanQuery("long_not_null_none", "none", (long)4, 3, 2, 1, 0);
468  betweenQuery("long_not_null_none", "none", (long)4, (long)6, 4, 5, 6);
469  greaterEqualAndLessEqualQuery("long_not_null_none", "none", (long)4, (long)6, 4, 5, 6);
470  greaterThanAndLessEqualQuery("long_not_null_none", "none", (long)4, (long)6, 5, 6);
471  greaterEqualAndLessThanQuery("long_not_null_none", "none", (long)4, (long)6, 4, 5);
472  greaterThanAndLessThanQuery("long_not_null_none", "none", (long)4, (long)6, 5);
473 
474  equalQuery("long_null_none", "none", (long)8, 8);
475  greaterEqualQuery("long_null_none", "none", (long)7, 7, 8, 9);
476  greaterThanQuery("long_null_none", "none", (long)6, 7, 8, 9);
477  lessEqualQuery("long_null_none", "none", (long)4, 4, 3, 2, 1, 0);
478  lessThanQuery("long_null_none", "none", (long)4, 3, 2, 1, 0);
479  betweenQuery("long_null_none", "none", (long)4, (long)6, 4, 5, 6);
480  greaterEqualAndLessEqualQuery("long_null_none", "none", (long)4, (long)6, 4, 5, 6);
481  greaterThanAndLessEqualQuery("long_null_none", "none", (long)4, (long)6, 5, 6);
482  greaterEqualAndLessThanQuery("long_null_none", "none", (long)4, (long)6, 4, 5);
483  greaterThanAndLessThanQuery("long_null_none", "none", (long)4, (long)6, 5);
484  }
485 
486 }