/ Check-in [33548744]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix the LIKE query optimizer so that it works with LIKE patterns ending in '@%' on NOCASE columns. Ticket #3139. (CVS 5158)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 33548744369643cc8843b74ad1fc1b7d5988d7a4
User & Date: drh 2008-05-26 18:33:41
Context
2008-05-26
18:41
Import 'rtree' extension. (CVS 5159) check-in: b104dcd6 user: danielk1977 tags: trunk
18:33
Fix the LIKE query optimizer so that it works with LIKE patterns ending in '@%' on NOCASE columns. Ticket #3139. (CVS 5158) check-in: 33548744 user: drh tags: trunk
2008-05-23
17:21
Fixed various typos, spelling, grammar, and formatting mistakes. Ticket #3124. (CVS 5157) check-in: 77d5a7aa user: shane tags: trunk
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Changes to src/where.c.

12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
...
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
...
921
922
923
924
925
926
927


928

929
930
931
932
933
934
935
** This module contains C code that generates VDBE code used to process
** the WHERE clause of SQL statements.  This module is reponsible for
** generating the code that loops through a table looking for applicable
** rows.  Indices are selected and used to speed the search when doing
** so is applicable.  Because this module is responsible for selecting
** indices, you might also think of this module as the "query optimizer".
**
** $Id: where.c,v 1.303 2008/05/16 15:40:40 danielk1977 Exp $
*/
#include "sqliteInt.h"

/*
** The number of bits in a Bitmask.  "BMS" means "BitMask Size".
*/
#define BMS  (sizeof(Bitmask)*8)
................................................................................
  ** operator.
  **
  ** A like pattern of the form "x LIKE 'abc%'" is changed into constraints
  **
  **          x>='abc' AND x<'abd' AND x LIKE 'abc%'
  **
  ** The last character of the prefix "abc" is incremented to form the
  ** termination condidtion "abd".  This trick of incrementing the last
  ** is not 255 and if the character set is not EBCDIC.  
  */
  if( isLikeOrGlob(db, pExpr, &nPattern, &isComplete, &noCase) ){
    Expr *pLeft, *pRight;
    Expr *pStr1, *pStr2;
    Expr *pNewExpr1, *pNewExpr2;
    int idxNew1, idxNew2;

................................................................................
    }
    pStr2 = sqlite3ExprDup(db, pStr1);
    if( !db->mallocFailed ){
      u8 c, *pC;
      assert( pStr2->token.dyn );
      pC = (u8*)&pStr2->token.z[nPattern-1];
      c = *pC;


      if( noCase ) c = sqlite3UpperToLower[c];

      *pC = c + 1;
    }
    pNewExpr1 = sqlite3PExpr(pParse, TK_GE, sqlite3ExprDup(db,pLeft), pStr1, 0);
    idxNew1 = whereClauseInsert(pWC, pNewExpr1, TERM_VIRTUAL|TERM_DYNAMIC);
    exprAnalyze(pSrc, pWC, idxNew1);
    pNewExpr2 = sqlite3PExpr(pParse, TK_LT, sqlite3ExprDup(db,pLeft), pStr2, 0);
    idxNew2 = whereClauseInsert(pWC, pNewExpr2, TERM_VIRTUAL|TERM_DYNAMIC);







|







 







|
<







 







>
>
|
>







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
...
898
899
900
901
902
903
904
905

906
907
908
909
910
911
912
...
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
** This module contains C code that generates VDBE code used to process
** the WHERE clause of SQL statements.  This module is reponsible for
** generating the code that loops through a table looking for applicable
** rows.  Indices are selected and used to speed the search when doing
** so is applicable.  Because this module is responsible for selecting
** indices, you might also think of this module as the "query optimizer".
**
** $Id: where.c,v 1.304 2008/05/26 18:33:41 drh Exp $
*/
#include "sqliteInt.h"

