Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Unified Diff: third_party/sqlite/src/test/like.test

Issue 2751253002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: also clang on Linux i386 Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/sqlite/src/test/kvtest.c ('k') | third_party/sqlite/src/test/limit2.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/like.test
diff --git a/third_party/sqlite/src/test/like.test b/third_party/sqlite/src/test/like.test
index fba89e9037d42d7284ef7dc2ad5e1838fcac3bac..8082b351237083b90f509e527086ffdd4eef94be 100644
--- a/third_party/sqlite/src/test/like.test
+++ b/third_party/sqlite/src/test/like.test
@@ -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
« no previous file with comments | « third_party/sqlite/src/test/kvtest.c ('k') | third_party/sqlite/src/test/limit2.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698