summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-db/sqlite/files/sqlite-3.15.0-full_tarball-tests-icu.patch')
-rw-r--r--dev-db/sqlite/files/sqlite-3.15.0-full_tarball-tests-icu.patch64
1 files changed, 64 insertions, 0 deletions
diff --git a/dev-db/sqlite/files/sqlite-3.15.0-full_tarball-tests-icu.patch b/dev-db/sqlite/files/sqlite-3.15.0-full_tarball-tests-icu.patch
new file mode 100644
index 000000000000..7a979ae49e32
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.15.0-full_tarball-tests-icu.patch
@@ -0,0 +1,64 @@
+https://www.sqlite.org/src/info/afbbb6c66a85ff3f
+
+--- ext/icu/icu.c
++++ ext/icu/icu.c
+@@ -500,20 +500,20 @@
+ void *pContext; /* sqlite3_user_data() context */
+ void (*xFunc)(sqlite3_context*,int,sqlite3_value**);
+ } scalars[] = {
+- {"regexp", 2, SQLITE_ANY, 0, icuRegexpFunc},
++ {"regexp", 2, SQLITE_ANY|SQLITE_DETERMINISTIC, 0, icuRegexpFunc},
+
+- {"lower", 1, SQLITE_UTF16, 0, icuCaseFunc16},
+- {"lower", 2, SQLITE_UTF16, 0, icuCaseFunc16},
+- {"upper", 1, SQLITE_UTF16, (void*)1, icuCaseFunc16},
+- {"upper", 2, SQLITE_UTF16, (void*)1, icuCaseFunc16},
++ {"lower", 1, SQLITE_UTF16|SQLITE_DETERMINISTIC, 0, icuCaseFunc16},
++ {"lower", 2, SQLITE_UTF16|SQLITE_DETERMINISTIC, 0, icuCaseFunc16},
++ {"upper", 1, SQLITE_UTF16|SQLITE_DETERMINISTIC, (void*)1, icuCaseFunc16},
++ {"upper", 2, SQLITE_UTF16|SQLITE_DETERMINISTIC, (void*)1, icuCaseFunc16},
+
+- {"lower", 1, SQLITE_UTF8, 0, icuCaseFunc16},
+- {"lower", 2, SQLITE_UTF8, 0, icuCaseFunc16},
+- {"upper", 1, SQLITE_UTF8, (void*)1, icuCaseFunc16},
+- {"upper", 2, SQLITE_UTF8, (void*)1, icuCaseFunc16},
++ {"lower", 1, SQLITE_UTF8|SQLITE_DETERMINISTIC, 0, icuCaseFunc16},
++ {"lower", 2, SQLITE_UTF8|SQLITE_DETERMINISTIC, 0, icuCaseFunc16},
++ {"upper", 1, SQLITE_UTF8|SQLITE_DETERMINISTIC, (void*)1, icuCaseFunc16},
++ {"upper", 2, SQLITE_UTF8|SQLITE_DETERMINISTIC, (void*)1, icuCaseFunc16},
+
+- {"like", 2, SQLITE_UTF8, 0, icuLikeFunc},
+- {"like", 3, SQLITE_UTF8, 0, icuLikeFunc},
++ {"like", 2, SQLITE_UTF8|SQLITE_DETERMINISTIC, 0, icuLikeFunc},
++ {"like", 3, SQLITE_UTF8|SQLITE_DETERMINISTIC, 0, icuLikeFunc},
+
+ {"icu_load_collation", 2, SQLITE_UTF8, (void*)db, icuLoadCollation},
+ };
+--- test/cursorhint2.test
++++ test/cursorhint2.test
+@@ -164,17 +164,19 @@
+ x2 {AND(EQ(c1,ADD(32,32)),EQ(c0,r[2]))}
+ }
+
+-do_extract_hints_test 2.11 {
+- SELECT * FROM x1 LEFT JOIN x2 ON (a=x) WHERE x2.b LIKE 'abc%'
+-} {
+- x2 {AND(expr,EQ(c0,r[2]))}
++ifcapable !icu {
++ # This test only works using the built-in LIKE, not the ICU LIKE extension.
++ do_extract_hints_test 2.11 {
++ SELECT * FROM x1 LEFT JOIN x2 ON (a=x) WHERE x2.b LIKE 'abc%'
++ } {
++ x2 {AND(expr,EQ(c0,r[2]))}
++ }
+ }
+
+-do_extract_hints_test 2.11 {
++do_extract_hints_test 2.12 {
+ SELECT * FROM x1 LEFT JOIN x2 ON (a=x) WHERE coalesce(x2.b, 1)
+ } {
+ x2 {EQ(c0,r[2])}
+ }
+
+ finish_test
+-