/*
** The number of bits in a Bitmask.  "BMS" means "BitMask Size".
*/
#define BMS  (sizeof(Bitmask)*8)
................................................................................
  ** operator.
  **
  ** A like pattern of the form "x LIKE 'abc%'" is changed into constraints
  **
  **          x>='abc' AND x<'abd' AND x LIKE 'abc%'
  **
  ** The last character of the prefix "abc" is incremented to form the
  ** termination condidtion "abd".

  */
  if( isLikeOrGlob(db, pExpr, &nPattern, &isComplete, &noCase) ){
    Expr *pLeft, *pRight;
    Expr *pStr1, *pStr2;
    Expr *pNewExpr1, *pNewExpr2;
    int idxNew1, idxNew2;

................................................................................
    }
    pStr2 = sqlite3ExprDup(db, pStr1);
    if( !db->mallocFailed ){
      u8 c, *pC;
      assert( pStr2->token.dyn );
      pC = (u8*)&pStr2->token.z[nPattern-1];
      c = *pC;
      if( noCase ){
        if( c=='@' ) isComplete = 0;
        c = sqlite3UpperToLower[c];
      }
      *pC = c + 1;
    }
    pNewExpr1 = sqlite3PExpr(pParse, TK_GE, sqlite3ExprDup(db,pLeft), pStr1, 0);
    idxNew1 = whereClauseInsert(pWC, pNewExpr1, TERM_VIRTUAL|TERM_DYNAMIC);
    exprAnalyze(pSrc, pWC, idxNew1);
    pNewExpr2 = sqlite3PExpr(pParse, TK_LT, sqlite3ExprDup(db,pLeft), pStr2, 0);
    idxNew2 = whereClauseInsert(pWC, pNewExpr2, TERM_VIRTUAL|TERM_DYNAMIC);

Added test/like2.test.



































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
# 2008 May 26
#
# The author disclaims copyright to this source code.  In place of
# a legal notice, here is a blessing:
#
#    May you do good and not evil.
#    May you find forgiveness for yourself and forgive others.
#    May you share freely, never taking more than you give.
#
#***********************************************************************
# This file implements regression tests for SQLite library.  The
# focus of this file is testing the LIKE and GLOB operators and
# in particular the optimizations that occur to help those operators
# run faster.
#
# $Id: like2.test,v 1.1 2008/05/26 18:33:41 drh Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl

