1
0
mirror of https://github.com/sqlite/sqlite.git synced 2026-01-06 08:01:16 +03:00

Test cases for the improved LIKE/GLOB matcher.

FossilOrigin-Name: 0bdb7ae126d3909344640813489ee68ecad041c4
This commit is contained in:
drh
2016-12-02 02:19:24 +00:00
parent edaeba5e64
commit 7a40707b1f
3 changed files with 27 additions and 10 deletions

View File

@@ -980,6 +980,24 @@ 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