diff options
author | 2015-04-19 14:21:33 +0000 | |
---|---|---|
committer | 2015-04-19 14:21:33 +0000 | |
commit | 195e5996de6de62491ca3cfe673e94ad6087aad7 (patch) | |
tree | 4ee42085a9591772cf064f0d1a9b78ecd61e7c61 /lib/libsqlite3/src/func.c | |
parent | Decouple the token code for "no request or macro" from the individual (diff) | |
download | wireguard-openbsd-195e5996de6de62491ca3cfe673e94ad6087aad7.tar.xz wireguard-openbsd-195e5996de6de62491ca3cfe673e94ad6087aad7.zip |
Update sqlite3 to 3.8.9. Changes available here:
http://sqlite.org/releaselog/3_8_9.html
Tested in bulk and ok landry@
Diffstat (limited to 'lib/libsqlite3/src/func.c')
-rw-r--r-- | lib/libsqlite3/src/func.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/lib/libsqlite3/src/func.c b/lib/libsqlite3/src/func.c index a057993413a..782a2408840 100644 --- a/lib/libsqlite3/src/func.c +++ b/lib/libsqlite3/src/func.c @@ -22,7 +22,9 @@ ** Return the collating function associated with a function. */ static CollSeq *sqlite3GetFuncCollSeq(sqlite3_context *context){ - VdbeOp *pOp = &context->pVdbe->aOp[context->iOp-1]; + VdbeOp *pOp; + assert( context->pVdbe!=0 ); + pOp = &context->pVdbe->aOp[context->iOp-1]; assert( pOp->opcode==OP_CollSeq ); assert( pOp->p4type==P4_COLLSEQ ); return pOp->p4.pColl; @@ -291,6 +293,14 @@ static void substrFunc( } } } +#ifdef SQLITE_SUBSTR_COMPATIBILITY + /* If SUBSTR_COMPATIBILITY is defined then substr(X,0,N) work the same as + ** as substr(X,1,N) - it returns the first N characters of X. This + ** is essentially a back-out of the bug-fix in check-in [5fc125d362df4b8] + ** from 2009-02-02 for compatibility of applications that exploited the + ** old buggy behavior. */ + if( p1==0 ) p1 = 1; /* <rdar://problem/6778339> */ +#endif if( argc==3 ){ p2 = sqlite3_value_int(argv[2]); if( p2<0 ){ @@ -1642,6 +1652,11 @@ void sqlite3RegisterLikeFunctions(sqlite3 *db, int caseSensitive){ ** then set aWc[0] through aWc[2] to the wildcard characters and ** return TRUE. If the function is not a LIKE-style function then ** return FALSE. +** +** *pIsNocase is set to true if uppercase and lowercase are equivalent for +** the function (default for LIKE). If the function makes the distinction +** between uppercase and lowercase (as does GLOB) then *pIsNocase is set to +** false. */ int sqlite3IsLikeFunction(sqlite3 *db, Expr *pExpr, int *pIsNocase, char *aWc){ FuncDef *pDef; |