3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing:
6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give.
10 #***********************************************************************
11 # This file implements regression tests for SQLite library. The
12 # focus of this file is testing the LIKE and GLOB operators and
13 # in particular the optimizations that occur to help those operators
16 # $Id: like2.test,v 1.1 2008/05/26 18:33:41 drh Exp $
18 set testdir [file dirname $argv0]
19 source $testdir/tester.tcl
23 CREATE TABLE t1(x INT, y COLLATE NOCASE);
24 INSERT INTO t1(x,y) VALUES(1,CAST(x'01' AS TEXT));
25 INSERT INTO t1(x,y) VALUES(2,CAST(x'02' AS TEXT));
26 INSERT INTO t1(x,y) VALUES(3,CAST(x'03' AS TEXT));
27 INSERT INTO t1(x,y) VALUES(4,CAST(x'04' AS TEXT));
28 INSERT INTO t1(x,y) VALUES(5,CAST(x'05' AS TEXT));
29 INSERT INTO t1(x,y) VALUES(6,CAST(x'06' AS TEXT));
30 INSERT INTO t1(x,y) VALUES(7,CAST(x'07' AS TEXT));
31 INSERT INTO t1(x,y) VALUES(8,CAST(x'08' AS TEXT));
32 INSERT INTO t1(x,y) VALUES(9,CAST(x'09' AS TEXT));
33 INSERT INTO t1(x,y) VALUES(10,CAST(x'0a' AS TEXT));
34 INSERT INTO t1(x,y) VALUES(11,CAST(x'0b' AS TEXT));
35 INSERT INTO t1(x,y) VALUES(12,CAST(x'0c' AS TEXT));
36 INSERT INTO t1(x,y) VALUES(13,CAST(x'0d' AS TEXT));
37 INSERT INTO t1(x,y) VALUES(14,CAST(x'0e' AS TEXT));
38 INSERT INTO t1(x,y) VALUES(15,CAST(x'0f' AS TEXT));
39 INSERT INTO t1(x,y) VALUES(16,CAST(x'10' AS TEXT));
40 INSERT INTO t1(x,y) VALUES(17,CAST(x'11' AS TEXT));
41 INSERT INTO t1(x,y) VALUES(18,CAST(x'12' AS TEXT));
42 INSERT INTO t1(x,y) VALUES(19,CAST(x'13' AS TEXT));
43 INSERT INTO t1(x,y) VALUES(20,CAST(x'14' AS TEXT));
44 INSERT INTO t1(x,y) VALUES(21,CAST(x'15' AS TEXT));
45 INSERT INTO t1(x,y) VALUES(22,CAST(x'16' AS TEXT));
46 INSERT INTO t1(x,y) VALUES(23,CAST(x'17' AS TEXT));
47 INSERT INTO t1(x,y) VALUES(24,CAST(x'18' AS TEXT));
48 INSERT INTO t1(x,y) VALUES(25,CAST(x'19' AS TEXT));
49 INSERT INTO t1(x,y) VALUES(26,CAST(x'1a' AS TEXT));
50 INSERT INTO t1(x,y) VALUES(27,CAST(x'1b' AS TEXT));
51 INSERT INTO t1(x,y) VALUES(28,CAST(x'1c' AS TEXT));
52 INSERT INTO t1(x,y) VALUES(29,CAST(x'1d' AS TEXT));
53 INSERT INTO t1(x,y) VALUES(30,CAST(x'1e' AS TEXT));
54 INSERT INTO t1(x,y) VALUES(31,CAST(x'1f' AS TEXT));
55 INSERT INTO t1(x,y) VALUES(32,' ');
56 INSERT INTO t1(x,y) VALUES(33,'!');
57 INSERT INTO t1(x,y) VALUES(34,'"');
58 INSERT INTO t1(x,y) VALUES(35,'#');
59 INSERT INTO t1(x,y) VALUES(36,'$');
60 INSERT INTO t1(x,y) VALUES(37,'%');
61 INSERT INTO t1(x,y) VALUES(38,'&');
62 INSERT INTO t1(x,y) VALUES(39,'''');
63 INSERT INTO t1(x,y) VALUES(40,'(');
64 INSERT INTO t1(x,y) VALUES(41,')');
65 INSERT INTO t1(x,y) VALUES(42,'*');
66 INSERT INTO t1(x,y) VALUES(43,'+');
67 INSERT INTO t1(x,y) VALUES(44,',');
68 INSERT INTO t1(x,y) VALUES(45,'-');
69 INSERT INTO t1(x,y) VALUES(46,'.');
70 INSERT INTO t1(x,y) VALUES(47,'/');
71 INSERT INTO t1(x,y) VALUES(48,'0');
72 INSERT INTO t1(x,y) VALUES(49,'1');
73 INSERT INTO t1(x,y) VALUES(50,'2');
74 INSERT INTO t1(x,y) VALUES(51,'3');
75 INSERT INTO t1(x,y) VALUES(52,'4');
76 INSERT INTO t1(x,y) VALUES(53,'5');
77 INSERT INTO t1(x,y) VALUES(54,'6');
78 INSERT INTO t1(x,y) VALUES(55,'7');
79 INSERT INTO t1(x,y) VALUES(56,'8');
80 INSERT INTO t1(x,y) VALUES(57,'9');
81 INSERT INTO t1(x,y) VALUES(58,':');
82 INSERT INTO t1(x,y) VALUES(59,';');
83 INSERT INTO t1(x,y) VALUES(60,'<');
84 INSERT INTO t1(x,y) VALUES(61,'=');
85 INSERT INTO t1(x,y) VALUES(62,'>');
86 INSERT INTO t1(x,y) VALUES(63,'?');
87 INSERT INTO t1(x,y) VALUES(64,'@');
88 INSERT INTO t1(x,y) VALUES(65,'A');
89 INSERT INTO t1(x,y) VALUES(66,'B');
90 INSERT INTO t1(x,y) VALUES(67,'C');
91 INSERT INTO t1(x,y) VALUES(68,'D');
92 INSERT INTO t1(x,y) VALUES(69,'E');
93 INSERT INTO t1(x,y) VALUES(70,'F');
94 INSERT INTO t1(x,y) VALUES(71,'G');
95 INSERT INTO t1(x,y) VALUES(72,'H');
96 INSERT INTO t1(x,y) VALUES(73,'I');
97 INSERT INTO t1(x,y) VALUES(74,'J');
98 INSERT INTO t1(x,y) VALUES(75,'K');
99 INSERT INTO t1(x,y) VALUES(76,'L');
100 INSERT INTO t1(x,y) VALUES(77,'M');
101 INSERT INTO t1(x,y) VALUES(78,'N');
102 INSERT INTO t1(x,y) VALUES(79,'O');
103 INSERT INTO t1(x,y) VALUES(80,'P');
104 INSERT INTO t1(x,y) VALUES(81,'Q');
105 INSERT INTO t1(x,y) VALUES(82,'R');
106 INSERT INTO t1(x,y) VALUES(83,'S');
107 INSERT INTO t1(x,y) VALUES(84,'T');
108 INSERT INTO t1(x,y) VALUES(85,'U');
109 INSERT INTO t1(x,y) VALUES(86,'V');
110 INSERT INTO t1(x,y) VALUES(87,'W');
111 INSERT INTO t1(x,y) VALUES(88,'X');
112 INSERT INTO t1(x,y) VALUES(89,'Y');
113 INSERT INTO t1(x,y) VALUES(90,'Z');
114 INSERT INTO t1(x,y) VALUES(91,'[');
115 INSERT INTO t1(x,y) VALUES(92,'\');
116 INSERT INTO t1(x,y) VALUES(93,']');
117 INSERT INTO t1(x,y) VALUES(94,'^');
118 INSERT INTO t1(x,y) VALUES(95,'_');
119 INSERT INTO t1(x,y) VALUES(96,'`');
120 INSERT INTO t1(x,y) VALUES(97,'a');
121 INSERT INTO t1(x,y) VALUES(98,'b');
122 INSERT INTO t1(x,y) VALUES(99,'c');
123 INSERT INTO t1(x,y) VALUES(100,'d');
124 INSERT INTO t1(x,y) VALUES(101,'e');
125 INSERT INTO t1(x,y) VALUES(102,'f');
126 INSERT INTO t1(x,y) VALUES(103,'g');
127 INSERT INTO t1(x,y) VALUES(104,'h');
128 INSERT INTO t1(x,y) VALUES(105,'i');
129 INSERT INTO t1(x,y) VALUES(106,'j');
130 INSERT INTO t1(x,y) VALUES(107,'k');
131 INSERT INTO t1(x,y) VALUES(108,'l');
132 INSERT INTO t1(x,y) VALUES(109,'m');
133 INSERT INTO t1(x,y) VALUES(110,'n');
134 INSERT INTO t1(x,y) VALUES(111,'o');
135 INSERT INTO t1(x,y) VALUES(112,'p');
136 INSERT INTO t1(x,y) VALUES(113,'q');
137 INSERT INTO t1(x,y) VALUES(114,'r');
138 INSERT INTO t1(x,y) VALUES(115,'s');
139 INSERT INTO t1(x,y) VALUES(116,'t');
140 INSERT INTO t1(x,y) VALUES(117,'u');
141 INSERT INTO t1(x,y) VALUES(118,'v');
142 INSERT INTO t1(x,y) VALUES(119,'w');
143 INSERT INTO t1(x,y) VALUES(120,'x');
144 INSERT INTO t1(x,y) VALUES(121,'y');
145 INSERT INTO t1(x,y) VALUES(122,'z');
146 INSERT INTO t1(x,y) VALUES(123,'{');
147 INSERT INTO t1(x,y) VALUES(124,'|');
148 INSERT INTO t1(x,y) VALUES(125,'}');
149 INSERT INTO t1(x,y) VALUES(126,'~');
150 INSERT INTO t1(x,y) VALUES(127,CAST(x'7f' AS TEXT));
151 SELECT count(*) FROM t1;
156 CREATE TABLE t2(x INT, y COLLATE NOCASE);
157 INSERT INTO t2 SELECT * FROM t1;
158 CREATE INDEX i2 ON t2(y);
159 SELECT count(*) FROM t2;
164 CREATE TABLE t3(x INT, y COLLATE NOCASE);
165 INSERT INTO t3 SELECT x, 'abc' || y || 'xyz' FROM t1;
166 CREATE INDEX i3 ON t3(y);
167 SELECT count(*) FROM t2;
170 do_test like-2.32.1 {
171 db eval "SELECT x FROM t1 WHERE y LIKE ' %'"
173 do_test like-2.32.2 {
174 db eval "SELECT x FROM t2 WHERE y LIKE ' %'"
176 do_test like-2.32.3 {
177 db eval "SELECT x FROM t3 WHERE y LIKE 'abc %'"
179 do_test like-2.33.1 {
180 db eval "SELECT x FROM t1 WHERE y LIKE '!%'"
182 do_test like-2.33.2 {
183 db eval "SELECT x FROM t2 WHERE y LIKE '!%'"
185 do_test like-2.33.3 {
186 db eval "SELECT x FROM t3 WHERE y LIKE 'abc!%'"
188 do_test like-2.34.1 {
189 db eval "SELECT x FROM t1 WHERE y LIKE '\"%'"
191 do_test like-2.34.2 {
192 db eval "SELECT x FROM t2 WHERE y LIKE '\"%'"
194 do_test like-2.34.3 {
195 db eval "SELECT x FROM t3 WHERE y LIKE 'abc\"%'"
197 do_test like-2.35.1 {
198 db eval "SELECT x FROM t1 WHERE y LIKE '#%'"
200 do_test like-2.35.2 {
201 db eval "SELECT x FROM t2 WHERE y LIKE '#%'"
203 do_test like-2.35.3 {
204 db eval "SELECT x FROM t3 WHERE y LIKE 'abc#%'"
206 do_test like-2.36.1 {
207 db eval "SELECT x FROM t1 WHERE y LIKE '\$%'"
209 do_test like-2.36.2 {
210 db eval "SELECT x FROM t2 WHERE y LIKE '\$%'"
212 do_test like-2.36.3 {
213 db eval "SELECT x FROM t3 WHERE y LIKE 'abc\$%'"
215 do_test like-2.38.1 {
216 db eval "SELECT x FROM t1 WHERE y LIKE '&%'"
218 do_test like-2.38.2 {
219 db eval "SELECT x FROM t2 WHERE y LIKE '&%'"
221 do_test like-2.38.3 {
222 db eval "SELECT x FROM t3 WHERE y LIKE 'abc&%'"
224 do_test like-2.39.1 {
225 db eval "SELECT x FROM t1 WHERE y LIKE '''%'"
227 do_test like-2.39.2 {
228 db eval "SELECT x FROM t2 WHERE y LIKE '''%'"
230 do_test like-2.39.3 {
231 db eval "SELECT x FROM t3 WHERE y LIKE 'abc''%'"
233 do_test like-2.40.1 {
234 db eval "SELECT x FROM t1 WHERE y LIKE '(%'"
236 do_test like-2.40.2 {
237 db eval "SELECT x FROM t2 WHERE y LIKE '(%'"
239 do_test like-2.40.3 {
240 db eval "SELECT x FROM t3 WHERE y LIKE 'abc(%'"
242 do_test like-2.41.1 {
243 db eval "SELECT x FROM t1 WHERE y LIKE ')%'"
245 do_test like-2.41.2 {
246 db eval "SELECT x FROM t2 WHERE y LIKE ')%'"
248 do_test like-2.41.3 {
249 db eval "SELECT x FROM t3 WHERE y LIKE 'abc)%'"
251 do_test like-2.42.1 {
252 db eval "SELECT x FROM t1 WHERE y LIKE '*%'"
254 do_test like-2.42.2 {
255 db eval "SELECT x FROM t2 WHERE y LIKE '*%'"
257 do_test like-2.42.3 {
258 db eval "SELECT x FROM t3 WHERE y LIKE 'abc*%'"
260 do_test like-2.43.1 {
261 db eval "SELECT x FROM t1 WHERE y LIKE '+%'"
263 do_test like-2.43.2 {
264 db eval "SELECT x FROM t2 WHERE y LIKE '+%'"
266 do_test like-2.43.3 {
267 db eval "SELECT x FROM t3 WHERE y LIKE 'abc+%'"
269 do_test like-2.44.1 {
270 db eval "SELECT x FROM t1 WHERE y LIKE ',%'"
272 do_test like-2.44.2 {
273 db eval "SELECT x FROM t2 WHERE y LIKE ',%'"
275 do_test like-2.44.3 {
276 db eval "SELECT x FROM t3 WHERE y LIKE 'abc,%'"
278 do_test like-2.45.1 {
279 db eval "SELECT x FROM t1 WHERE y LIKE '-%'"
281 do_test like-2.45.2 {
282 db eval "SELECT x FROM t2 WHERE y LIKE '-%'"
284 do_test like-2.45.3 {
285 db eval "SELECT x FROM t3 WHERE y LIKE 'abc-%'"
287 do_test like-2.46.1 {
288 db eval "SELECT x FROM t1 WHERE y LIKE '.%'"
290 do_test like-2.46.2 {
291 db eval "SELECT x FROM t2 WHERE y LIKE '.%'"
293 do_test like-2.46.3 {
294 db eval "SELECT x FROM t3 WHERE y LIKE 'abc.%'"
296 do_test like-2.47.1 {
297 db eval "SELECT x FROM t1 WHERE y LIKE '/%'"
299 do_test like-2.47.2 {
300 db eval "SELECT x FROM t2 WHERE y LIKE '/%'"
302 do_test like-2.47.3 {
303 db eval "SELECT x FROM t3 WHERE y LIKE 'abc/%'"
305 do_test like-2.48.1 {
306 db eval "SELECT x FROM t1 WHERE y LIKE '0%'"
308 do_test like-2.48.2 {
309 db eval "SELECT x FROM t2 WHERE y LIKE '0%'"
311 do_test like-2.48.3 {
312 db eval "SELECT x FROM t3 WHERE y LIKE 'abc0%'"
314 do_test like-2.49.1 {
315 db eval "SELECT x FROM t1 WHERE y LIKE '1%'"
317 do_test like-2.49.2 {
318 db eval "SELECT x FROM t2 WHERE y LIKE '1%'"
320 do_test like-2.49.3 {
321 db eval "SELECT x FROM t3 WHERE y LIKE 'abc1%'"
323 do_test like-2.50.1 {
324 db eval "SELECT x FROM t1 WHERE y LIKE '2%'"
326 do_test like-2.50.2 {
327 db eval "SELECT x FROM t2 WHERE y LIKE '2%'"
329 do_test like-2.50.3 {
330 db eval "SELECT x FROM t3 WHERE y LIKE 'abc2%'"
332 do_test like-2.51.1 {
333 db eval "SELECT x FROM t1 WHERE y LIKE '3%'"
335 do_test like-2.51.2 {
336 db eval "SELECT x FROM t2 WHERE y LIKE '3%'"
338 do_test like-2.51.3 {
339 db eval "SELECT x FROM t3 WHERE y LIKE 'abc3%'"
341 do_test like-2.52.1 {
342 db eval "SELECT x FROM t1 WHERE y LIKE '4%'"
344 do_test like-2.52.2 {
345 db eval "SELECT x FROM t2 WHERE y LIKE '4%'"
347 do_test like-2.52.3 {
348 db eval "SELECT x FROM t3 WHERE y LIKE 'abc4%'"
350 do_test like-2.53.1 {
351 db eval "SELECT x FROM t1 WHERE y LIKE '5%'"
353 do_test like-2.53.2 {
354 db eval "SELECT x FROM t2 WHERE y LIKE '5%'"
356 do_test like-2.53.3 {
357 db eval "SELECT x FROM t3 WHERE y LIKE 'abc5%'"
359 do_test like-2.54.1 {
360 db eval "SELECT x FROM t1 WHERE y LIKE '6%'"
362 do_test like-2.54.2 {
363 db eval "SELECT x FROM t2 WHERE y LIKE '6%'"
365 do_test like-2.54.3 {
366 db eval "SELECT x FROM t3 WHERE y LIKE 'abc6%'"
368 do_test like-2.55.1 {
369 db eval "SELECT x FROM t1 WHERE y LIKE '7%'"
371 do_test like-2.55.2 {
372 db eval "SELECT x FROM t2 WHERE y LIKE '7%'"
374 do_test like-2.55.3 {
375 db eval "SELECT x FROM t3 WHERE y LIKE 'abc7%'"
377 do_test like-2.56.1 {
378 db eval "SELECT x FROM t1 WHERE y LIKE '8%'"
380 do_test like-2.56.2 {
381 db eval "SELECT x FROM t2 WHERE y LIKE '8%'"
383 do_test like-2.56.3 {
384 db eval "SELECT x FROM t3 WHERE y LIKE 'abc8%'"
386 do_test like-2.57.1 {
387 db eval "SELECT x FROM t1 WHERE y LIKE '9%'"
389 do_test like-2.57.2 {
390 db eval "SELECT x FROM t2 WHERE y LIKE '9%'"
392 do_test like-2.57.3 {
393 db eval "SELECT x FROM t3 WHERE y LIKE 'abc9%'"
395 do_test like-2.58.1 {
396 db eval "SELECT x FROM t1 WHERE y LIKE ':%'"
398 do_test like-2.58.2 {
399 db eval "SELECT x FROM t2 WHERE y LIKE ':%'"
401 do_test like-2.58.3 {
402 db eval "SELECT x FROM t3 WHERE y LIKE 'abc:%'"
404 do_test like-2.59.1 {
405 db eval "SELECT x FROM t1 WHERE y LIKE ';%'"
407 do_test like-2.59.2 {
408 db eval "SELECT x FROM t2 WHERE y LIKE ';%'"
410 do_test like-2.59.3 {
411 db eval "SELECT x FROM t3 WHERE y LIKE 'abc;%'"
413 do_test like-2.60.1 {
414 db eval "SELECT x FROM t1 WHERE y LIKE '<%'"
416 do_test like-2.60.2 {
417 db eval "SELECT x FROM t2 WHERE y LIKE '<%'"
419 do_test like-2.60.3 {
420 db eval "SELECT x FROM t3 WHERE y LIKE 'abc<%'"
422 do_test like-2.61.1 {
423 db eval "SELECT x FROM t1 WHERE y LIKE '=%'"
425 do_test like-2.61.2 {
426 db eval "SELECT x FROM t2 WHERE y LIKE '=%'"
428 do_test like-2.61.3 {
429 db eval "SELECT x FROM t3 WHERE y LIKE 'abc=%'"
431 do_test like-2.62.1 {
432 db eval "SELECT x FROM t1 WHERE y LIKE '>%'"
434 do_test like-2.62.2 {
435 db eval "SELECT x FROM t2 WHERE y LIKE '>%'"
437 do_test like-2.62.3 {
438 db eval "SELECT x FROM t3 WHERE y LIKE 'abc>%'"
440 do_test like-2.63.1 {
441 db eval "SELECT x FROM t1 WHERE y LIKE '?%'"
443 do_test like-2.63.2 {
444 db eval "SELECT x FROM t2 WHERE y LIKE '?%'"
446 do_test like-2.63.3 {
447 db eval "SELECT x FROM t3 WHERE y LIKE 'abc?%'"
449 do_test like-2.64.1 {
450 db eval "SELECT x FROM t1 WHERE y LIKE '@%'"
452 do_test like-2.64.2 {
453 db eval "SELECT x FROM t2 WHERE y LIKE '@%'"
455 do_test like-2.64.3 {
456 db eval "SELECT x FROM t3 WHERE y LIKE 'abc@%'"
458 do_test like-2.65.1 {
459 db eval "SELECT x FROM t1 WHERE y LIKE 'A%'"
461 do_test like-2.65.2 {
462 db eval "SELECT x FROM t2 WHERE y LIKE 'A%'"
464 do_test like-2.65.3 {
465 db eval "SELECT x FROM t3 WHERE y LIKE 'abcA%'"
467 do_test like-2.66.1 {
468 db eval "SELECT x FROM t1 WHERE y LIKE 'B%'"
470 do_test like-2.66.2 {
471 db eval "SELECT x FROM t2 WHERE y LIKE 'B%'"
473 do_test like-2.66.3 {
474 db eval "SELECT x FROM t3 WHERE y LIKE 'abcB%'"
476 do_test like-2.67.1 {
477 db eval "SELECT x FROM t1 WHERE y LIKE 'C%'"
479 do_test like-2.67.2 {
480 db eval "SELECT x FROM t2 WHERE y LIKE 'C%'"
482 do_test like-2.67.3 {
483 db eval "SELECT x FROM t3 WHERE y LIKE 'abcC%'"
485 do_test like-2.68.1 {
486 db eval "SELECT x FROM t1 WHERE y LIKE 'D%'"
488 do_test like-2.68.2 {
489 db eval "SELECT x FROM t2 WHERE y LIKE 'D%'"
491 do_test like-2.68.3 {
492 db eval "SELECT x FROM t3 WHERE y LIKE 'abcD%'"
494 do_test like-2.69.1 {
495 db eval "SELECT x FROM t1 WHERE y LIKE 'E%'"
497 do_test like-2.69.2 {
498 db eval "SELECT x FROM t2 WHERE y LIKE 'E%'"
500 do_test like-2.69.3 {
501 db eval "SELECT x FROM t3 WHERE y LIKE 'abcE%'"
503 do_test like-2.70.1 {
504 db eval "SELECT x FROM t1 WHERE y LIKE 'F%'"
506 do_test like-2.70.2 {
507 db eval "SELECT x FROM t2 WHERE y LIKE 'F%'"
509 do_test like-2.70.3 {
510 db eval "SELECT x FROM t3 WHERE y LIKE 'abcF%'"
512 do_test like-2.71.1 {
513 db eval "SELECT x FROM t1 WHERE y LIKE 'G%'"
515 do_test like-2.71.2 {
516 db eval "SELECT x FROM t2 WHERE y LIKE 'G%'"
518 do_test like-2.71.3 {
519 db eval "SELECT x FROM t3 WHERE y LIKE 'abcG%'"
521 do_test like-2.72.1 {
522 db eval "SELECT x FROM t1 WHERE y LIKE 'H%'"
524 do_test like-2.72.2 {
525 db eval "SELECT x FROM t2 WHERE y LIKE 'H%'"
527 do_test like-2.72.3 {
528 db eval "SELECT x FROM t3 WHERE y LIKE 'abcH%'"
530 do_test like-2.73.1 {
531 db eval "SELECT x FROM t1 WHERE y LIKE 'I%'"
533 do_test like-2.73.2 {
534 db eval "SELECT x FROM t2 WHERE y LIKE 'I%'"
536 do_test like-2.73.3 {
537 db eval "SELECT x FROM t3 WHERE y LIKE 'abcI%'"
539 do_test like-2.74.1 {
540 db eval "SELECT x FROM t1 WHERE y LIKE 'J%'"
542 do_test like-2.74.2 {
543 db eval "SELECT x FROM t2 WHERE y LIKE 'J%'"
545 do_test like-2.74.3 {
546 db eval "SELECT x FROM t3 WHERE y LIKE 'abcJ%'"
548 do_test like-2.75.1 {
549 db eval "SELECT x FROM t1 WHERE y LIKE 'K%'"
551 do_test like-2.75.2 {
552 db eval "SELECT x FROM t2 WHERE y LIKE 'K%'"
554 do_test like-2.75.3 {
555 db eval "SELECT x FROM t3 WHERE y LIKE 'abcK%'"
557 do_test like-2.76.1 {
558 db eval "SELECT x FROM t1 WHERE y LIKE 'L%'"
560 do_test like-2.76.2 {
561 db eval "SELECT x FROM t2 WHERE y LIKE 'L%'"
563 do_test like-2.76.3 {
564 db eval "SELECT x FROM t3 WHERE y LIKE 'abcL%'"
566 do_test like-2.77.1 {
567 db eval "SELECT x FROM t1 WHERE y LIKE 'M%'"
569 do_test like-2.77.2 {
570 db eval "SELECT x FROM t2 WHERE y LIKE 'M%'"
572 do_test like-2.77.3 {
573 db eval "SELECT x FROM t3 WHERE y LIKE 'abcM%'"
575 do_test like-2.78.1 {
576 db eval "SELECT x FROM t1 WHERE y LIKE 'N%'"
578 do_test like-2.78.2 {
579 db eval "SELECT x FROM t2 WHERE y LIKE 'N%'"
581 do_test like-2.78.3 {
582 db eval "SELECT x FROM t3 WHERE y LIKE 'abcN%'"
584 do_test like-2.79.1 {
585 db eval "SELECT x FROM t1 WHERE y LIKE 'O%'"
587 do_test like-2.79.2 {
588 db eval "SELECT x FROM t2 WHERE y LIKE 'O%'"
590 do_test like-2.79.3 {
591 db eval "SELECT x FROM t3 WHERE y LIKE 'abcO%'"
593 do_test like-2.80.1 {
594 db eval "SELECT x FROM t1 WHERE y LIKE 'P%'"
596 do_test like-2.80.2 {
597 db eval "SELECT x FROM t2 WHERE y LIKE 'P%'"
599 do_test like-2.80.3 {
600 db eval "SELECT x FROM t3 WHERE y LIKE 'abcP%'"
602 do_test like-2.81.1 {
603 db eval "SELECT x FROM t1 WHERE y LIKE 'Q%'"
605 do_test like-2.81.2 {
606 db eval "SELECT x FROM t2 WHERE y LIKE 'Q%'"
608 do_test like-2.81.3 {
609 db eval "SELECT x FROM t3 WHERE y LIKE 'abcQ%'"
611 do_test like-2.82.1 {
612 db eval "SELECT x FROM t1 WHERE y LIKE 'R%'"
614 do_test like-2.82.2 {
615 db eval "SELECT x FROM t2 WHERE y LIKE 'R%'"
617 do_test like-2.82.3 {
618 db eval "SELECT x FROM t3 WHERE y LIKE 'abcR%'"
620 do_test like-2.83.1 {
621 db eval "SELECT x FROM t1 WHERE y LIKE 'S%'"
623 do_test like-2.83.2 {
624 db eval "SELECT x FROM t2 WHERE y LIKE 'S%'"
626 do_test like-2.83.3 {
627 db eval "SELECT x FROM t3 WHERE y LIKE 'abcS%'"
629 do_test like-2.84.1 {
630 db eval "SELECT x FROM t1 WHERE y LIKE 'T%'"
632 do_test like-2.84.2 {
633 db eval "SELECT x FROM t2 WHERE y LIKE 'T%'"
635 do_test like-2.84.3 {
636 db eval "SELECT x FROM t3 WHERE y LIKE 'abcT%'"
638 do_test like-2.85.1 {
639 db eval "SELECT x FROM t1 WHERE y LIKE 'U%'"
641 do_test like-2.85.2 {
642 db eval "SELECT x FROM t2 WHERE y LIKE 'U%'"
644 do_test like-2.85.3 {
645 db eval "SELECT x FROM t3 WHERE y LIKE 'abcU%'"
647 do_test like-2.86.1 {
648 db eval "SELECT x FROM t1 WHERE y LIKE 'V%'"
650 do_test like-2.86.2 {
651 db eval "SELECT x FROM t2 WHERE y LIKE 'V%'"
653 do_test like-2.86.3 {
654 db eval "SELECT x FROM t3 WHERE y LIKE 'abcV%'"
656 do_test like-2.87.1 {
657 db eval "SELECT x FROM t1 WHERE y LIKE 'W%'"
659 do_test like-2.87.2 {
660 db eval "SELECT x FROM t2 WHERE y LIKE 'W%'"
662 do_test like-2.87.3 {
663 db eval "SELECT x FROM t3 WHERE y LIKE 'abcW%'"
665 do_test like-2.88.1 {
666 db eval "SELECT x FROM t1 WHERE y LIKE 'X%'"
668 do_test like-2.88.2 {
669 db eval "SELECT x FROM t2 WHERE y LIKE 'X%'"
671 do_test like-2.88.3 {
672 db eval "SELECT x FROM t3 WHERE y LIKE 'abcX%'"
674 do_test like-2.89.1 {
675 db eval "SELECT x FROM t1 WHERE y LIKE 'Y%'"
677 do_test like-2.89.2 {
678 db eval "SELECT x FROM t2 WHERE y LIKE 'Y%'"
680 do_test like-2.89.3 {
681 db eval "SELECT x FROM t3 WHERE y LIKE 'abcY%'"
683 do_test like-2.90.1 {
684 db eval "SELECT x FROM t1 WHERE y LIKE 'Z%'"
686 do_test like-2.90.2 {
687 db eval "SELECT x FROM t2 WHERE y LIKE 'Z%'"
689 do_test like-2.90.3 {
690 db eval "SELECT x FROM t3 WHERE y LIKE 'abcZ%'"
692 do_test like-2.91.1 {
693 db eval "SELECT x FROM t1 WHERE y LIKE '\[%'"
695 do_test like-2.91.2 {
696 db eval "SELECT x FROM t2 WHERE y LIKE '\[%'"
698 do_test like-2.91.3 {
699 db eval "SELECT x FROM t3 WHERE y LIKE 'abc\[%'"
701 do_test like-2.92.1 {
702 db eval "SELECT x FROM t1 WHERE y LIKE '\\%'"
704 do_test like-2.92.2 {
705 db eval "SELECT x FROM t2 WHERE y LIKE '\\%'"
707 do_test like-2.92.3 {
708 db eval "SELECT x FROM t3 WHERE y LIKE 'abc\\%'"
710 do_test like-2.93.1 {
711 db eval "SELECT x FROM t1 WHERE y LIKE '\]%'"
713 do_test like-2.93.2 {
714 db eval "SELECT x FROM t2 WHERE y LIKE '\]%'"
716 do_test like-2.93.3 {
717 db eval "SELECT x FROM t3 WHERE y LIKE 'abc\]%'"
719 do_test like-2.94.1 {
720 db eval "SELECT x FROM t1 WHERE y LIKE '^%'"
722 do_test like-2.94.2 {
723 db eval "SELECT x FROM t2 WHERE y LIKE '^%'"
725 do_test like-2.94.3 {
726 db eval "SELECT x FROM t3 WHERE y LIKE 'abc^%'"
728 do_test like-2.96.1 {
729 db eval "SELECT x FROM t1 WHERE y LIKE '`%'"
731 do_test like-2.96.2 {
732 db eval "SELECT x FROM t2 WHERE y LIKE '`%'"
734 do_test like-2.96.3 {
735 db eval "SELECT x FROM t3 WHERE y LIKE 'abc`%'"
737 do_test like-2.97.1 {
738 db eval "SELECT x FROM t1 WHERE y LIKE 'a%'"
740 do_test like-2.97.2 {
741 db eval "SELECT x FROM t2 WHERE y LIKE 'a%'"
743 do_test like-2.97.3 {
744 db eval "SELECT x FROM t3 WHERE y LIKE 'abca%'"
746 do_test like-2.98.1 {
747 db eval "SELECT x FROM t1 WHERE y LIKE 'b%'"
749 do_test like-2.98.2 {
750 db eval "SELECT x FROM t2 WHERE y LIKE 'b%'"
752 do_test like-2.98.3 {
753 db eval "SELECT x FROM t3 WHERE y LIKE 'abcb%'"
755 do_test like-2.99.1 {
756 db eval "SELECT x FROM t1 WHERE y LIKE 'c%'"
758 do_test like-2.99.2 {
759 db eval "SELECT x FROM t2 WHERE y LIKE 'c%'"
761 do_test like-2.99.3 {
762 db eval "SELECT x FROM t3 WHERE y LIKE 'abcc%'"
764 do_test like-2.100.1 {
765 db eval "SELECT x FROM t1 WHERE y LIKE 'd%'"
767 do_test like-2.100.2 {
768 db eval "SELECT x FROM t2 WHERE y LIKE 'd%'"
770 do_test like-2.100.3 {
771 db eval "SELECT x FROM t3 WHERE y LIKE 'abcd%'"
773 do_test like-2.101.1 {
774 db eval "SELECT x FROM t1 WHERE y LIKE 'e%'"
776 do_test like-2.101.2 {
777 db eval "SELECT x FROM t2 WHERE y LIKE 'e%'"
779 do_test like-2.101.3 {
780 db eval "SELECT x FROM t3 WHERE y LIKE 'abce%'"
782 do_test like-2.102.1 {
783 db eval "SELECT x FROM t1 WHERE y LIKE 'f%'"
785 do_test like-2.102.2 {
786 db eval "SELECT x FROM t2 WHERE y LIKE 'f%'"
788 do_test like-2.102.3 {
789 db eval "SELECT x FROM t3 WHERE y LIKE 'abcf%'"
791 do_test like-2.103.1 {
792 db eval "SELECT x FROM t1 WHERE y LIKE 'g%'"
794 do_test like-2.103.2 {
795 db eval "SELECT x FROM t2 WHERE y LIKE 'g%'"
797 do_test like-2.103.3 {
798 db eval "SELECT x FROM t3 WHERE y LIKE 'abcg%'"
800 do_test like-2.104.1 {
801 db eval "SELECT x FROM t1 WHERE y LIKE 'h%'"
803 do_test like-2.104.2 {
804 db eval "SELECT x FROM t2 WHERE y LIKE 'h%'"
806 do_test like-2.104.3 {
807 db eval "SELECT x FROM t3 WHERE y LIKE 'abch%'"
809 do_test like-2.105.1 {
810 db eval "SELECT x FROM t1 WHERE y LIKE 'i%'"
812 do_test like-2.105.2 {
813 db eval "SELECT x FROM t2 WHERE y LIKE 'i%'"
815 do_test like-2.105.3 {
816 db eval "SELECT x FROM t3 WHERE y LIKE 'abci%'"
818 do_test like-2.106.1 {
819 db eval "SELECT x FROM t1 WHERE y LIKE 'j%'"
821 do_test like-2.106.2 {
822 db eval "SELECT x FROM t2 WHERE y LIKE 'j%'"
824 do_test like-2.106.3 {
825 db eval "SELECT x FROM t3 WHERE y LIKE 'abcj%'"
827 do_test like-2.107.1 {
828 db eval "SELECT x FROM t1 WHERE y LIKE 'k%'"
830 do_test like-2.107.2 {
831 db eval "SELECT x FROM t2 WHERE y LIKE 'k%'"
833 do_test like-2.107.3 {
834 db eval "SELECT x FROM t3 WHERE y LIKE 'abck%'"
836 do_test like-2.108.1 {
837 db eval "SELECT x FROM t1 WHERE y LIKE 'l%'"
839 do_test like-2.108.2 {
840 db eval "SELECT x FROM t2 WHERE y LIKE 'l%'"
842 do_test like-2.108.3 {
843 db eval "SELECT x FROM t3 WHERE y LIKE 'abcl%'"
845 do_test like-2.109.1 {
846 db eval "SELECT x FROM t1 WHERE y LIKE 'm%'"
848 do_test like-2.109.2 {
849 db eval "SELECT x FROM t2 WHERE y LIKE 'm%'"
851 do_test like-2.109.3 {
852 db eval "SELECT x FROM t3 WHERE y LIKE 'abcm%'"
854 do_test like-2.110.1 {
855 db eval "SELECT x FROM t1 WHERE y LIKE 'n%'"
857 do_test like-2.110.2 {
858 db eval "SELECT x FROM t2 WHERE y LIKE 'n%'"
860 do_test like-2.110.3 {
861 db eval "SELECT x FROM t3 WHERE y LIKE 'abcn%'"
863 do_test like-2.111.1 {
864 db eval "SELECT x FROM t1 WHERE y LIKE 'o%'"
866 do_test like-2.111.2 {
867 db eval "SELECT x FROM t2 WHERE y LIKE 'o%'"
869 do_test like-2.111.3 {
870 db eval "SELECT x FROM t3 WHERE y LIKE 'abco%'"
872 do_test like-2.112.1 {
873 db eval "SELECT x FROM t1 WHERE y LIKE 'p%'"
875 do_test like-2.112.2 {
876 db eval "SELECT x FROM t2 WHERE y LIKE 'p%'"
878 do_test like-2.112.3 {
879 db eval "SELECT x FROM t3 WHERE y LIKE 'abcp%'"
881 do_test like-2.113.1 {
882 db eval "SELECT x FROM t1 WHERE y LIKE 'q%'"
884 do_test like-2.113.2 {
885 db eval "SELECT x FROM t2 WHERE y LIKE 'q%'"
887 do_test like-2.113.3 {
888 db eval "SELECT x FROM t3 WHERE y LIKE 'abcq%'"
890 do_test like-2.114.1 {
891 db eval "SELECT x FROM t1 WHERE y LIKE 'r%'"
893 do_test like-2.114.2 {
894 db eval "SELECT x FROM t2 WHERE y LIKE 'r%'"
896 do_test like-2.114.3 {
897 db eval "SELECT x FROM t3 WHERE y LIKE 'abcr%'"
899 do_test like-2.115.1 {
900 db eval "SELECT x FROM t1 WHERE y LIKE 's%'"
902 do_test like-2.115.2 {
903 db eval "SELECT x FROM t2 WHERE y LIKE 's%'"
905 do_test like-2.115.3 {
906 db eval "SELECT x FROM t3 WHERE y LIKE 'abcs%'"
908 do_test like-2.116.1 {
909 db eval "SELECT x FROM t1 WHERE y LIKE 't%'"
911 do_test like-2.116.2 {
912 db eval "SELECT x FROM t2 WHERE y LIKE 't%'"
914 do_test like-2.116.3 {
915 db eval "SELECT x FROM t3 WHERE y LIKE 'abct%'"
917 do_test like-2.117.1 {
918 db eval "SELECT x FROM t1 WHERE y LIKE 'u%'"
920 do_test like-2.117.2 {
921 db eval "SELECT x FROM t2 WHERE y LIKE 'u%'"
923 do_test like-2.117.3 {
924 db eval "SELECT x FROM t3 WHERE y LIKE 'abcu%'"
926 do_test like-2.118.1 {
927 db eval "SELECT x FROM t1 WHERE y LIKE 'v%'"
929 do_test like-2.118.2 {
930 db eval "SELECT x FROM t2 WHERE y LIKE 'v%'"
932 do_test like-2.118.3 {
933 db eval "SELECT x FROM t3 WHERE y LIKE 'abcv%'"
935 do_test like-2.119.1 {
936 db eval "SELECT x FROM t1 WHERE y LIKE 'w%'"
938 do_test like-2.119.2 {
939 db eval "SELECT x FROM t2 WHERE y LIKE 'w%'"
941 do_test like-2.119.3 {
942 db eval "SELECT x FROM t3 WHERE y LIKE 'abcw%'"
944 do_test like-2.120.1 {
945 db eval "SELECT x FROM t1 WHERE y LIKE 'x%'"
947 do_test like-2.120.2 {
948 db eval "SELECT x FROM t2 WHERE y LIKE 'x%'"
950 do_test like-2.120.3 {
951 db eval "SELECT x FROM t3 WHERE y LIKE 'abcx%'"
953 do_test like-2.121.1 {
954 db eval "SELECT x FROM t1 WHERE y LIKE 'y%'"
956 do_test like-2.121.2 {
957 db eval "SELECT x FROM t2 WHERE y LIKE 'y%'"
959 do_test like-2.121.3 {
960 db eval "SELECT x FROM t3 WHERE y LIKE 'abcy%'"
962 do_test like-2.122.1 {
963 db eval "SELECT x FROM t1 WHERE y LIKE 'z%'"
965 do_test like-2.122.2 {
966 db eval "SELECT x FROM t2 WHERE y LIKE 'z%'"
968 do_test like-2.122.3 {
969 db eval "SELECT x FROM t3 WHERE y LIKE 'abcz%'"
971 do_test like-2.123.1 {
972 db eval "SELECT x FROM t1 WHERE y LIKE '\173%'"
974 do_test like-2.123.2 {
975 db eval "SELECT x FROM t2 WHERE y LIKE '\173%'"
977 do_test like-2.123.3 {
978 db eval "SELECT x FROM t3 WHERE y LIKE 'abc\173%'"
980 do_test like-2.124.1 {
981 db eval "SELECT x FROM t1 WHERE y LIKE '|%'"
983 do_test like-2.124.2 {
984 db eval "SELECT x FROM t2 WHERE y LIKE '|%'"
986 do_test like-2.124.3 {
987 db eval "SELECT x FROM t3 WHERE y LIKE 'abc|%'"
989 do_test like-2.125.1 {
990 db eval "SELECT x FROM t1 WHERE y LIKE '\175%'"
992 do_test like-2.125.2 {
993 db eval "SELECT x FROM t2 WHERE y LIKE '\175%'"
995 do_test like-2.125.3 {
996 db eval "SELECT x FROM t3 WHERE y LIKE 'abc\175%'"
998 do_test like-2.126.1 {
999 db eval "SELECT x FROM t1 WHERE y LIKE '~%'"
1001 do_test like-2.126.2 {
1002 db eval "SELECT x FROM t2 WHERE y LIKE '~%'"
1004 do_test like-2.126.3 {
1005 db eval "SELECT x FROM t3 WHERE y LIKE 'abc~%'"
1010 db eval "SELECT '\u01C0' LIKE '%\x80'"
1013 db eval "SELECT '\u0080' LIKE '%\x80'"