do_test like2-1.1 {
  db eval {
    CREATE TABLE t1(x INT, y COLLATE NOCASE);
    INSERT INTO t1(x,y) VALUES(1,CAST(x'01' AS TEXT));
    INSERT INTO t1(x,y) VALUES(2,CAST(x'02' AS TEXT));
    INSERT INTO t1(x,y) VALUES(3,CAST(x'03' AS TEXT));
    INSERT INTO t1(x,y) VALUES(4,CAST(x'04' AS TEXT));
    INSERT INTO t1(x,y) VALUES(5,CAST(x'05' AS TEXT));
    INSERT INTO t1(x,y) VALUES(6,CAST(x'06' AS TEXT));
    INSERT INTO t1(x,y) VALUES(7,CAST(x'07' AS TEXT));
    INSERT INTO t1(x,y) VALUES(8,CAST(x'08' AS TEXT));
    INSERT INTO t1(x,y) VALUES(9,CAST(x'09' AS TEXT));
    INSERT INTO t1(x,y) VALUES(10,CAST(x'0a' AS TEXT));
    INSERT INTO t1(x,y) VALUES(11,CAST(x'0b' AS TEXT));
    INSERT INTO t1(x,y) VALUES(12,CAST(x'0c' AS TEXT));
    INSERT INTO t1(x,y) VALUES(13,CAST(x'0d' AS TEXT));
    INSERT INTO t1(x,y) VALUES(14,CAST(x'0e' AS TEXT));
    INSERT INTO t1(x,y) VALUES(15,CAST(x'0f' AS TEXT));
    INSERT INTO t1(x,y) VALUES(16,CAST(x'10' AS TEXT));
    INSERT INTO t1(x,y) VALUES(17,CAST(x'11' AS TEXT));
    INSERT INTO t1(x,y) VALUES(18,CAST(x'12' AS TEXT));
    INSERT INTO t1(x,y) VALUES(19,CAST(x'13' AS TEXT));
    INSERT INTO t1(x,y) VALUES(20,CAST(x'14' AS TEXT));
    INSERT INTO t1(x,y) VALUES(21,CAST(x'15' AS TEXT));
    INSERT INTO t1(x,y) VALUES(22,CAST(x'16' AS TEXT));
    INSERT INTO t1(x,y) VALUES(23,CAST(x'17' AS TEXT));
    INSERT INTO t1(x,y) VALUES(24,CAST(x'18' AS TEXT));
    INSERT INTO t1(x,y) VALUES(25,CAST(x'19' AS TEXT));
    INSERT INTO t1(x,y) VALUES(26,CAST(x'1a' AS TEXT));
    INSERT INTO t1(x,y) VALUES(27,CAST(x'1b' AS TEXT));
    INSERT INTO t1(x,y) VALUES(28,CAST(x'1c' AS TEXT));
    INSERT INTO t1(x,y) VALUES(29,CAST(x'1d' AS TEXT));
    INSERT INTO t1(x,y) VALUES(30,CAST(x'1e' AS TEXT));
    INSERT INTO t1(x,y) VALUES(31,CAST(x'1f' AS TEXT));
    INSERT INTO t1(x,y) VALUES(32,' ');
    INSERT INTO t1(x,y) VALUES(33,'!');
    INSERT INTO t1(x,y) VALUES(34,'"');
    INSERT INTO t1(x,y) VALUES(35,'#');
    INSERT INTO t1(x,y) VALUES(36,'$');
    INSERT INTO t1(x,y) VALUES(37,'%');
    INSERT INTO t1(x,y) VALUES(38,'&');
    INSERT INTO t1(x,y) VALUES(39,'''');
    INSERT INTO t1(x,y) VALUES(40,'(');
    INSERT INTO t1(x,y) VALUES(41,')');
    INSERT INTO t1(x,y) VALUES(42,'*');
    INSERT INTO t1(x,y) VALUES(43,'+');
    INSERT INTO t1(x,y) VALUES(44,',');
    INSERT INTO t1(x,y) VALUES(45,'-');
    INSERT INTO t1(x,y) VALUES(46,'.');
    INSERT INTO t1(x,y) VALUES(47,'/');
    INSERT INTO t1(x,y) VALUES(48,'0');
    INSERT INTO t1(x,y) VALUES(49,'1');
    INSERT INTO t1(x,y) VALUES(50,'2');
    INSERT INTO t1(x,y) VALUES(51,'3');
    INSERT INTO t1(x,y) VALUES(52,'4');
    INSERT INTO t1(x,y) VALUES(53,'5');
    INSERT INTO t1(x,y) VALUES(54,'6');
    INSERT INTO t1(x,y) VALUES(55,'7');
    INSERT INTO t1(x,y) VALUES(56,'8');
    INSERT INTO t1(x,y) VALUES(57,'9');
    INSERT INTO t1(x,y) VALUES(58,':');
    INSERT INTO t1(x,y) VALUES(59,';');
    INSERT INTO t1(x,y) VALUES(60,'<');
    INSERT INTO t1(x,y) VALUES(61,'=');
    INSERT INTO t1(x,y) VALUES(62,'>');
    INSERT INTO t1(x,y) VALUES(63,'?');
    INSERT INTO t1(x,y) VALUES(64,'@');
    INSERT INTO t1(x,y) VALUES(65,'A');
    INSERT INTO t1(x,y) VALUES(66,'B');
    INSERT INTO t1(x,y) VALUES(67,'C');
    INSERT INTO t1(x,y) VALUES(68,'D');
    INSERT INTO t1(x,y) VALUES(69,'E');
    INSERT INTO t1(x,y) VALUES(70,'F');
    INSERT INTO t1(x,y) VALUES(71,'G');
    INSERT INTO t1(x,y) VALUES(72,'H');
    INSERT INTO t1(x,y) VALUES(73,'I');
    INSERT INTO t1(x,y) VALUES(74,'J');
    INSERT INTO t1(x,y) VALUES(75,'K');
    INSERT INTO t1(x,y) VALUES(76,'L');
    INSERT INTO t1(x,y) VALUES(77,'M');
    INSERT INTO t1(x,y) VALUES(78,'N');
    INSERT INTO t1(x,y) VALUES(79,'O');
    INSERT INTO t1(x,y) VALUES(80,'P');
    INSERT INTO t1(x,y) VALUES(81,'Q');
    INSERT INTO t1(x,y) VALUES(82,'R');
    INSERT INTO t1(x,y) VALUES(83,'S');
    INSERT INTO t1(x,y) VALUES(84,'T');
    INSERT INTO t1(x,y) VALUES(85,'U');
    INSERT INTO t1(x,y) VALUES(86,'V');
    INSERT INTO t1(x,y) VALUES(87,'W');
    INSERT INTO t1(x,y) VALUES(88,'X');
    INSERT INTO t1(x,y) VALUES(89,'Y');
    INSERT INTO t1(x,y) VALUES(90,'Z');
    INSERT INTO t1(x,y) VALUES(91,'[');
    INSERT INTO t1(x,y) VALUES(92,'\');
    INSERT INTO t1(x,y) VALUES(93,']');
    INSERT INTO t1(x,y) VALUES(94,'^');
    INSERT INTO t1(x,y) VALUES(95,'_');
    INSERT INTO t1(x,y) VALUES(96,'`');
    INSERT INTO t1(x,y) VALUES(97,'a');
    INSERT INTO t1(x,y) VALUES(98,'b');
    INSERT INTO t1(x,y) VALUES(99,'c');
    INSERT INTO t1(x,y) VALUES(100,'d');
    INSERT INTO t1(x,y) VALUES(101,'e');
    INSERT INTO t1(x,y) VALUES(102,'f');
    INSERT INTO t1(x,y) VALUES(103,'g');
    INSERT INTO t1(x,y) VALUES(104,'h');
    INSERT INTO t1(x,y) VALUES(105,'i');
    INSERT INTO t1(x,y) VALUES(106,'j');
    INSERT INTO t1(x,y) VALUES(107,'k');
    INSERT INTO t1(x,y) VALUES(108,'l');
    INSERT INTO t1(x,y) VALUES(109,'m');
    INSERT INTO t1(x,y) VALUES(110,'n');
    INSERT INTO t1(x,y) VALUES(111,'o');
    INSERT INTO t1(x,y) VALUES(112,'p');
    INSERT INTO t1(x,y) VALUES(113,'q');
    INSERT INTO t1(x,y) VALUES(114,'r');
    INSERT INTO t1(x,y) VALUES(115,'s');
    INSERT INTO t1(x,y) VALUES(116,'t');
    INSERT INTO t1(x,y) VALUES(117,'u');
    INSERT INTO t1(x,y) VALUES(118,'v');
    INSERT INTO t1(x,y) VALUES(119,'w');
    INSERT INTO t1(x,y) VALUES(120,'x');
    INSERT INTO t1(x,y) VALUES(121,'y');
    INSERT INTO t1(x,y) VALUES(122,'z');
    INSERT INTO t1(x,y) VALUES(123,'{');
    INSERT INTO t1(x,y) VALUES(124,'|');
    INSERT INTO t1(x,y) VALUES(125,'}');
    INSERT INTO t1(x,y) VALUES(126,'~');
    INSERT INTO t1(x,y) VALUES(127,CAST(x'7f' AS TEXT));
    SELECT count(*) FROM t1;
  }
} {127}
do_test like2-1.2 {
  db eval {
    CREATE TABLE t2(x INT, y COLLATE NOCASE);
    INSERT INTO t2 SELECT * FROM t1;
    CREATE INDEX i2 ON t2(y);
    SELECT count(*) FROM t2;
  }
} {127}
do_test like2-1.3 {
  db eval {
    CREATE TABLE t3(x INT, y COLLATE NOCASE);
    INSERT INTO t3 SELECT x, 'abc' || y || 'xyz' FROM t1;
    CREATE INDEX i3 ON t3(y);
    SELECT count(*) FROM t2;
  }
} {127}
do_test like-2.32.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE ' %'"
} {32}
do_test like-2.32.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE ' %'"
} {32}
do_test like-2.32.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc %'"
} {32}
do_test like-2.33.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE '!%'"
} {33}
do_test like-2.33.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE '!%'"
} {33}
do_test like-2.33.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc!%'"
} {33}
do_test like-2.34.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE '\"%'"
} {34}
do_test like-2.34.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE '\"%'"
} {34}
do_test like-2.34.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc\"%'"
} {34}
do_test like-2.35.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE '#%'"
} {35}
do_test like-2.35.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE '#%'"
} {35}
do_test like-2.35.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc#%'"
} {35}
do_test like-2.36.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE '\$%'"
} {36}
do_test like-2.36.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE '\$%'"
} {36}
do_test like-2.36.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc\$%'"
} {36}
do_test like-2.38.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE '&%'"
} {38}
do_test like-2.38.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE '&%'"
} {38}
do_test like-2.38.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc&%'"
} {38}
do_test like-2.39.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE '''%'"
} {39}
do_test like-2.39.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE '''%'"
} {39}
do_test like-2.39.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc''%'"
} {39}
do_test like-2.40.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE '(%'"
} {40}
do_test like-2.40.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE '(%'"
} {40}
do_test like-2.40.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc(%'"
} {40}
do_test like-2.41.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE ')%'"
} {41}
do_test like-2.41.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE ')%'"
} {41}
do_test like-2.41.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc)%'"
} {41}
do_test like-2.42.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE '*%'"
} {42}
do_test like-2.42.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE '*%'"
} {42}
do_test like-2.42.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc*%'"
} {42}
do_test like-2.43.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE '+%'"
} {43}
do_test like-2.43.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE '+%'"
} {43}
do_test like-2.43.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc+%'"
} {43}
do_test like-2.44.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE ',%'"
} {44}
do_test like-2.44.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE ',%'"
} {44}
do_test like-2.44.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc,%'"
} {44}
do_test like-2.45.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE '-%'"
} {45}
do_test like-2.45.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE '-%'"
} {45}
do_test like-2.45.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc-%'"
} {45}
do_test like-2.46.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE '.%'"
} {46}
do_test like-2.46.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE '.%'"
} {46}
do_test like-2.46.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc.%'"
} {46}
do_test like-2.47.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE '/%'"
} {47}
do_test like-2.47.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE '/%'"
} {47}
do_test like-2.47.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc/%'"
} {47}
do_test like-2.48.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE '0%'"
} {48}
do_test like-2.48.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE '0%'"
} {48}
do_test like-2.48.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc0%'"
} {48}
do_test like-2.49.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE '1%'"
} {49}
do_test like-2.49.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE '1%'"
} {49}
do_test like-2.49.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc1%'"
} {49}
do_test like-2.50.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE '2%'"
} {50}
do_test like-2.50.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE '2%'"
} {50}
do_test like-2.50.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc2%'"
} {50}
do_test like-2.51.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE '3%'"
} {51}
do_test like-2.51.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE '3%'"
} {51}
do_test like-2.51.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc3%'"
} {51}
do_test like-2.52.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE '4%'"
} {52}
do_test like-2.52.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE '4%'"
} {52}
do_test like-2.52.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc4%'"
} {52}
do_test like-2.53.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE '5%'"
} {53}
do_test like-2.53.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE '5%'"
} {53}
do_test like-2.53.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc5%'"
} {53}
do_test like-2.54.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE '6%'"
} {54}
do_test like-2.54.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE '6%'"
} {54}
do_test like-2.54.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc6%'"
} {54}
do_test like-2.55.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE '7%'"
} {55}
do_test like-2.55.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE '7%'"
} {55}
do_test like-2.55.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc7%'"
} {55}
do_test like-2.56.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE '8%'"
} {56}
do_test like-2.56.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE '8%'"
} {56}
do_test like-2.56.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc8%'"
} {56}
do_test like-2.57.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE '9%'"
} {57}
do_test like-2.57.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE '9%'"
} {57}
do_test like-2.57.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc9%'"
} {57}
do_test like-2.58.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE ':%'"
} {58}
do_test like-2.58.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE ':%'"
} {58}
do_test like-2.58.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc:%'"
} {58}
do_test like-2.59.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE ';%'"
} {59}
do_test like-2.59.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE ';%'"
} {59}
do_test like-2.59.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc;%'"
} {59}
do_test like-2.60.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE '<%'"
} {60}
do_test like-2.60.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE '<%'"
} {60}
do_test like-2.60.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc<%'"
} {60}
do_test like-2.61.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE '=%'"
} {61}
do_test like-2.61.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE '=%'"
} {61}
do_test like-2.61.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc=%'"
} {61}
do_test like-2.62.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE '>%'"
} {62}
do_test like-2.62.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE '>%'"
} {62}
do_test like-2.62.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc>%'"
} {62}
do_test like-2.63.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE '?%'"
} {63}
do_test like-2.63.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE '?%'"
} {63}
do_test like-2.63.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc?%'"
} {63}
do_test like-2.64.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE '@%'"
} {64}
do_test like-2.64.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE '@%'"
} {64}
do_test like-2.64.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc@%'"
} {64}
do_test like-2.65.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'A%'"
} {65 97}
do_test like-2.65.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'A%'"
} {65 97}
do_test like-2.65.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcA%'"
} {65 97}
do_test like-2.66.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'B%'"
} {66 98}
do_test like-2.66.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'B%'"
} {66 98}
do_test like-2.66.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcB%'"
} {66 98}
do_test like-2.67.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'C%'"
} {67 99}
do_test like-2.67.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'C%'"
} {67 99}
do_test like-2.67.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcC%'"
} {67 99}
do_test like-2.68.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'D%'"
} {68 100}
do_test like-2.68.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'D%'"
} {68 100}
do_test like-2.68.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcD%'"
} {68 100}
do_test like-2.69.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'E%'"
} {69 101}
do_test like-2.69.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'E%'"
} {69 101}
do_test like-2.69.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcE%'"
} {69 101}
do_test like-2.70.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'F%'"
} {70 102}
do_test like-2.70.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'F%'"
} {70 102}
do_test like-2.70.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcF%'"
} {70 102}
do_test like-2.71.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'G%'"
} {71 103}
do_test like-2.71.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'G%'"
} {71 103}
do_test like-2.71.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcG%'"
} {71 103}
do_test like-2.72.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'H%'"
} {72 104}
do_test like-2.72.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'H%'"
} {72 104}
do_test like-2.72.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcH%'"
} {72 104}
do_test like-2.73.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'I%'"
} {73 105}
do_test like-2.73.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'I%'"
} {73 105}
do_test like-2.73.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcI%'"
} {73 105}
do_test like-2.74.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'J%'"
} {74 106}
do_test like-2.74.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'J%'"
} {74 106}
do_test like-2.74.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcJ%'"
} {74 106}
do_test like-2.75.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'K%'"
} {75 107}
do_test like-2.75.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'K%'"
} {75 107}
do_test like-2.75.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcK%'"
} {75 107}
do_test like-2.76.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'L%'"
} {76 108}
do_test like-2.76.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'L%'"
} {76 108}
do_test like-2.76.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcL%'"
} {76 108}
do_test like-2.77.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'M%'"
} {77 109}
do_test like-2.77.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'M%'"
} {77 109}
do_test like-2.77.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcM%'"
} {77 109}
do_test like-2.78.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'N%'"
} {78 110}
do_test like-2.78.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'N%'"
} {78 110}
do_test like-2.78.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcN%'"
} {78 110}
do_test like-2.79.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'O%'"
} {79 111}
do_test like-2.79.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'O%'"
} {79 111}
do_test like-2.79.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcO%'"
} {79 111}
do_test like-2.80.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'P%'"
} {80 112}
do_test like-2.80.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'P%'"
} {80 112}
do_test like-2.80.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcP%'"
} {80 112}
do_test like-2.81.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'Q%'"
} {81 113}
do_test like-2.81.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'Q%'"
} {81 113}
do_test like-2.81.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcQ%'"
} {81 113}
do_test like-2.82.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'R%'"
} {82 114}
do_test like-2.82.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'R%'"
} {82 114}
do_test like-2.82.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcR%'"
} {82 114}
do_test like-2.83.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'S%'"
} {83 115}
do_test like-2.83.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'S%'"
} {83 115}
do_test like-2.83.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcS%'"
} {83 115}
do_test like-2.84.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'T%'"
} {84 116}
do_test like-2.84.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'T%'"
} {84 116}
do_test like-2.84.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcT%'"
} {84 116}
do_test like-2.85.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'U%'"
} {85 117}
do_test like-2.85.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'U%'"
} {85 117}
do_test like-2.85.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcU%'"
} {85 117}
do_test like-2.86.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'V%'"
} {86 118}
do_test like-2.86.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'V%'"
} {86 118}
do_test like-2.86.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcV%'"
} {86 118}
do_test like-2.87.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'W%'"
} {87 119}
do_test like-2.87.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'W%'"
} {87 119}
do_test like-2.87.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcW%'"
} {87 119}
do_test like-2.88.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'X%'"
} {88 120}
do_test like-2.88.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'X%'"
} {88 120}
do_test like-2.88.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcX%'"
} {88 120}
do_test like-2.89.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'Y%'"
} {89 121}
do_test like-2.89.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'Y%'"
} {89 121}
do_test like-2.89.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcY%'"
} {89 121}
do_test like-2.90.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'Z%'"
} {90 122}
do_test like-2.90.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'Z%'"
} {90 122}
do_test like-2.90.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcZ%'"
} {90 122}
do_test like-2.91.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE '\[%'"
} {91}
do_test like-2.91.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE '\[%'"
} {91}
do_test like-2.91.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc\[%'"
} {91}
do_test like-2.92.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE '\\%'"
} {92}
do_test like-2.92.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE '\\%'"
} {92}
do_test like-2.92.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc\\%'"
} {92}
do_test like-2.93.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE '\]%'"
} {93}
do_test like-2.93.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE '\]%'"
} {93}
do_test like-2.93.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc\]%'"
} {93}
do_test like-2.94.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE '^%'"
} {94}
do_test like-2.94.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE '^%'"
} {94}
do_test like-2.94.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc^%'"
} {94}
do_test like-2.96.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE '`%'"
} {96}
do_test like-2.96.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE '`%'"
} {96}
do_test like-2.96.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc`%'"
} {96}
do_test like-2.97.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'a%'"
} {65 97}
do_test like-2.97.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'a%'"
} {65 97}
do_test like-2.97.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abca%'"
} {65 97}
do_test like-2.98.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'b%'"
} {66 98}
do_test like-2.98.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'b%'"
} {66 98}
do_test like-2.98.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcb%'"
} {66 98}
do_test like-2.99.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'c%'"
} {67 99}
do_test like-2.99.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'c%'"
} {67 99}
do_test like-2.99.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcc%'"
} {67 99}
do_test like-2.100.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'd%'"
} {68 100}
do_test like-2.100.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'd%'"
} {68 100}
do_test like-2.100.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcd%'"
} {68 100}
do_test like-2.101.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'e%'"
} {69 101}
do_test like-2.101.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'e%'"
} {69 101}
do_test like-2.101.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abce%'"
} {69 101}
do_test like-2.102.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'f%'"
} {70 102}
do_test like-2.102.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'f%'"
} {70 102}
do_test like-2.102.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcf%'"
} {70 102}
do_test like-2.103.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'g%'"
} {71 103}
do_test like-2.103.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'g%'"
} {71 103}
do_test like-2.103.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcg%'"
} {71 103}
do_test like-2.104.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'h%'"
} {72 104}
do_test like-2.104.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'h%'"
} {72 104}
do_test like-2.104.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abch%'"
} {72 104}
do_test like-2.105.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'i%'"
} {73 105}
do_test like-2.105.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'i%'"
} {73 105}
do_test like-2.105.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abci%'"
} {73 105}
do_test like-2.106.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'j%'"
} {74 106}
do_test like-2.106.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'j%'"
} {74 106}
do_test like-2.106.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcj%'"
} {74 106}
do_test like-2.107.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'k%'"
} {75 107}
do_test like-2.107.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'k%'"
} {75 107}
do_test like-2.107.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abck%'"
} {75 107}
do_test like-2.108.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'l%'"
} {76 108}
do_test like-2.108.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'l%'"
} {76 108}
do_test like-2.108.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcl%'"
} {76 108}
do_test like-2.109.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'm%'"
} {77 109}
do_test like-2.109.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'm%'"
} {77 109}
do_test like-2.109.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcm%'"
} {77 109}
do_test like-2.110.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'n%'"
} {78 110}
do_test like-2.110.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'n%'"
} {78 110}
do_test like-2.110.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcn%'"
} {78 110}
do_test like-2.111.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'o%'"
} {79 111}
do_test like-2.111.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'o%'"
} {79 111}
do_test like-2.111.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abco%'"
} {79 111}
do_test like-2.112.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'p%'"
} {80 112}
do_test like-2.112.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'p%'"
} {80 112}
do_test like-2.112.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcp%'"
} {80 112}
do_test like-2.113.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'q%'"
} {81 113}
do_test like-2.113.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'q%'"
} {81 113}
do_test like-2.113.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcq%'"
} {81 113}
do_test like-2.114.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'r%'"
} {82 114}
do_test like-2.114.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'r%'"
} {82 114}
do_test like-2.114.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcr%'"
} {82 114}
do_test like-2.115.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 's%'"
} {83 115}
do_test like-2.115.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 's%'"
} {83 115}
do_test like-2.115.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcs%'"
} {83 115}
do_test like-2.116.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 't%'"
} {84 116}
do_test like-2.116.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 't%'"
} {84 116}
do_test like-2.116.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abct%'"
} {84 116}
do_test like-2.117.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'u%'"
} {85 117}
do_test like-2.117.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'u%'"
} {85 117}
do_test like-2.117.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcu%'"
} {85 117}
do_test like-2.118.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'v%'"
} {86 118}
do_test like-2.118.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'v%'"
} {86 118}
do_test like-2.118.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcv%'"
} {86 118}
do_test like-2.119.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'w%'"
} {87 119}
do_test like-2.119.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'w%'"
} {87 119}
do_test like-2.119.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcw%'"
} {87 119}
do_test like-2.120.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'x%'"
} {88 120}
do_test like-2.120.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'x%'"
} {88 120}
do_test like-2.120.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcx%'"
} {88 120}
do_test like-2.121.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'y%'"
} {89 121}
do_test like-2.121.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'y%'"
} {89 121}
do_test like-2.121.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcy%'"
} {89 121}
do_test like-2.122.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE 'z%'"
} {90 122}
do_test like-2.122.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE 'z%'"
} {90 122}
do_test like-2.122.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abcz%'"
} {90 122}
do_test like-2.123.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE '\173%'"
} {123}
do_test like-2.123.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE '\173%'"
} {123}
do_test like-2.123.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc\173%'"
} {123}
do_test like-2.124.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE '|%'"
} {124}
do_test like-2.124.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE '|%'"
} {124}
do_test like-2.124.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc|%'"
} {124}
do_test like-2.125.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE '\175%'"
} {125}
do_test like-2.125.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE '\175%'"
} {125}
do_test like-2.125.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc\175%'"
} {125}
do_test like-2.126.1 {
  db eval "SELECT x FROM t1 WHERE y LIKE '~%'"
} {126}
do_test like-2.126.2 {
  db eval "SELECT x FROM t2 WHERE y LIKE '~%'"
} {126}
do_test like-2.126.3 {
  db eval "SELECT x FROM t3 WHERE y LIKE 'abc~%'"
} {126}


finish_test