| | @@ -16,11 +16,11 @@ |
| 16 | 16 | ** if you want a wrapper to interface SQLite with your choice of programming |
| 17 | 17 | ** language. The code for the "sqlite3" command-line shell is also in a |
| 18 | 18 | ** separate file. This file contains only code for the core SQLite library. |
| 19 | 19 | ** |
| 20 | 20 | ** The content in this amalgamation comes from Fossil check-in |
| 21 | | -** 0780bce854b962fb2d4a1a19c55c9b5790a9 with changes in files: |
| 21 | +** 88dce64242552e7443d9fb496f6f3ad71dc5 with changes in files: |
| 22 | 22 | ** |
| 23 | 23 | ** |
| 24 | 24 | */ |
| 25 | 25 | #ifndef SQLITE_AMALGAMATION |
| 26 | 26 | #define SQLITE_CORE 1 |
| | @@ -467,14 +467,14 @@ |
| 467 | 467 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 468 | 468 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 469 | 469 | */ |
| 470 | 470 | #define SQLITE_VERSION "3.52.0" |
| 471 | 471 | #define SQLITE_VERSION_NUMBER 3052000 |
| 472 | | -#define SQLITE_SOURCE_ID "2026-02-27 22:59:46 0780bce854b962fb2d4a1a19c55c9b5790a9669f26e1ff8b5f1f1733cfc647e0" |
| 472 | +#define SQLITE_SOURCE_ID "2026-03-02 17:11:44 88dce64242552e7443d9fb496f6f3ad71dc5b4a882ce21b7ef1d5ea4e26f1e61" |
| 473 | 473 | #define SQLITE_SCM_BRANCH "trunk" |
| 474 | 474 | #define SQLITE_SCM_TAGS "" |
| 475 | | -#define SQLITE_SCM_DATETIME "2026-02-27T22:59:46.633Z" |
| 475 | +#define SQLITE_SCM_DATETIME "2026-03-02T17:11:44.720Z" |
| 476 | 476 | |
| 477 | 477 | /* |
| 478 | 478 | ** CAPI3REF: Run-Time Library Version Numbers |
| 479 | 479 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 480 | 480 | ** |
| | @@ -36714,14 +36714,14 @@ |
| 36714 | 36714 | /* |
| 36715 | 36715 | ** Return an IEEE754 floating point value that approximates d*pow(10,p). |
| 36716 | 36716 | */ |
| 36717 | 36717 | static double sqlite3Fp10Convert2(u64 d, int p){ |
| 36718 | 36718 | u64 out; |
| 36719 | | - int b; |
| 36720 | 36719 | int e1; |
| 36721 | | - int e2; |
| 36720 | + int lz; |
| 36722 | 36721 | int lp; |
| 36722 | + int x; |
| 36723 | 36723 | u64 h; |
| 36724 | 36724 | double r; |
| 36725 | 36725 | assert( (d & U64_BIT(63))==0 ); |
| 36726 | 36726 | assert( d!=0 ); |
| 36727 | 36727 | if( p<POWERSOF10_FIRST ){ |
| | @@ -36728,30 +36728,30 @@ |
| 36728 | 36728 | return 0.0; |
| 36729 | 36729 | } |
| 36730 | 36730 | if( p>POWERSOF10_LAST ){ |
| 36731 | 36731 | return INFINITY; |
| 36732 | 36732 | } |
| 36733 | | - b = 64 - countLeadingZeros(d); |
| 36733 | + lz = countLeadingZeros(d); |
| 36734 | 36734 | lp = pwr10to2(p); |
| 36735 | | - e1 = 53 - b - lp; |
| 36735 | + e1 = lz - (lp + 11); |
| 36736 | 36736 | if( e1>1074 ){ |
| 36737 | | - if( -(b + lp) >= 1077 ) return 0.0; |
| 36737 | + if( e1>=1130 ) return 0.0; |
| 36738 | 36738 | e1 = 1074; |
| 36739 | 36739 | } |
| 36740 | | - e2 = e1 - (64-b); |
| 36741 | | - h = sqlite3Multiply128(d<<(64-b), powerOfTen(p)); |
| 36742 | | - assert( -(e2 + lp + 3) >=0 ); |
| 36743 | | - assert( -(e2 + lp + 3) <64 ); |
| 36744 | | - out = (h >> -(e2 + lp + 3)) | 1; |
| 36740 | + h = sqlite3Multiply128(d<<lz, powerOfTen(p)); |
| 36741 | + x = lz - (e1 + lp + 3); |
| 36742 | + assert( x >= 0 ); |
| 36743 | + assert( x <= 63 ); |
| 36744 | + out = h >> x; |
| 36745 | 36745 | if( out >= U64_BIT(55)-2 ){ |
| 36746 | | - out = (out>>1) | (out&1); |
| 36746 | + out >>= 1; |
| 36747 | 36747 | e1--; |
| 36748 | 36748 | } |
| 36749 | 36749 | if( e1<=(-972) ){ |
| 36750 | 36750 | return INFINITY; |
| 36751 | 36751 | } |
| 36752 | | - out = (out + 1) >> 2; |
| 36752 | + out = (out + 2) >> 2; |
| 36753 | 36753 | if( (out & U64_BIT(52))!=0 ){ |
| 36754 | 36754 | out = (out & ~U64_BIT(52)) | ((u64)(1075-e1)<<52); |
| 36755 | 36755 | } |
| 36756 | 36756 | memcpy(&r, &out, 8); |
| 36757 | 36757 | return r; |
| | @@ -44829,11 +44829,11 @@ |
| 44829 | 44829 | } |
| 44830 | 44830 | } |
| 44831 | 44831 | } |
| 44832 | 44832 | |
| 44833 | 44833 | /* Map the requested memory region into this processes address space. */ |
| 44834 | | - apNew = (char **)sqlite3_realloc( |
| 44834 | + apNew = (char **)sqlite3_realloc64( |
| 44835 | 44835 | pShmNode->apRegion, nReqRegion*sizeof(char *) |
| 44836 | 44836 | ); |
| 44837 | 44837 | if( !apNew ){ |
| 44838 | 44838 | rc = SQLITE_IOERR_NOMEM_BKPT; |
| 44839 | 44839 | goto shmpage_out; |
| | @@ -157891,10 +157891,11 @@ |
| 157891 | 157891 | || (pList->bReturning && pList->pNext==0) ); |
| 157892 | 157892 | if( pList!=0 ){ |
| 157893 | 157893 | p = pList; |
| 157894 | 157894 | if( (pParse->db->flags & SQLITE_EnableTrigger)==0 |
| 157895 | 157895 | && pTab->pTrigger!=0 |
| 157896 | + && sqlite3SchemaToIndex(pParse->db, pTab->pTrigger->pSchema)!=1 |
| 157896 | 157897 | ){ |
| 157897 | 157898 | /* The SQLITE_DBCONFIG_ENABLE_TRIGGER setting is off. That means that |
| 157898 | 157899 | ** only TEMP triggers are allowed. Truncate the pList so that it |
| 157899 | 157900 | ** includes only TEMP triggers */ |
| 157900 | 157901 | if( pList==pTab->pTrigger ){ |
| | @@ -227233,12 +227234,12 @@ |
| 227233 | 227234 | for(i=0; zSql[i]; i++){ |
| 227234 | 227235 | char c = zSql[i]; |
| 227235 | 227236 | |
| 227236 | 227237 | /* If necessary, grow the pIter->aIdxCol[] array */ |
| 227237 | 227238 | if( iIdxCol==nIdxAlloc ){ |
| 227238 | | - RbuSpan *aIdxCol = (RbuSpan*)sqlite3_realloc( |
| 227239 | | - pIter->aIdxCol, (nIdxAlloc+16)*sizeof(RbuSpan) |
| 227239 | + RbuSpan *aIdxCol = (RbuSpan*)sqlite3_realloc64( |
| 227240 | + pIter->aIdxCol, nIdxAlloc*sizeof(RbuSpan) + 16*sizeof(RbuSpan) |
| 227240 | 227241 | ); |
| 227241 | 227242 | if( aIdxCol==0 ){ |
| 227242 | 227243 | rc = SQLITE_NOMEM; |
| 227243 | 227244 | break; |
| 227244 | 227245 | } |
| | @@ -242927,11 +242928,11 @@ |
| 242927 | 242928 | zEllips = fts5ValueToText(apVal[3]); |
| 242928 | 242929 | nToken = sqlite3_value_int(apVal[4]); |
| 242929 | 242930 | |
| 242930 | 242931 | iBestCol = (iCol>=0 ? iCol : 0); |
| 242931 | 242932 | nPhrase = pApi->xPhraseCount(pFts); |
| 242932 | | - aSeen = sqlite3_malloc(nPhrase); |
| 242933 | + aSeen = sqlite3_malloc64(nPhrase); |
| 242933 | 242934 | if( aSeen==0 ){ |
| 242934 | 242935 | rc = SQLITE_NOMEM; |
| 242935 | 242936 | } |
| 242936 | 242937 | if( rc==SQLITE_OK ){ |
| 242937 | 242938 | rc = pApi->xInstCount(pFts, &nInst); |
| | @@ -243582,11 +243583,11 @@ |
| 243582 | 243583 | char *zRet = 0; |
| 243583 | 243584 | if( *pRc==SQLITE_OK ){ |
| 243584 | 243585 | if( nIn<0 ){ |
| 243585 | 243586 | nIn = (int)strlen(pIn); |
| 243586 | 243587 | } |
| 243587 | | - zRet = (char*)sqlite3_malloc(nIn+1); |
| 243588 | + zRet = (char*)sqlite3_malloc64((i64)nIn+1); |
| 243588 | 243589 | if( zRet ){ |
| 243589 | 243590 | memcpy(zRet, pIn, nIn); |
| 243590 | 243591 | zRet[nIn] = '\0'; |
| 243591 | 243592 | }else{ |
| 243592 | 243593 | *pRc = SQLITE_NOMEM; |
| | @@ -244282,11 +244283,11 @@ |
| 244282 | 244283 | Fts5Config *pRet; /* New object to return */ |
| 244283 | 244284 | int i; |
| 244284 | 244285 | sqlite3_int64 nByte; |
| 244285 | 244286 | int bUnindexed = 0; /* True if there are one or more UNINDEXED */ |
| 244286 | 244287 | |
| 244287 | | - *ppOut = pRet = (Fts5Config*)sqlite3_malloc(sizeof(Fts5Config)); |
| 244288 | + *ppOut = pRet = (Fts5Config*)sqlite3_malloc64(sizeof(Fts5Config)); |
| 244288 | 244289 | if( pRet==0 ) return SQLITE_NOMEM; |
| 244289 | 244290 | memset(pRet, 0, sizeof(Fts5Config)); |
| 244290 | 244291 | pRet->pGlobal = pGlobal; |
| 244291 | 244292 | pRet->db = db; |
| 244292 | 244293 | pRet->iCookie = -1; |
| | @@ -244830,12 +244831,10 @@ |
| 244830 | 244831 | } |
| 244831 | 244832 | |
| 244832 | 244833 | va_end(ap); |
| 244833 | 244834 | } |
| 244834 | 244835 | |
| 244835 | | - |
| 244836 | | - |
| 244837 | 244836 | /* |
| 244838 | 244837 | ** 2014 May 31 |
| 244839 | 244838 | ** |
| 244840 | 244839 | ** The author disclaims copyright to this source code. In place of |
| 244841 | 244840 | ** a legal notice, here is a blessing: |
| | @@ -245148,11 +245147,11 @@ |
| 245148 | 245147 | } |
| 245149 | 245148 | } |
| 245150 | 245149 | |
| 245151 | 245150 | assert( sParse.rc!=SQLITE_OK || sParse.zErr==0 ); |
| 245152 | 245151 | if( sParse.rc==SQLITE_OK ){ |
| 245153 | | - *ppNew = pNew = sqlite3_malloc(sizeof(Fts5Expr)); |
| 245152 | + *ppNew = pNew = sqlite3_malloc64(sizeof(Fts5Expr)); |
| 245154 | 245153 | if( pNew==0 ){ |
| 245155 | 245154 | sParse.rc = SQLITE_NOMEM; |
| 245156 | 245155 | sqlite3Fts5ParseNodeFree(sParse.pExpr); |
| 245157 | 245156 | }else{ |
| 245158 | 245157 | pNew->pRoot = sParse.pExpr; |
| | @@ -245300,11 +245299,11 @@ |
| 245300 | 245299 | |
| 245301 | 245300 | p1->pRoot = sqlite3Fts5ParseNode(&sParse, FTS5_AND, p1->pRoot, p2->pRoot,0); |
| 245302 | 245301 | p2->pRoot = 0; |
| 245303 | 245302 | |
| 245304 | 245303 | if( sParse.rc==SQLITE_OK ){ |
| 245305 | | - Fts5ExprPhrase **ap = (Fts5ExprPhrase**)sqlite3_realloc( |
| 245304 | + Fts5ExprPhrase **ap = (Fts5ExprPhrase**)sqlite3_realloc64( |
| 245306 | 245305 | p1->apExprPhrase, nPhrase * sizeof(Fts5ExprPhrase*) |
| 245307 | 245306 | ); |
| 245308 | 245307 | if( ap==0 ){ |
| 245309 | 245308 | sParse.rc = SQLITE_NOMEM; |
| 245310 | 245309 | }else{ |
| | @@ -248212,11 +248211,11 @@ |
| 248212 | 248211 | */ |
| 248213 | 248212 | static int sqlite3Fts5HashNew(Fts5Config *pConfig, Fts5Hash **ppNew, int *pnByte){ |
| 248214 | 248213 | int rc = SQLITE_OK; |
| 248215 | 248214 | Fts5Hash *pNew; |
| 248216 | 248215 | |
| 248217 | | - *ppNew = pNew = (Fts5Hash*)sqlite3_malloc(sizeof(Fts5Hash)); |
| 248216 | + *ppNew = pNew = (Fts5Hash*)sqlite3_malloc64(sizeof(Fts5Hash)); |
| 248218 | 248217 | if( pNew==0 ){ |
| 248219 | 248218 | rc = SQLITE_NOMEM; |
| 248220 | 248219 | }else{ |
| 248221 | 248220 | sqlite3_int64 nByte; |
| 248222 | 248221 | memset(pNew, 0, sizeof(Fts5Hash)); |
| | @@ -250805,11 +250804,11 @@ |
| 250805 | 250804 | i += fts5GetVarint(&a[i], &iDelta); |
| 250806 | 250805 | pIter->iRowid += iDelta; |
| 250807 | 250806 | |
| 250808 | 250807 | /* If necessary, grow the pIter->aRowidOffset[] array. */ |
| 250809 | 250808 | if( iRowidOffset>=pIter->nRowidOffset ){ |
| 250810 | | - int nNew = pIter->nRowidOffset + 8; |
| 250809 | + i64 nNew = pIter->nRowidOffset + 8; |
| 250811 | 250810 | int *aNew = (int*)sqlite3_realloc64(pIter->aRowidOffset,nNew*sizeof(int)); |
| 250812 | 250811 | if( aNew==0 ){ |
| 250813 | 250812 | p->rc = SQLITE_NOMEM; |
| 250814 | 250813 | break; |
| 250815 | 250814 | } |
| | @@ -255130,20 +255129,20 @@ |
| 255130 | 255129 | ** of Fts5TokenDataMap structures, which are used to find the token required |
| 255131 | 255130 | ** when the xInstToken() API is used. This is done by the nMapAlloc, nMap and |
| 255132 | 255131 | ** aMap[] variables. |
| 255133 | 255132 | */ |
| 255134 | 255133 | struct Fts5TokenDataIter { |
| 255135 | | - int nMapAlloc; /* Allocated size of aMap[] in entries */ |
| 255136 | | - int nMap; /* Number of valid entries in aMap[] */ |
| 255134 | + i64 nMapAlloc; /* Allocated size of aMap[] in entries */ |
| 255135 | + i64 nMap; /* Number of valid entries in aMap[] */ |
| 255137 | 255136 | Fts5TokenDataMap *aMap; /* Array of (rowid+pos -> token) mappings */ |
| 255138 | 255137 | |
| 255139 | 255138 | /* The following are used for prefix-queries only. */ |
| 255140 | 255139 | Fts5Buffer terms; |
| 255141 | 255140 | |
| 255142 | 255141 | /* The following are used for other full-token tokendata queries only. */ |
| 255143 | | - int nIter; |
| 255144 | | - int nIterAlloc; |
| 255142 | + i64 nIter; |
| 255143 | + i64 nIterAlloc; |
| 255145 | 255144 | Fts5PoslistReader *aPoslistReader; |
| 255146 | 255145 | int *aPoslistToIter; |
| 255147 | 255146 | Fts5Iter *apIter[FLEXARRAY]; |
| 255148 | 255147 | }; |
| 255149 | 255148 | |
| | @@ -255195,15 +255194,15 @@ |
| 255195 | 255194 | i64 iRowid, |
| 255196 | 255195 | i64 iPos |
| 255197 | 255196 | ){ |
| 255198 | 255197 | if( p->rc==SQLITE_OK ){ |
| 255199 | 255198 | if( pT->nMap==pT->nMapAlloc ){ |
| 255200 | | - int nNew = pT->nMapAlloc ? pT->nMapAlloc*2 : 64; |
| 255201 | | - int nAlloc = nNew * sizeof(Fts5TokenDataMap); |
| 255199 | + i64 nNew = pT->nMapAlloc ? pT->nMapAlloc*2 : 64; |
| 255200 | + i64 nAlloc = nNew * sizeof(Fts5TokenDataMap); |
| 255202 | 255201 | Fts5TokenDataMap *aNew; |
| 255203 | 255202 | |
| 255204 | | - aNew = (Fts5TokenDataMap*)sqlite3_realloc(pT->aMap, nAlloc); |
| 255203 | + aNew = (Fts5TokenDataMap*)sqlite3_realloc64(pT->aMap, nAlloc); |
| 255205 | 255204 | if( aNew==0 ){ |
| 255206 | 255205 | p->rc = SQLITE_NOMEM; |
| 255207 | 255206 | return; |
| 255208 | 255207 | } |
| 255209 | 255208 | |
| | @@ -255225,11 +255224,11 @@ |
| 255225 | 255224 | ** The sorting algorithm requires a malloc(). If this fails, an error code |
| 255226 | 255225 | ** is left in Fts5Index.rc before returning. |
| 255227 | 255226 | */ |
| 255228 | 255227 | static void fts5TokendataIterSortMap(Fts5Index *p, Fts5TokenDataIter *pT){ |
| 255229 | 255228 | Fts5TokenDataMap *aTmp = 0; |
| 255230 | | - int nByte = pT->nMap * sizeof(Fts5TokenDataMap); |
| 255229 | + i64 nByte = pT->nMap * sizeof(Fts5TokenDataMap); |
| 255231 | 255230 | |
| 255232 | 255231 | aTmp = (Fts5TokenDataMap*)sqlite3Fts5MallocZero(&p->rc, nByte); |
| 255233 | 255232 | if( aTmp ){ |
| 255234 | 255233 | Fts5TokenDataMap *a1 = pT->aMap; |
| 255235 | 255234 | Fts5TokenDataMap *a2 = aTmp; |
| | @@ -255759,13 +255758,14 @@ |
| 255759 | 255758 | ){ |
| 255760 | 255759 | Fts5TokenDataIter *pRet = pIn; |
| 255761 | 255760 | |
| 255762 | 255761 | if( p->rc==SQLITE_OK ){ |
| 255763 | 255762 | if( pIn==0 || pIn->nIter==pIn->nIterAlloc ){ |
| 255764 | | - int nAlloc = pIn ? pIn->nIterAlloc*2 : 16; |
| 255765 | | - int nByte = SZ_FTS5TOKENDATAITER(nAlloc+1); |
| 255766 | | - Fts5TokenDataIter *pNew = (Fts5TokenDataIter*)sqlite3_realloc(pIn, nByte); |
| 255763 | + i64 nAlloc = pIn ? pIn->nIterAlloc*2 : 16; |
| 255764 | + i64 nByte = SZ_FTS5TOKENDATAITER(nAlloc+1); |
| 255765 | + Fts5TokenDataIter *pNew; |
| 255766 | + pNew = (Fts5TokenDataIter*)sqlite3_realloc64(pIn, nByte); |
| 255767 | 255767 | |
| 255768 | 255768 | if( pNew==0 ){ |
| 255769 | 255769 | p->rc = SQLITE_NOMEM; |
| 255770 | 255770 | }else{ |
| 255771 | 255771 | if( pIn==0 ) memset(pNew, 0, nByte); |
| | @@ -255858,12 +255858,12 @@ |
| 255858 | 255858 | return; |
| 255859 | 255859 | } |
| 255860 | 255860 | |
| 255861 | 255861 | /* Ensure the token-mapping is large enough */ |
| 255862 | 255862 | if( eDetail==FTS5_DETAIL_FULL && pT->nMapAlloc<(pT->nMap + nByte) ){ |
| 255863 | | - int nNew = (pT->nMapAlloc + nByte) * 2; |
| 255864 | | - Fts5TokenDataMap *aNew = (Fts5TokenDataMap*)sqlite3_realloc( |
| 255863 | + i64 nNew = (pT->nMapAlloc + nByte) * 2; |
| 255864 | + Fts5TokenDataMap *aNew = (Fts5TokenDataMap*)sqlite3_realloc64( |
| 255865 | 255865 | pT->aMap, nNew*sizeof(Fts5TokenDataMap) |
| 255866 | 255866 | ); |
| 255867 | 255867 | if( aNew==0 ){ |
| 255868 | 255868 | pIter->pIndex->rc = SQLITE_NOMEM; |
| 255869 | 255869 | return; |
| | @@ -258888,11 +258888,11 @@ |
| 258888 | 258888 | "recursively defined fts5 content table" |
| 258889 | 258889 | ); |
| 258890 | 258890 | return SQLITE_ERROR; |
| 258891 | 258891 | } |
| 258892 | 258892 | |
| 258893 | | - idxStr = (char*)sqlite3_malloc(pInfo->nConstraint * 8 + 1); |
| 258893 | + idxStr = (char*)sqlite3_malloc64((i64)pInfo->nConstraint * 8 + 1); |
| 258894 | 258894 | if( idxStr==0 ) return SQLITE_NOMEM; |
| 258895 | 258895 | pInfo->idxStr = idxStr; |
| 258896 | 258896 | pInfo->needToFreeIdxStr = 1; |
| 258897 | 258897 | |
| 258898 | 258898 | for(i=0; i<pInfo->nConstraint; i++){ |
| | @@ -261856,11 +261856,11 @@ |
| 261856 | 261856 | int nArg, /* Number of args */ |
| 261857 | 261857 | sqlite3_value **apUnused /* Function arguments */ |
| 261858 | 261858 | ){ |
| 261859 | 261859 | assert( nArg==0 ); |
| 261860 | 261860 | UNUSED_PARAM2(nArg, apUnused); |
| 261861 | | - sqlite3_result_text(pCtx, "fts5: 2026-02-27 11:36:43 7c5f4dcd748baa60097bbf68d7aca99cc959bb1f7da92bd9ad86a4425a37d391", -1, SQLITE_TRANSIENT); |
| 261861 | + sqlite3_result_text(pCtx, "fts5: 2026-03-02 17:11:44 88dce64242552e7443d9fb496f6f3ad71dc5b4a882ce21b7ef1d5ea4e26f1e61", -1, SQLITE_TRANSIENT); |
| 261862 | 261862 | } |
| 261863 | 261863 | |
| 261864 | 261864 | /* |
| 261865 | 261865 | ** Implementation of fts5_locale(LOCALE, TEXT) function. |
| 261866 | 261866 | ** |
| | @@ -262020,11 +262020,11 @@ |
| 262020 | 262020 | }; |
| 262021 | 262021 | |
| 262022 | 262022 | int rc; |
| 262023 | 262023 | Fts5Global *pGlobal = 0; |
| 262024 | 262024 | |
| 262025 | | - pGlobal = (Fts5Global*)sqlite3_malloc(sizeof(Fts5Global)); |
| 262025 | + pGlobal = (Fts5Global*)sqlite3_malloc64(sizeof(Fts5Global)); |
| 262026 | 262026 | if( pGlobal==0 ){ |
| 262027 | 262027 | rc = SQLITE_NOMEM; |
| 262028 | 262028 | }else{ |
| 262029 | 262029 | void *p = (void*)pGlobal; |
| 262030 | 262030 | memset(pGlobal, 0, sizeof(Fts5Global)); |
| | @@ -263736,11 +263736,11 @@ |
| 263736 | 263736 | AsciiTokenizer *p = 0; |
| 263737 | 263737 | UNUSED_PARAM(pUnused); |
| 263738 | 263738 | if( nArg%2 ){ |
| 263739 | 263739 | rc = SQLITE_ERROR; |
| 263740 | 263740 | }else{ |
| 263741 | | - p = sqlite3_malloc(sizeof(AsciiTokenizer)); |
| 263741 | + p = sqlite3_malloc64(sizeof(AsciiTokenizer)); |
| 263742 | 263742 | if( p==0 ){ |
| 263743 | 263743 | rc = SQLITE_NOMEM; |
| 263744 | 263744 | }else{ |
| 263745 | 263745 | int i; |
| 263746 | 263746 | memset(p, 0, sizeof(AsciiTokenizer)); |
| | @@ -264031,11 +264031,11 @@ |
| 264031 | 264031 | UNUSED_PARAM(pUnused); |
| 264032 | 264032 | |
| 264033 | 264033 | if( nArg%2 ){ |
| 264034 | 264034 | rc = SQLITE_ERROR; |
| 264035 | 264035 | }else{ |
| 264036 | | - p = (Unicode61Tokenizer*)sqlite3_malloc(sizeof(Unicode61Tokenizer)); |
| 264036 | + p = (Unicode61Tokenizer*)sqlite3_malloc64(sizeof(Unicode61Tokenizer)); |
| 264037 | 264037 | if( p ){ |
| 264038 | 264038 | const char *zCat = "L* N* Co"; |
| 264039 | 264039 | int i; |
| 264040 | 264040 | memset(p, 0, sizeof(Unicode61Tokenizer)); |
| 264041 | 264041 | |
| | @@ -264254,11 +264254,11 @@ |
| 264254 | 264254 | |
| 264255 | 264255 | if( nArg>0 ){ |
| 264256 | 264256 | zBase = azArg[0]; |
| 264257 | 264257 | } |
| 264258 | 264258 | |
| 264259 | | - pRet = (PorterTokenizer*)sqlite3_malloc(sizeof(PorterTokenizer)); |
| 264259 | + pRet = (PorterTokenizer*)sqlite3_malloc64(sizeof(PorterTokenizer)); |
| 264260 | 264260 | if( pRet ){ |
| 264261 | 264261 | memset(pRet, 0, sizeof(PorterTokenizer)); |
| 264262 | 264262 | rc = pApi->xFindTokenizer_v2(pApi, zBase, &pUserdata, &pV2); |
| 264263 | 264263 | }else{ |
| 264264 | 264264 | rc = SQLITE_NOMEM; |
| | @@ -264961,11 +264961,11 @@ |
| 264961 | 264961 | UNUSED_PARAM(pUnused); |
| 264962 | 264962 | if( nArg%2 ){ |
| 264963 | 264963 | rc = SQLITE_ERROR; |
| 264964 | 264964 | }else{ |
| 264965 | 264965 | int i; |
| 264966 | | - pNew = (TrigramTokenizer*)sqlite3_malloc(sizeof(*pNew)); |
| 264966 | + pNew = (TrigramTokenizer*)sqlite3_malloc64(sizeof(*pNew)); |
| 264967 | 264967 | if( pNew==0 ){ |
| 264968 | 264968 | rc = SQLITE_NOMEM; |
| 264969 | 264969 | }else{ |
| 264970 | 264970 | pNew->bFold = 1; |
| 264971 | 264971 | pNew->iFoldParam = 0; |
| | @@ -266947,11 +266947,11 @@ |
| 266947 | 266947 | } |
| 266948 | 266948 | if( pLe ){ |
| 266949 | 266949 | const char *zCopy = (const char *)sqlite3_value_text(pLe); |
| 266950 | 266950 | if( zCopy==0 ) zCopy = ""; |
| 266951 | 266951 | pCsr->nLeTerm = sqlite3_value_bytes(pLe); |
| 266952 | | - pCsr->zLeTerm = sqlite3_malloc(pCsr->nLeTerm+1); |
| 266952 | + pCsr->zLeTerm = sqlite3_malloc64((i64)pCsr->nLeTerm+1); |
| 266953 | 266953 | if( pCsr->zLeTerm==0 ){ |
| 266954 | 266954 | rc = SQLITE_NOMEM; |
| 266955 | 266955 | }else{ |
| 266956 | 266956 | memcpy(pCsr->zLeTerm, zCopy, pCsr->nLeTerm+1); |
| 266957 | 266957 | } |
| 266958 | 266958 | |