summaryrefslogtreecommitdiffstats
path: root/third_party
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-03 20:40:10 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-03 20:40:10 +0000
commit40cf71fbbba4914a5aaafacf95f400115520da62 (patch)
tree6a43d87f3b680c29e5aa34d502fb7f435d41b50a /third_party
parent6c9f7496a60ab705b2418632a44731cd54ef0f26 (diff)
downloadchromium_src-40cf71fbbba4914a5aaafacf95f400115520da62.zip
chromium_src-40cf71fbbba4914a5aaafacf95f400115520da62.tar.gz
chromium_src-40cf71fbbba4914a5aaafacf95f400115520da62.tar.bz2
Unfork one of our SQLite patches, icu-regexp.patch
See discussion: http://thread.gmane.org/gmane.comp.db.sqlite.general/58457 TEST=none BUG=50769 Review URL: http://codereview.chromium.org/2806096 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54809 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r--third_party/sqlite/ext/icu/icu.c6
-rw-r--r--third_party/sqlite/icu-regexp.patch29
2 files changed, 16 insertions, 19 deletions
diff --git a/third_party/sqlite/ext/icu/icu.c b/third_party/sqlite/ext/icu/icu.c
index 8f7f76d..2e2251c 100644
--- a/third_party/sqlite/ext/icu/icu.c
+++ b/third_party/sqlite/ext/icu/icu.c
@@ -250,12 +250,12 @@ static void icuRegexpFunc(sqlite3_context *p, int nArg, sqlite3_value **apArg){
UErrorCode status = U_ZERO_ERROR;
URegularExpression *pExpr;
UBool res;
- const UChar *zString;
+ const UChar *zString = sqlite3_value_text16(apArg[1]);
/* If the left hand side of the regexp operator is NULL,
** then the result is also NULL.
*/
- if( nArg<2 || !(zString=sqlite3_value_text16(apArg[1])) ){
+ if( !zString ){
return;
}
@@ -459,7 +459,7 @@ int sqlite3IcuInit(sqlite3 *db){
void *pContext; /* sqlite3_user_data() context */
void (*xFunc)(sqlite3_context*,int,sqlite3_value**);
} scalars[] = {
- {"regexp",-1, SQLITE_ANY, 0, icuRegexpFunc},
+ {"regexp", 2, SQLITE_ANY, 0, icuRegexpFunc},
{"lower", 1, SQLITE_UTF16, 0, icuCaseFunc16},
{"lower", 2, SQLITE_UTF16, 0, icuCaseFunc16},
diff --git a/third_party/sqlite/icu-regexp.patch b/third_party/sqlite/icu-regexp.patch
index cb758ce..7aa60b5 100644
--- a/third_party/sqlite/icu-regexp.patch
+++ b/third_party/sqlite/icu-regexp.patch
@@ -1,17 +1,14 @@
---- ext/icu/icu.c.orig 2009-12-16 15:43:51.000000000 -0800
-+++ ext/icu/icu.c 2009-12-15 15:23:34.000000000 -0800
-@@ -250,12 +250,12 @@
- UErrorCode status = U_ZERO_ERROR;
- URegularExpression *pExpr;
- UBool res;
-- const UChar *zString = sqlite3_value_text16(apArg[1]);
-+ const UChar *zString;
-
- /* If the left hand side of the regexp operator is NULL,
- ** then the result is also NULL.
- */
-- if( !zString ){
-+ if( nArg<2 || !(zString=sqlite3_value_text16(apArg[1])) ){
- return;
- }
+This is a backport of upstream fix http://www.sqlite.org/src/ci/c34cf23efb,
+which was released in SQLite 3.6.22.
+===============================================================================
+--- ext/icu/icu.c.orig 2010-07-30 13:40:12.000000000 -0700
++++ ext/icu/icu.c 2010-07-30 13:40:31.000000000 -0700
+@@ -459,7 +459,7 @@
+ void *pContext; /* sqlite3_user_data() context */
+ void (*xFunc)(sqlite3_context*,int,sqlite3_value**);
+ } scalars[] = {
+- {"regexp",-1, SQLITE_ANY, 0, icuRegexpFunc},
++ {"regexp", 2, SQLITE_ANY, 0, icuRegexpFunc},
+ {"lower", 1, SQLITE_UTF16, 0, icuCaseFunc16},
+ {"lower", 2, SQLITE_UTF16, 0, icuCaseFunc16},