Fossil SCM
Update the built-in SQLite to the latest trunk version to fix a harmless compiler warning that comes up on newer Macs.
Commit
44c147b078acc406a575d097328a6ba1ad668590
Parent
3fdc2c01279ae85…
2 files changed
+20
-18
+1
-1
+20
-18
| --- src/sqlite3.c | ||
| +++ src/sqlite3.c | ||
| @@ -325,11 +325,11 @@ | ||
| 325 | 325 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 326 | 326 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 327 | 327 | */ |
| 328 | 328 | #define SQLITE_VERSION "3.10.0" |
| 329 | 329 | #define SQLITE_VERSION_NUMBER 3010000 |
| 330 | -#define SQLITE_SOURCE_ID "2015-12-23 10:54:48 b910a3d53769689d9212a06f974ccce54844bbe4" | |
| 330 | +#define SQLITE_SOURCE_ID "2015-12-24 14:53:27 7c7b7f26306b6aa6ff35b871ad756f43f5db9838" | |
| 331 | 331 | |
| 332 | 332 | /* |
| 333 | 333 | ** CAPI3REF: Run-Time Library Version Numbers |
| 334 | 334 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 335 | 335 | ** |
| @@ -9901,15 +9901,10 @@ | ||
| 9901 | 9901 | ** For best performance, an attempt is made to guess at the byte-order |
| 9902 | 9902 | ** using C-preprocessor macros. If that is unsuccessful, or if |
| 9903 | 9903 | ** -DSQLITE_RUNTIME_BYTEORDER=1 is set, then byte-order is determined |
| 9904 | 9904 | ** at run-time. |
| 9905 | 9905 | */ |
| 9906 | -#ifdef SQLITE_AMALGAMATION | |
| 9907 | -SQLITE_PRIVATE const int sqlite3one = 1; | |
| 9908 | -#else | |
| 9909 | -SQLITE_PRIVATE const int sqlite3one; | |
| 9910 | -#endif | |
| 9911 | 9906 | #if (defined(i386) || defined(__i386__) || defined(_M_IX86) || \ |
| 9912 | 9907 | defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || \ |
| 9913 | 9908 | defined(_M_AMD64) || defined(_M_ARM) || defined(__x86) || \ |
| 9914 | 9909 | defined(__arm__)) && !defined(SQLITE_RUNTIME_BYTEORDER) |
| 9915 | 9910 | # define SQLITE_BYTEORDER 1234 |
| @@ -9923,10 +9918,15 @@ | ||
| 9923 | 9918 | # define SQLITE_BIGENDIAN 1 |
| 9924 | 9919 | # define SQLITE_LITTLEENDIAN 0 |
| 9925 | 9920 | # define SQLITE_UTF16NATIVE SQLITE_UTF16BE |
| 9926 | 9921 | #endif |
| 9927 | 9922 | #if !defined(SQLITE_BYTEORDER) |
| 9923 | +# ifdef SQLITE_AMALGAMATION | |
| 9924 | + const int sqlite3one = 1; | |
| 9925 | +# else | |
| 9926 | + extern const int sqlite3one; | |
| 9927 | +# endif | |
| 9928 | 9928 | # define SQLITE_BYTEORDER 0 /* 0 means "unknown at compile-time" */ |
| 9929 | 9929 | # define SQLITE_BIGENDIAN (*(char *)(&sqlite3one)==0) |
| 9930 | 9930 | # define SQLITE_LITTLEENDIAN (*(char *)(&sqlite3one)==1) |
| 9931 | 9931 | # define SQLITE_UTF16NATIVE (SQLITE_BIGENDIAN?SQLITE_UTF16BE:SQLITE_UTF16LE) |
| 9932 | 9932 | #endif |
| @@ -20655,10 +20655,12 @@ | ||
| 20655 | 20655 | int trace; /* True to trace changes */ |
| 20656 | 20656 | #endif |
| 20657 | 20657 | }; |
| 20658 | 20658 | #if SQLITE_MUTEX_NREF |
| 20659 | 20659 | #define SQLITE3_MUTEX_INITIALIZER {PTHREAD_MUTEX_INITIALIZER,0,0,(pthread_t)0,0} |
| 20660 | +#elif defined(SQLITE_ENABLE_API_ARMOR) | |
| 20661 | +#define SQLITE3_MUTEX_INITIALIZER { PTHREAD_MUTEX_INITIALIZER, 0 } | |
| 20660 | 20662 | #else |
| 20661 | 20663 | #define SQLITE3_MUTEX_INITIALIZER { PTHREAD_MUTEX_INITIALIZER } |
| 20662 | 20664 | #endif |
| 20663 | 20665 | |
| 20664 | 20666 | /* |
| @@ -24490,17 +24492,17 @@ | ||
| 24490 | 24492 | */ |
| 24491 | 24493 | /* #include "sqliteInt.h" */ |
| 24492 | 24494 | /* #include <assert.h> */ |
| 24493 | 24495 | /* #include "vdbeInt.h" */ |
| 24494 | 24496 | |
| 24495 | -#ifndef SQLITE_AMALGAMATION | |
| 24497 | +#if !defined(SQLITE_AMALGAMATION) && SQLITE_BYTEORDER==0 | |
| 24496 | 24498 | /* |
| 24497 | 24499 | ** The following constant value is used by the SQLITE_BIGENDIAN and |
| 24498 | 24500 | ** SQLITE_LITTLEENDIAN macros. |
| 24499 | 24501 | */ |
| 24500 | 24502 | SQLITE_PRIVATE const int sqlite3one = 1; |
| 24501 | -#endif /* SQLITE_AMALGAMATION */ | |
| 24503 | +#endif /* SQLITE_AMALGAMATION && SQLITE_BYTEORDER==0 */ | |
| 24502 | 24504 | |
| 24503 | 24505 | /* |
| 24504 | 24506 | ** This lookup table is used to help decode the first byte of |
| 24505 | 24507 | ** a multi-byte UTF8 character. |
| 24506 | 24508 | */ |
| @@ -86739,11 +86741,11 @@ | ||
| 86739 | 86741 | } |
| 86740 | 86742 | if( isReduced ){ |
| 86741 | 86743 | assert( ExprHasProperty(p, EP_Reduced)==0 ); |
| 86742 | 86744 | memcpy(zAlloc, p, nNewSize); |
| 86743 | 86745 | }else{ |
| 86744 | - int nSize = exprStructSize(p); | |
| 86746 | + u32 nSize = (u32)exprStructSize(p); | |
| 86745 | 86747 | memcpy(zAlloc, p, nSize); |
| 86746 | 86748 | if( nSize<EXPR_FULLSIZE ){ |
| 86747 | 86749 | memset(&zAlloc[nSize], 0, EXPR_FULLSIZE-nSize); |
| 86748 | 86750 | } |
| 86749 | 86751 | } |
| @@ -169981,11 +169983,11 @@ | ||
| 169981 | 169983 | { "bm25", 0, fts5Bm25Function, 0 }, |
| 169982 | 169984 | }; |
| 169983 | 169985 | int rc = SQLITE_OK; /* Return code */ |
| 169984 | 169986 | int i; /* To iterate through builtin functions */ |
| 169985 | 169987 | |
| 169986 | - for(i=0; rc==SQLITE_OK && i<sizeof(aBuiltin)/sizeof(aBuiltin[0]); i++){ | |
| 169988 | + for(i=0; rc==SQLITE_OK && i<(int)ArraySize(aBuiltin); i++){ | |
| 169987 | 169989 | rc = pApi->xCreateFunction(pApi, |
| 169988 | 169990 | aBuiltin[i].zFunc, |
| 169989 | 169991 | aBuiltin[i].pUserData, |
| 169990 | 169992 | aBuiltin[i].xFunc, |
| 169991 | 169993 | aBuiltin[i].xDestroy |
| @@ -171605,11 +171607,11 @@ | ||
| 171605 | 171607 | |
| 171606 | 171608 | fts5BufferZero(&pPhrase->poslist); |
| 171607 | 171609 | |
| 171608 | 171610 | /* If the aStatic[] array is not large enough, allocate a large array |
| 171609 | 171611 | ** using sqlite3_malloc(). This approach could be improved upon. */ |
| 171610 | - if( pPhrase->nTerm>(sizeof(aStatic) / sizeof(aStatic[0])) ){ | |
| 171612 | + if( pPhrase->nTerm>(int)ArraySize(aStatic) ){ | |
| 171611 | 171613 | int nByte = sizeof(Fts5PoslistReader) * pPhrase->nTerm; |
| 171612 | 171614 | aIter = (Fts5PoslistReader*)sqlite3_malloc(nByte); |
| 171613 | 171615 | if( !aIter ) return SQLITE_NOMEM; |
| 171614 | 171616 | } |
| 171615 | 171617 | memset(aIter, 0, sizeof(Fts5PoslistReader) * pPhrase->nTerm); |
| @@ -171741,11 +171743,11 @@ | ||
| 171741 | 171743 | |
| 171742 | 171744 | assert( pNear->nPhrase>1 ); |
| 171743 | 171745 | |
| 171744 | 171746 | /* If the aStatic[] array is not large enough, allocate a large array |
| 171745 | 171747 | ** using sqlite3_malloc(). This approach could be improved upon. */ |
| 171746 | - if( pNear->nPhrase>(sizeof(aStatic) / sizeof(aStatic[0])) ){ | |
| 171748 | + if( pNear->nPhrase>(int)ArraySize(aStatic) ){ | |
| 171747 | 171749 | int nByte = sizeof(Fts5NearTrimmer) * pNear->nPhrase; |
| 171748 | 171750 | a = (Fts5NearTrimmer*)sqlite3Fts5MallocZero(&rc, nByte); |
| 171749 | 171751 | }else{ |
| 171750 | 171752 | memset(aStatic, 0, sizeof(aStatic)); |
| 171751 | 171753 | } |
| @@ -173388,11 +173390,11 @@ | ||
| 173388 | 173390 | }; |
| 173389 | 173391 | int i; |
| 173390 | 173392 | int rc = SQLITE_OK; |
| 173391 | 173393 | void *pCtx = (void*)pGlobal; |
| 173392 | 173394 | |
| 173393 | - for(i=0; rc==SQLITE_OK && i<(sizeof(aFunc) / sizeof(aFunc[0])); i++){ | |
| 173395 | + for(i=0; rc==SQLITE_OK && i<(int)ArraySize(aFunc); i++){ | |
| 173394 | 173396 | struct Fts5ExprFunc *p = &aFunc[i]; |
| 173395 | 173397 | rc = sqlite3_create_function(db, p->z, -1, SQLITE_UTF8, pCtx, p->x, 0, 0); |
| 173396 | 173398 | } |
| 173397 | 173399 | |
| 173398 | 173400 | /* Avoid a warning indicating that sqlite3Fts5ParserTrace() is unused */ |
| @@ -180242,11 +180244,11 @@ | ||
| 180242 | 180244 | |
| 180243 | 180245 | /* Set idxFlags flags for all WHERE clause terms that will be used. */ |
| 180244 | 180246 | for(i=0; i<pInfo->nConstraint; i++){ |
| 180245 | 180247 | struct sqlite3_index_constraint *p = &pInfo->aConstraint[i]; |
| 180246 | 180248 | int j; |
| 180247 | - for(j=0; j<sizeof(aConstraint)/sizeof(aConstraint[0]); j++){ | |
| 180249 | + for(j=0; j<(int)ArraySize(aConstraint); j++){ | |
| 180248 | 180250 | struct Constraint *pC = &aConstraint[j]; |
| 180249 | 180251 | if( p->iColumn==aColMap[pC->iCol] && p->op & pC->op ){ |
| 180250 | 180252 | if( p->usable ){ |
| 180251 | 180253 | pC->iConsIndex = i; |
| 180252 | 180254 | idxFlags |= pC->fts5op; |
| @@ -180289,11 +180291,11 @@ | ||
| 180289 | 180291 | pInfo->estimatedCost = bHasMatch ? 1000.0 : 1000000.0; |
| 180290 | 180292 | } |
| 180291 | 180293 | |
| 180292 | 180294 | /* Assign argvIndex values to each constraint in use. */ |
| 180293 | 180295 | iNext = 1; |
| 180294 | - for(i=0; i<sizeof(aConstraint)/sizeof(aConstraint[0]); i++){ | |
| 180296 | + for(i=0; i<(int)ArraySize(aConstraint); i++){ | |
| 180295 | 180297 | struct Constraint *pC = &aConstraint[i]; |
| 180296 | 180298 | if( pC->iConsIndex>=0 ){ |
| 180297 | 180299 | pInfo->aConstraintUsage[pC->iConsIndex].argvIndex = iNext++; |
| 180298 | 180300 | pInfo->aConstraintUsage[pC->iConsIndex].omit = (unsigned char)pC->omit; |
| 180299 | 180301 | } |
| @@ -182139,11 +182141,11 @@ | ||
| 182139 | 182141 | sqlite3_context *pCtx, /* Function call context */ |
| 182140 | 182142 | int nArg, /* Number of args */ |
| 182141 | 182143 | sqlite3_value **apVal /* Function arguments */ |
| 182142 | 182144 | ){ |
| 182143 | 182145 | assert( nArg==0 ); |
| 182144 | - sqlite3_result_text(pCtx, "fts5: 2015-12-18 16:29:47 8bf5e056eb8beb6e0ed5874fb24d7fe9f0b66d2b", -1, SQLITE_TRANSIENT); | |
| 182146 | + sqlite3_result_text(pCtx, "fts5: 2015-12-23 16:42:27 5d44d4a6cf5c6b983cbd846d9bc34251df8f4bc5", -1, SQLITE_TRANSIENT); | |
| 182145 | 182147 | } |
| 182146 | 182148 | |
| 182147 | 182149 | static int fts5Init(sqlite3 *db){ |
| 182148 | 182150 | static const sqlite3_module fts5Mod = { |
| 182149 | 182151 | /* iVersion */ 2, |
| @@ -182584,11 +182586,11 @@ | ||
| 182584 | 182586 | int rc = SQLITE_OK; |
| 182585 | 182587 | if( p ){ |
| 182586 | 182588 | int i; |
| 182587 | 182589 | |
| 182588 | 182590 | /* Finalize all SQL statements */ |
| 182589 | - for(i=0; i<ArraySize(p->aStmt); i++){ | |
| 182591 | + for(i=0; i<(int)ArraySize(p->aStmt); i++){ | |
| 182590 | 182592 | sqlite3_finalize(p->aStmt[i]); |
| 182591 | 182593 | } |
| 182592 | 182594 | |
| 182593 | 182595 | sqlite3_free(p); |
| 182594 | 182596 | } |
| @@ -184570,11 +184572,11 @@ | ||
| 184570 | 184572 | }; |
| 184571 | 184573 | |
| 184572 | 184574 | int rc = SQLITE_OK; /* Return code */ |
| 184573 | 184575 | int i; /* To iterate through builtin functions */ |
| 184574 | 184576 | |
| 184575 | - for(i=0; rc==SQLITE_OK && i<sizeof(aBuiltin)/sizeof(aBuiltin[0]); i++){ | |
| 184577 | + for(i=0; rc==SQLITE_OK && i<(int)ArraySize(aBuiltin); i++){ | |
| 184576 | 184578 | rc = pApi->xCreateTokenizer(pApi, |
| 184577 | 184579 | aBuiltin[i].zName, |
| 184578 | 184580 | (void*)pApi, |
| 184579 | 184581 | &aBuiltin[i].x, |
| 184580 | 184582 | 0 |
| 184581 | 184583 |
| --- src/sqlite3.c | |
| +++ src/sqlite3.c | |
| @@ -325,11 +325,11 @@ | |
| 325 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 326 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 327 | */ |
| 328 | #define SQLITE_VERSION "3.10.0" |
| 329 | #define SQLITE_VERSION_NUMBER 3010000 |
| 330 | #define SQLITE_SOURCE_ID "2015-12-23 10:54:48 b910a3d53769689d9212a06f974ccce54844bbe4" |
| 331 | |
| 332 | /* |
| 333 | ** CAPI3REF: Run-Time Library Version Numbers |
| 334 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 335 | ** |
| @@ -9901,15 +9901,10 @@ | |
| 9901 | ** For best performance, an attempt is made to guess at the byte-order |
| 9902 | ** using C-preprocessor macros. If that is unsuccessful, or if |
| 9903 | ** -DSQLITE_RUNTIME_BYTEORDER=1 is set, then byte-order is determined |
| 9904 | ** at run-time. |
| 9905 | */ |
| 9906 | #ifdef SQLITE_AMALGAMATION |
| 9907 | SQLITE_PRIVATE const int sqlite3one = 1; |
| 9908 | #else |
| 9909 | SQLITE_PRIVATE const int sqlite3one; |
| 9910 | #endif |
| 9911 | #if (defined(i386) || defined(__i386__) || defined(_M_IX86) || \ |
| 9912 | defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || \ |
| 9913 | defined(_M_AMD64) || defined(_M_ARM) || defined(__x86) || \ |
| 9914 | defined(__arm__)) && !defined(SQLITE_RUNTIME_BYTEORDER) |
| 9915 | # define SQLITE_BYTEORDER 1234 |
| @@ -9923,10 +9918,15 @@ | |
| 9923 | # define SQLITE_BIGENDIAN 1 |
| 9924 | # define SQLITE_LITTLEENDIAN 0 |
| 9925 | # define SQLITE_UTF16NATIVE SQLITE_UTF16BE |
| 9926 | #endif |
| 9927 | #if !defined(SQLITE_BYTEORDER) |
| 9928 | # define SQLITE_BYTEORDER 0 /* 0 means "unknown at compile-time" */ |
| 9929 | # define SQLITE_BIGENDIAN (*(char *)(&sqlite3one)==0) |
| 9930 | # define SQLITE_LITTLEENDIAN (*(char *)(&sqlite3one)==1) |
| 9931 | # define SQLITE_UTF16NATIVE (SQLITE_BIGENDIAN?SQLITE_UTF16BE:SQLITE_UTF16LE) |
| 9932 | #endif |
| @@ -20655,10 +20655,12 @@ | |
| 20655 | int trace; /* True to trace changes */ |
| 20656 | #endif |
| 20657 | }; |
| 20658 | #if SQLITE_MUTEX_NREF |
| 20659 | #define SQLITE3_MUTEX_INITIALIZER {PTHREAD_MUTEX_INITIALIZER,0,0,(pthread_t)0,0} |
| 20660 | #else |
| 20661 | #define SQLITE3_MUTEX_INITIALIZER { PTHREAD_MUTEX_INITIALIZER } |
| 20662 | #endif |
| 20663 | |
| 20664 | /* |
| @@ -24490,17 +24492,17 @@ | |
| 24490 | */ |
| 24491 | /* #include "sqliteInt.h" */ |
| 24492 | /* #include <assert.h> */ |
| 24493 | /* #include "vdbeInt.h" */ |
| 24494 | |
| 24495 | #ifndef SQLITE_AMALGAMATION |
| 24496 | /* |
| 24497 | ** The following constant value is used by the SQLITE_BIGENDIAN and |
| 24498 | ** SQLITE_LITTLEENDIAN macros. |
| 24499 | */ |
| 24500 | SQLITE_PRIVATE const int sqlite3one = 1; |
| 24501 | #endif /* SQLITE_AMALGAMATION */ |
| 24502 | |
| 24503 | /* |
| 24504 | ** This lookup table is used to help decode the first byte of |
| 24505 | ** a multi-byte UTF8 character. |
| 24506 | */ |
| @@ -86739,11 +86741,11 @@ | |
| 86739 | } |
| 86740 | if( isReduced ){ |
| 86741 | assert( ExprHasProperty(p, EP_Reduced)==0 ); |
| 86742 | memcpy(zAlloc, p, nNewSize); |
| 86743 | }else{ |
| 86744 | int nSize = exprStructSize(p); |
| 86745 | memcpy(zAlloc, p, nSize); |
| 86746 | if( nSize<EXPR_FULLSIZE ){ |
| 86747 | memset(&zAlloc[nSize], 0, EXPR_FULLSIZE-nSize); |
| 86748 | } |
| 86749 | } |
| @@ -169981,11 +169983,11 @@ | |
| 169981 | { "bm25", 0, fts5Bm25Function, 0 }, |
| 169982 | }; |
| 169983 | int rc = SQLITE_OK; /* Return code */ |
| 169984 | int i; /* To iterate through builtin functions */ |
| 169985 | |
| 169986 | for(i=0; rc==SQLITE_OK && i<sizeof(aBuiltin)/sizeof(aBuiltin[0]); i++){ |
| 169987 | rc = pApi->xCreateFunction(pApi, |
| 169988 | aBuiltin[i].zFunc, |
| 169989 | aBuiltin[i].pUserData, |
| 169990 | aBuiltin[i].xFunc, |
| 169991 | aBuiltin[i].xDestroy |
| @@ -171605,11 +171607,11 @@ | |
| 171605 | |
| 171606 | fts5BufferZero(&pPhrase->poslist); |
| 171607 | |
| 171608 | /* If the aStatic[] array is not large enough, allocate a large array |
| 171609 | ** using sqlite3_malloc(). This approach could be improved upon. */ |
| 171610 | if( pPhrase->nTerm>(sizeof(aStatic) / sizeof(aStatic[0])) ){ |
| 171611 | int nByte = sizeof(Fts5PoslistReader) * pPhrase->nTerm; |
| 171612 | aIter = (Fts5PoslistReader*)sqlite3_malloc(nByte); |
| 171613 | if( !aIter ) return SQLITE_NOMEM; |
| 171614 | } |
| 171615 | memset(aIter, 0, sizeof(Fts5PoslistReader) * pPhrase->nTerm); |
| @@ -171741,11 +171743,11 @@ | |
| 171741 | |
| 171742 | assert( pNear->nPhrase>1 ); |
| 171743 | |
| 171744 | /* If the aStatic[] array is not large enough, allocate a large array |
| 171745 | ** using sqlite3_malloc(). This approach could be improved upon. */ |
| 171746 | if( pNear->nPhrase>(sizeof(aStatic) / sizeof(aStatic[0])) ){ |
| 171747 | int nByte = sizeof(Fts5NearTrimmer) * pNear->nPhrase; |
| 171748 | a = (Fts5NearTrimmer*)sqlite3Fts5MallocZero(&rc, nByte); |
| 171749 | }else{ |
| 171750 | memset(aStatic, 0, sizeof(aStatic)); |
| 171751 | } |
| @@ -173388,11 +173390,11 @@ | |
| 173388 | }; |
| 173389 | int i; |
| 173390 | int rc = SQLITE_OK; |
| 173391 | void *pCtx = (void*)pGlobal; |
| 173392 | |
| 173393 | for(i=0; rc==SQLITE_OK && i<(sizeof(aFunc) / sizeof(aFunc[0])); i++){ |
| 173394 | struct Fts5ExprFunc *p = &aFunc[i]; |
| 173395 | rc = sqlite3_create_function(db, p->z, -1, SQLITE_UTF8, pCtx, p->x, 0, 0); |
| 173396 | } |
| 173397 | |
| 173398 | /* Avoid a warning indicating that sqlite3Fts5ParserTrace() is unused */ |
| @@ -180242,11 +180244,11 @@ | |
| 180242 | |
| 180243 | /* Set idxFlags flags for all WHERE clause terms that will be used. */ |
| 180244 | for(i=0; i<pInfo->nConstraint; i++){ |
| 180245 | struct sqlite3_index_constraint *p = &pInfo->aConstraint[i]; |
| 180246 | int j; |
| 180247 | for(j=0; j<sizeof(aConstraint)/sizeof(aConstraint[0]); j++){ |
| 180248 | struct Constraint *pC = &aConstraint[j]; |
| 180249 | if( p->iColumn==aColMap[pC->iCol] && p->op & pC->op ){ |
| 180250 | if( p->usable ){ |
| 180251 | pC->iConsIndex = i; |
| 180252 | idxFlags |= pC->fts5op; |
| @@ -180289,11 +180291,11 @@ | |
| 180289 | pInfo->estimatedCost = bHasMatch ? 1000.0 : 1000000.0; |
| 180290 | } |
| 180291 | |
| 180292 | /* Assign argvIndex values to each constraint in use. */ |
| 180293 | iNext = 1; |
| 180294 | for(i=0; i<sizeof(aConstraint)/sizeof(aConstraint[0]); i++){ |
| 180295 | struct Constraint *pC = &aConstraint[i]; |
| 180296 | if( pC->iConsIndex>=0 ){ |
| 180297 | pInfo->aConstraintUsage[pC->iConsIndex].argvIndex = iNext++; |
| 180298 | pInfo->aConstraintUsage[pC->iConsIndex].omit = (unsigned char)pC->omit; |
| 180299 | } |
| @@ -182139,11 +182141,11 @@ | |
| 182139 | sqlite3_context *pCtx, /* Function call context */ |
| 182140 | int nArg, /* Number of args */ |
| 182141 | sqlite3_value **apVal /* Function arguments */ |
| 182142 | ){ |
| 182143 | assert( nArg==0 ); |
| 182144 | sqlite3_result_text(pCtx, "fts5: 2015-12-18 16:29:47 8bf5e056eb8beb6e0ed5874fb24d7fe9f0b66d2b", -1, SQLITE_TRANSIENT); |
| 182145 | } |
| 182146 | |
| 182147 | static int fts5Init(sqlite3 *db){ |
| 182148 | static const sqlite3_module fts5Mod = { |
| 182149 | /* iVersion */ 2, |
| @@ -182584,11 +182586,11 @@ | |
| 182584 | int rc = SQLITE_OK; |
| 182585 | if( p ){ |
| 182586 | int i; |
| 182587 | |
| 182588 | /* Finalize all SQL statements */ |
| 182589 | for(i=0; i<ArraySize(p->aStmt); i++){ |
| 182590 | sqlite3_finalize(p->aStmt[i]); |
| 182591 | } |
| 182592 | |
| 182593 | sqlite3_free(p); |
| 182594 | } |
| @@ -184570,11 +184572,11 @@ | |
| 184570 | }; |
| 184571 | |
| 184572 | int rc = SQLITE_OK; /* Return code */ |
| 184573 | int i; /* To iterate through builtin functions */ |
| 184574 | |
| 184575 | for(i=0; rc==SQLITE_OK && i<sizeof(aBuiltin)/sizeof(aBuiltin[0]); i++){ |
| 184576 | rc = pApi->xCreateTokenizer(pApi, |
| 184577 | aBuiltin[i].zName, |
| 184578 | (void*)pApi, |
| 184579 | &aBuiltin[i].x, |
| 184580 | 0 |
| 184581 |
| --- src/sqlite3.c | |
| +++ src/sqlite3.c | |
| @@ -325,11 +325,11 @@ | |
| 325 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 326 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 327 | */ |
| 328 | #define SQLITE_VERSION "3.10.0" |
| 329 | #define SQLITE_VERSION_NUMBER 3010000 |
| 330 | #define SQLITE_SOURCE_ID "2015-12-24 14:53:27 7c7b7f26306b6aa6ff35b871ad756f43f5db9838" |
| 331 | |
| 332 | /* |
| 333 | ** CAPI3REF: Run-Time Library Version Numbers |
| 334 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 335 | ** |
| @@ -9901,15 +9901,10 @@ | |
| 9901 | ** For best performance, an attempt is made to guess at the byte-order |
| 9902 | ** using C-preprocessor macros. If that is unsuccessful, or if |
| 9903 | ** -DSQLITE_RUNTIME_BYTEORDER=1 is set, then byte-order is determined |
| 9904 | ** at run-time. |
| 9905 | */ |
| 9906 | #if (defined(i386) || defined(__i386__) || defined(_M_IX86) || \ |
| 9907 | defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || \ |
| 9908 | defined(_M_AMD64) || defined(_M_ARM) || defined(__x86) || \ |
| 9909 | defined(__arm__)) && !defined(SQLITE_RUNTIME_BYTEORDER) |
| 9910 | # define SQLITE_BYTEORDER 1234 |
| @@ -9923,10 +9918,15 @@ | |
| 9918 | # define SQLITE_BIGENDIAN 1 |
| 9919 | # define SQLITE_LITTLEENDIAN 0 |
| 9920 | # define SQLITE_UTF16NATIVE SQLITE_UTF16BE |
| 9921 | #endif |
| 9922 | #if !defined(SQLITE_BYTEORDER) |
| 9923 | # ifdef SQLITE_AMALGAMATION |
| 9924 | const int sqlite3one = 1; |
| 9925 | # else |
| 9926 | extern const int sqlite3one; |
| 9927 | # endif |
| 9928 | # define SQLITE_BYTEORDER 0 /* 0 means "unknown at compile-time" */ |
| 9929 | # define SQLITE_BIGENDIAN (*(char *)(&sqlite3one)==0) |
| 9930 | # define SQLITE_LITTLEENDIAN (*(char *)(&sqlite3one)==1) |
| 9931 | # define SQLITE_UTF16NATIVE (SQLITE_BIGENDIAN?SQLITE_UTF16BE:SQLITE_UTF16LE) |
| 9932 | #endif |
| @@ -20655,10 +20655,12 @@ | |
| 20655 | int trace; /* True to trace changes */ |
| 20656 | #endif |
| 20657 | }; |
| 20658 | #if SQLITE_MUTEX_NREF |
| 20659 | #define SQLITE3_MUTEX_INITIALIZER {PTHREAD_MUTEX_INITIALIZER,0,0,(pthread_t)0,0} |
| 20660 | #elif defined(SQLITE_ENABLE_API_ARMOR) |
| 20661 | #define SQLITE3_MUTEX_INITIALIZER { PTHREAD_MUTEX_INITIALIZER, 0 } |
| 20662 | #else |
| 20663 | #define SQLITE3_MUTEX_INITIALIZER { PTHREAD_MUTEX_INITIALIZER } |
| 20664 | #endif |
| 20665 | |
| 20666 | /* |
| @@ -24490,17 +24492,17 @@ | |
| 24492 | */ |
| 24493 | /* #include "sqliteInt.h" */ |
| 24494 | /* #include <assert.h> */ |
| 24495 | /* #include "vdbeInt.h" */ |
| 24496 | |
| 24497 | #if !defined(SQLITE_AMALGAMATION) && SQLITE_BYTEORDER==0 |
| 24498 | /* |
| 24499 | ** The following constant value is used by the SQLITE_BIGENDIAN and |
| 24500 | ** SQLITE_LITTLEENDIAN macros. |
| 24501 | */ |
| 24502 | SQLITE_PRIVATE const int sqlite3one = 1; |
| 24503 | #endif /* SQLITE_AMALGAMATION && SQLITE_BYTEORDER==0 */ |
| 24504 | |
| 24505 | /* |
| 24506 | ** This lookup table is used to help decode the first byte of |
| 24507 | ** a multi-byte UTF8 character. |
| 24508 | */ |
| @@ -86739,11 +86741,11 @@ | |
| 86741 | } |
| 86742 | if( isReduced ){ |
| 86743 | assert( ExprHasProperty(p, EP_Reduced)==0 ); |
| 86744 | memcpy(zAlloc, p, nNewSize); |
| 86745 | }else{ |
| 86746 | u32 nSize = (u32)exprStructSize(p); |
| 86747 | memcpy(zAlloc, p, nSize); |
| 86748 | if( nSize<EXPR_FULLSIZE ){ |
| 86749 | memset(&zAlloc[nSize], 0, EXPR_FULLSIZE-nSize); |
| 86750 | } |
| 86751 | } |
| @@ -169981,11 +169983,11 @@ | |
| 169983 | { "bm25", 0, fts5Bm25Function, 0 }, |
| 169984 | }; |
| 169985 | int rc = SQLITE_OK; /* Return code */ |
| 169986 | int i; /* To iterate through builtin functions */ |
| 169987 | |
| 169988 | for(i=0; rc==SQLITE_OK && i<(int)ArraySize(aBuiltin); i++){ |
| 169989 | rc = pApi->xCreateFunction(pApi, |
| 169990 | aBuiltin[i].zFunc, |
| 169991 | aBuiltin[i].pUserData, |
| 169992 | aBuiltin[i].xFunc, |
| 169993 | aBuiltin[i].xDestroy |
| @@ -171605,11 +171607,11 @@ | |
| 171607 | |
| 171608 | fts5BufferZero(&pPhrase->poslist); |
| 171609 | |
| 171610 | /* If the aStatic[] array is not large enough, allocate a large array |
| 171611 | ** using sqlite3_malloc(). This approach could be improved upon. */ |
| 171612 | if( pPhrase->nTerm>(int)ArraySize(aStatic) ){ |
| 171613 | int nByte = sizeof(Fts5PoslistReader) * pPhrase->nTerm; |
| 171614 | aIter = (Fts5PoslistReader*)sqlite3_malloc(nByte); |
| 171615 | if( !aIter ) return SQLITE_NOMEM; |
| 171616 | } |
| 171617 | memset(aIter, 0, sizeof(Fts5PoslistReader) * pPhrase->nTerm); |
| @@ -171741,11 +171743,11 @@ | |
| 171743 | |
| 171744 | assert( pNear->nPhrase>1 ); |
| 171745 | |
| 171746 | /* If the aStatic[] array is not large enough, allocate a large array |
| 171747 | ** using sqlite3_malloc(). This approach could be improved upon. */ |
| 171748 | if( pNear->nPhrase>(int)ArraySize(aStatic) ){ |
| 171749 | int nByte = sizeof(Fts5NearTrimmer) * pNear->nPhrase; |
| 171750 | a = (Fts5NearTrimmer*)sqlite3Fts5MallocZero(&rc, nByte); |
| 171751 | }else{ |
| 171752 | memset(aStatic, 0, sizeof(aStatic)); |
| 171753 | } |
| @@ -173388,11 +173390,11 @@ | |
| 173390 | }; |
| 173391 | int i; |
| 173392 | int rc = SQLITE_OK; |
| 173393 | void *pCtx = (void*)pGlobal; |
| 173394 | |
| 173395 | for(i=0; rc==SQLITE_OK && i<(int)ArraySize(aFunc); i++){ |
| 173396 | struct Fts5ExprFunc *p = &aFunc[i]; |
| 173397 | rc = sqlite3_create_function(db, p->z, -1, SQLITE_UTF8, pCtx, p->x, 0, 0); |
| 173398 | } |
| 173399 | |
| 173400 | /* Avoid a warning indicating that sqlite3Fts5ParserTrace() is unused */ |
| @@ -180242,11 +180244,11 @@ | |
| 180244 | |
| 180245 | /* Set idxFlags flags for all WHERE clause terms that will be used. */ |
| 180246 | for(i=0; i<pInfo->nConstraint; i++){ |
| 180247 | struct sqlite3_index_constraint *p = &pInfo->aConstraint[i]; |
| 180248 | int j; |
| 180249 | for(j=0; j<(int)ArraySize(aConstraint); j++){ |
| 180250 | struct Constraint *pC = &aConstraint[j]; |
| 180251 | if( p->iColumn==aColMap[pC->iCol] && p->op & pC->op ){ |
| 180252 | if( p->usable ){ |
| 180253 | pC->iConsIndex = i; |
| 180254 | idxFlags |= pC->fts5op; |
| @@ -180289,11 +180291,11 @@ | |
| 180291 | pInfo->estimatedCost = bHasMatch ? 1000.0 : 1000000.0; |
| 180292 | } |
| 180293 | |
| 180294 | /* Assign argvIndex values to each constraint in use. */ |
| 180295 | iNext = 1; |
| 180296 | for(i=0; i<(int)ArraySize(aConstraint); i++){ |
| 180297 | struct Constraint *pC = &aConstraint[i]; |
| 180298 | if( pC->iConsIndex>=0 ){ |
| 180299 | pInfo->aConstraintUsage[pC->iConsIndex].argvIndex = iNext++; |
| 180300 | pInfo->aConstraintUsage[pC->iConsIndex].omit = (unsigned char)pC->omit; |
| 180301 | } |
| @@ -182139,11 +182141,11 @@ | |
| 182141 | sqlite3_context *pCtx, /* Function call context */ |
| 182142 | int nArg, /* Number of args */ |
| 182143 | sqlite3_value **apVal /* Function arguments */ |
| 182144 | ){ |
| 182145 | assert( nArg==0 ); |
| 182146 | sqlite3_result_text(pCtx, "fts5: 2015-12-23 16:42:27 5d44d4a6cf5c6b983cbd846d9bc34251df8f4bc5", -1, SQLITE_TRANSIENT); |
| 182147 | } |
| 182148 | |
| 182149 | static int fts5Init(sqlite3 *db){ |
| 182150 | static const sqlite3_module fts5Mod = { |
| 182151 | /* iVersion */ 2, |
| @@ -182584,11 +182586,11 @@ | |
| 182586 | int rc = SQLITE_OK; |
| 182587 | if( p ){ |
| 182588 | int i; |
| 182589 | |
| 182590 | /* Finalize all SQL statements */ |
| 182591 | for(i=0; i<(int)ArraySize(p->aStmt); i++){ |
| 182592 | sqlite3_finalize(p->aStmt[i]); |
| 182593 | } |
| 182594 | |
| 182595 | sqlite3_free(p); |
| 182596 | } |
| @@ -184570,11 +184572,11 @@ | |
| 184572 | }; |
| 184573 | |
| 184574 | int rc = SQLITE_OK; /* Return code */ |
| 184575 | int i; /* To iterate through builtin functions */ |
| 184576 | |
| 184577 | for(i=0; rc==SQLITE_OK && i<(int)ArraySize(aBuiltin); i++){ |
| 184578 | rc = pApi->xCreateTokenizer(pApi, |
| 184579 | aBuiltin[i].zName, |
| 184580 | (void*)pApi, |
| 184581 | &aBuiltin[i].x, |
| 184582 | 0 |
| 184583 |
+1
-1
| --- src/sqlite3.h | ||
| +++ src/sqlite3.h | ||
| @@ -111,11 +111,11 @@ | ||
| 111 | 111 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 112 | 112 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 113 | 113 | */ |
| 114 | 114 | #define SQLITE_VERSION "3.10.0" |
| 115 | 115 | #define SQLITE_VERSION_NUMBER 3010000 |
| 116 | -#define SQLITE_SOURCE_ID "2015-12-23 10:54:48 b910a3d53769689d9212a06f974ccce54844bbe4" | |
| 116 | +#define SQLITE_SOURCE_ID "2015-12-24 14:53:27 7c7b7f26306b6aa6ff35b871ad756f43f5db9838" | |
| 117 | 117 | |
| 118 | 118 | /* |
| 119 | 119 | ** CAPI3REF: Run-Time Library Version Numbers |
| 120 | 120 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 121 | 121 | ** |
| 122 | 122 |
| --- src/sqlite3.h | |
| +++ src/sqlite3.h | |
| @@ -111,11 +111,11 @@ | |
| 111 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 112 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 113 | */ |
| 114 | #define SQLITE_VERSION "3.10.0" |
| 115 | #define SQLITE_VERSION_NUMBER 3010000 |
| 116 | #define SQLITE_SOURCE_ID "2015-12-23 10:54:48 b910a3d53769689d9212a06f974ccce54844bbe4" |
| 117 | |
| 118 | /* |
| 119 | ** CAPI3REF: Run-Time Library Version Numbers |
| 120 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 121 | ** |
| 122 |
| --- src/sqlite3.h | |
| +++ src/sqlite3.h | |
| @@ -111,11 +111,11 @@ | |
| 111 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 112 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 113 | */ |
| 114 | #define SQLITE_VERSION "3.10.0" |
| 115 | #define SQLITE_VERSION_NUMBER 3010000 |
| 116 | #define SQLITE_SOURCE_ID "2015-12-24 14:53:27 7c7b7f26306b6aa6ff35b871ad756f43f5db9838" |
| 117 | |
| 118 | /* |
| 119 | ** CAPI3REF: Run-Time Library Version Numbers |
| 120 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 121 | ** |
| 122 |