SQLite

Check-in [0bdb7ae126]
Login

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

Overview
Comment:Test cases for the improved LIKE/GLOB matcher.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 0bdb7ae126d3909344640813489ee68ecad041c4
User & Date: drh 2016-12-02 02:19:24.505
Context
2016-12-02
17:08
Extend the valid range of 'unixepoch' dates from JulianDay 0 through 9999-12-31. (check-in: 768c9859b2 user: drh tags: trunk)
14:15
Fix a potential integer overflow during out-of-bound date computations. (Closed-Leaf check-in: 3c58b173d9 user: drh tags: date-overflow-fix)
02:19
Test cases for the improved LIKE/GLOB matcher. (check-in: 0bdb7ae126 user: drh tags: trunk)
2016-12-01
19:58
Avoid clearing the EP_FromJoin flag from terms in ON clauses when flattening sub-selects. Possible fix for [2df0107b]. (check-in: a427c40528 user: dan tags: trunk)
Changes
Side-by-Side Diff Ignore Whitespace Patch
Changes to test/like.test.
976
977
978
979
980
981
982


983

















984
985
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







+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+


do_execsql_test like-13.3 {
  SELECT char(0x304d) LIKE char(0x6d);
} {0}
do_execsql_test like-13.4 {
  SELECT char(0x4d) LIKE char(0x6d);
} {1}

# Performance testing for patterns with many wildcards.  These LIKE and GLOB
# patterns were quite slow with SQLite 3.15.2 and earlier.

#
do_test like-14.1 {
  set x [lindex [time {
    db one {SELECT 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaz'GLOB'*a*a*a*a*a*a*a*a*y'}
  }] 0]
  puts -nonewline " ($x ms - want less than 1000) "
  expr {$x<1000}
} {1}
ifcapable !icu {
  do_test like-14.2 {
    set x [lindex [time {
      db one {SELECT 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaz'LIKE'%a%a%a%a%a%a%a%a%y'}
    }] 0]
    puts -nonewline " ($x ms - want less than 1000) "
    expr {$x<1000}
  } {1}
}

finish_test