Fossil SCM
Update the built-in SQLite to the latest trunk version, for testing.
Commit
d14a7803d77e8d0ba27c9e96f43d4a1e1789e2c3b2a5c28b230b77c5880f22e7
Parent
f031f744f0e061c…
2 files changed
+60
-20
+4
-3
+60
-20
| --- extsrc/sqlite3.c | ||
| +++ extsrc/sqlite3.c | ||
| @@ -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 | -** 20acd630b91609725794ce84f9eda01d5f3c with changes in files: | |
| 21 | +** d22475b81c4e26ccc50f3b5626d43b32f7a2 with changes in files: | |
| 22 | 22 | ** |
| 23 | 23 | ** |
| 24 | 24 | */ |
| 25 | 25 | #ifndef SQLITE_AMALGAMATION |
| 26 | 26 | #define SQLITE_CORE 1 |
| @@ -465,11 +465,11 @@ | ||
| 465 | 465 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 466 | 466 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 467 | 467 | */ |
| 468 | 468 | #define SQLITE_VERSION "3.50.0" |
| 469 | 469 | #define SQLITE_VERSION_NUMBER 3050000 |
| 470 | -#define SQLITE_SOURCE_ID "2025-04-10 10:18:07 20acd630b91609725794ce84f9eda01d5f3c898407f0948264830851d25ccaa6" | |
| 470 | +#define SQLITE_SOURCE_ID "2025-04-15 21:59:38 d22475b81c4e26ccc50f3b5626d43b32f7a2de34e5a764539554665bdda735d5" | |
| 471 | 471 | |
| 472 | 472 | /* |
| 473 | 473 | ** CAPI3REF: Run-Time Library Version Numbers |
| 474 | 474 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 475 | 475 | ** |
| @@ -11946,12 +11946,13 @@ | ||
| 11946 | 11946 | ** To clarify, if this function is called and then a changeset constructed |
| 11947 | 11947 | ** using [sqlite3session_changeset()], then after applying that changeset to |
| 11948 | 11948 | ** database zFrom the contents of the two compatible tables would be |
| 11949 | 11949 | ** identical. |
| 11950 | 11950 | ** |
| 11951 | -** It an error if database zFrom does not exist or does not contain the | |
| 11952 | -** required compatible table. | |
| 11951 | +** Unless the call to this function is a no-op as described above, it is an | |
| 11952 | +** error if database zFrom does not exist or does not contain the required | |
| 11953 | +** compatible table. | |
| 11953 | 11954 | ** |
| 11954 | 11955 | ** If the operation is successful, SQLITE_OK is returned. Otherwise, an SQLite |
| 11955 | 11956 | ** error code. In this case, if argument pzErrMsg is not NULL, *pzErrMsg |
| 11956 | 11957 | ** may be set to point to a buffer containing an English language error |
| 11957 | 11958 | ** message. It is the responsibility of the caller to free this buffer using |
| @@ -19162,10 +19163,11 @@ | ||
| 19162 | 19163 | unsigned noSkipScan:1; /* Do not try to use skip-scan if true */ |
| 19163 | 19164 | unsigned hasStat1:1; /* aiRowLogEst values come from sqlite_stat1 */ |
| 19164 | 19165 | unsigned bLowQual:1; /* sqlite_stat1 says this is a low-quality index */ |
| 19165 | 19166 | unsigned bNoQuery:1; /* Do not use this index to optimize queries */ |
| 19166 | 19167 | unsigned bAscKeyBug:1; /* True if the bba7b69f9849b5bf bug applies */ |
| 19168 | + unsigned bIdxRowid:1; /* One or more of the index keys is the ROWID */ | |
| 19167 | 19169 | unsigned bHasVCol:1; /* Index references one or more VIRTUAL columns */ |
| 19168 | 19170 | unsigned bHasExpr:1; /* Index contains an expression, either a literal |
| 19169 | 19171 | ** expression, or a reference to a VIRTUAL column */ |
| 19170 | 19172 | #ifdef SQLITE_ENABLE_STAT4 |
| 19171 | 19173 | int nSample; /* Number of elements in aSample[] */ |
| @@ -127237,10 +127239,11 @@ | ||
| 127237 | 127239 | }else{ |
| 127238 | 127240 | j = pCExpr->iColumn; |
| 127239 | 127241 | assert( j<=0x7fff ); |
| 127240 | 127242 | if( j<0 ){ |
| 127241 | 127243 | j = pTab->iPKey; |
| 127244 | + pIndex->bIdxRowid = 1; | |
| 127242 | 127245 | }else{ |
| 127243 | 127246 | if( pTab->aCol[j].notNull==0 ){ |
| 127244 | 127247 | pIndex->uniqNotNull = 0; |
| 127245 | 127248 | } |
| 127246 | 127249 | if( pTab->aCol[j].colFlags & COLFLAG_VIRTUAL ){ |
| @@ -149706,11 +149709,12 @@ | ||
| 149706 | 149709 | && pE2->iColumn==pColumn->iColumn |
| 149707 | 149710 | ){ |
| 149708 | 149711 | return; /* Already present. Return without doing anything. */ |
| 149709 | 149712 | } |
| 149710 | 149713 | } |
| 149711 | - if( sqlite3ExprAffinity(pColumn)==SQLITE_AFF_BLOB ){ | |
| 149714 | + assert( SQLITE_AFF_NONE<SQLITE_AFF_BLOB ); | |
| 149715 | + if( sqlite3ExprAffinity(pColumn)<=SQLITE_AFF_BLOB ){ | |
| 149712 | 149716 | pConst->bHasAffBlob = 1; |
| 149713 | 149717 | } |
| 149714 | 149718 | |
| 149715 | 149719 | pConst->nConst++; |
| 149716 | 149720 | pConst->apExpr = sqlite3DbReallocOrFree(pConst->pParse->db, pConst->apExpr, |
| @@ -149781,11 +149785,12 @@ | ||
| 149781 | 149785 | for(i=0; i<pConst->nConst; i++){ |
| 149782 | 149786 | Expr *pColumn = pConst->apExpr[i*2]; |
| 149783 | 149787 | if( pColumn==pExpr ) continue; |
| 149784 | 149788 | if( pColumn->iTable!=pExpr->iTable ) continue; |
| 149785 | 149789 | if( pColumn->iColumn!=pExpr->iColumn ) continue; |
| 149786 | - if( bIgnoreAffBlob && sqlite3ExprAffinity(pColumn)==SQLITE_AFF_BLOB ){ | |
| 149790 | + assert( SQLITE_AFF_NONE<SQLITE_AFF_BLOB ); | |
| 149791 | + if( bIgnoreAffBlob && sqlite3ExprAffinity(pColumn)<=SQLITE_AFF_BLOB ){ | |
| 149787 | 149792 | break; |
| 149788 | 149793 | } |
| 149789 | 149794 | /* A match is found. Add the EP_FixedCol property */ |
| 149790 | 149795 | pConst->nChng++; |
| 149791 | 149796 | ExprClearProperty(pExpr, EP_Leaf); |
| @@ -152965,10 +152970,16 @@ | ||
| 152965 | 152970 | pWInfo = sqlite3WhereBegin(pParse, pTabList, pWhere, sSort.pOrderBy, |
| 152966 | 152971 | p->pEList, p, wctrlFlags, p->nSelectRow); |
| 152967 | 152972 | if( pWInfo==0 ) goto select_end; |
| 152968 | 152973 | if( sqlite3WhereOutputRowCount(pWInfo) < p->nSelectRow ){ |
| 152969 | 152974 | p->nSelectRow = sqlite3WhereOutputRowCount(pWInfo); |
| 152975 | + if( pDest->eDest<=SRT_DistQueue && pDest->eDest>=SRT_DistFifo ){ | |
| 152976 | + /* TUNING: For a UNION CTE, because UNION is implies DISTINCT, | |
| 152977 | + ** reduce the estimated output row count by 8 (LogEst 30). | |
| 152978 | + ** Search for tag-20250414a to see other cases */ | |
| 152979 | + p->nSelectRow -= 30; | |
| 152980 | + } | |
| 152970 | 152981 | } |
| 152971 | 152982 | if( sDistinct.isTnct && sqlite3WhereIsDistinct(pWInfo) ){ |
| 152972 | 152983 | sDistinct.eTnctType = sqlite3WhereIsDistinct(pWInfo); |
| 152973 | 152984 | } |
| 152974 | 152985 | if( sSort.pOrderBy ){ |
| @@ -160131,11 +160142,11 @@ | ||
| 160131 | 160142 | |
| 160132 | 160143 | |
| 160133 | 160144 | /* |
| 160134 | 160145 | ** pX is an expression of the form: (vector) IN (SELECT ...) |
| 160135 | 160146 | ** In other words, it is a vector IN operator with a SELECT clause on the |
| 160136 | -** LHS. But not all terms in the vector are indexable and the terms might | |
| 160147 | +** RHS. But not all terms in the vector are indexable and the terms might | |
| 160137 | 160148 | ** not be in the correct order for indexing. |
| 160138 | 160149 | ** |
| 160139 | 160150 | ** This routine makes a copy of the input pX expression and then adjusts |
| 160140 | 160151 | ** the vector on the LHS with corresponding changes to the SELECT so that |
| 160141 | 160152 | ** the vector contains only index terms and those terms are in the correct |
| @@ -167926,11 +167937,11 @@ | ||
| 167926 | 167937 | } |
| 167927 | 167938 | |
| 167928 | 167939 | if( (pNew->wsFlags & WHERE_TOP_LIMIT)==0 |
| 167929 | 167940 | && pNew->u.btree.nEq<pProbe->nColumn |
| 167930 | 167941 | && (pNew->u.btree.nEq<pProbe->nKeyCol || |
| 167931 | - pProbe->idxType!=SQLITE_IDXTYPE_PRIMARYKEY) | |
| 167942 | + (pProbe->idxType!=SQLITE_IDXTYPE_PRIMARYKEY && !pProbe->bIdxRowid)) | |
| 167932 | 167943 | ){ |
| 167933 | 167944 | if( pNew->u.btree.nEq>3 ){ |
| 167934 | 167945 | sqlite3ProgressCheck(pParse); |
| 167935 | 167946 | } |
| 167936 | 167947 | whereLoopAddBtreeIndex(pBuilder, pSrc, pProbe, nInMul+nIn); |
| @@ -171384,11 +171395,12 @@ | ||
| 171384 | 171395 | wherePathSolver(pWInfo, pWInfo->nRowOut<0 ? 1 : pWInfo->nRowOut+1); |
| 171385 | 171396 | if( db->mallocFailed ) goto whereBeginError; |
| 171386 | 171397 | } |
| 171387 | 171398 | |
| 171388 | 171399 | /* TUNING: Assume that a DISTINCT clause on a subquery reduces |
| 171389 | - ** the output size by a factor of 8 (LogEst -30). | |
| 171400 | + ** the output size by a factor of 8 (LogEst -30). Search for | |
| 171401 | + ** tag-20250414a to see other cases. | |
| 171390 | 171402 | */ |
| 171391 | 171403 | if( (pWInfo->wctrlFlags & WHERE_WANT_DISTINCT)!=0 ){ |
| 171392 | 171404 | WHERETRACE(0x0080,("nRowOut reduced from %d to %d due to DISTINCT\n", |
| 171393 | 171405 | pWInfo->nRowOut, pWInfo->nRowOut-30)); |
| 171394 | 171406 | pWInfo->nRowOut -= 30; |
| @@ -206261,20 +206273,20 @@ | ||
| 206261 | 206273 | case FTS3_MATCHINFO_LCS: |
| 206262 | 206274 | nVal = pInfo->nCol; |
| 206263 | 206275 | break; |
| 206264 | 206276 | |
| 206265 | 206277 | case FTS3_MATCHINFO_LHITS: |
| 206266 | - nVal = pInfo->nCol * pInfo->nPhrase; | |
| 206278 | + nVal = (size_t)pInfo->nCol * pInfo->nPhrase; | |
| 206267 | 206279 | break; |
| 206268 | 206280 | |
| 206269 | 206281 | case FTS3_MATCHINFO_LHITS_BM: |
| 206270 | - nVal = pInfo->nPhrase * ((pInfo->nCol + 31) / 32); | |
| 206282 | + nVal = (size_t)pInfo->nPhrase * ((pInfo->nCol + 31) / 32); | |
| 206271 | 206283 | break; |
| 206272 | 206284 | |
| 206273 | 206285 | default: |
| 206274 | 206286 | assert( cArg==FTS3_MATCHINFO_HITS ); |
| 206275 | - nVal = pInfo->nCol * pInfo->nPhrase * 3; | |
| 206287 | + nVal = (size_t)pInfo->nCol * pInfo->nPhrase * 3; | |
| 206276 | 206288 | break; |
| 206277 | 206289 | } |
| 206278 | 206290 | |
| 206279 | 206291 | return nVal; |
| 206280 | 206292 | } |
| @@ -229245,10 +229257,12 @@ | ||
| 229245 | 229257 | int rc = SQLITE_OK; |
| 229246 | 229258 | |
| 229247 | 229259 | if( pTab->nCol==0 ){ |
| 229248 | 229260 | u8 *abPK; |
| 229249 | 229261 | assert( pTab->azCol==0 || pTab->abPK==0 ); |
| 229262 | + sqlite3_free(pTab->azCol); | |
| 229263 | + pTab->abPK = 0; | |
| 229250 | 229264 | rc = sessionTableInfo(pSession, db, zDb, |
| 229251 | 229265 | pTab->zName, &pTab->nCol, &pTab->nTotalCol, 0, &pTab->azCol, |
| 229252 | 229266 | &pTab->azDflt, &pTab->aiIdx, &abPK, |
| 229253 | 229267 | ((pSession==0 || pSession->bImplicitPK) ? &pTab->bRowid : 0) |
| 229254 | 229268 | ); |
| @@ -230265,21 +230279,47 @@ | ||
| 230265 | 230279 | |
| 230266 | 230280 | /* Check the table schemas match */ |
| 230267 | 230281 | if( rc==SQLITE_OK ){ |
| 230268 | 230282 | int bHasPk = 0; |
| 230269 | 230283 | int bMismatch = 0; |
| 230270 | - int nCol; /* Columns in zFrom.zTbl */ | |
| 230284 | + int nCol = 0; /* Columns in zFrom.zTbl */ | |
| 230271 | 230285 | int bRowid = 0; |
| 230272 | - u8 *abPK; | |
| 230286 | + u8 *abPK = 0; | |
| 230273 | 230287 | const char **azCol = 0; |
| 230274 | - rc = sessionTableInfo(0, db, zFrom, zTbl, | |
| 230275 | - &nCol, 0, 0, &azCol, 0, 0, &abPK, | |
| 230276 | - pSession->bImplicitPK ? &bRowid : 0 | |
| 230277 | - ); | |
| 230288 | + char *zDbExists = 0; | |
| 230289 | + | |
| 230290 | + /* Check that database zFrom is attached. */ | |
| 230291 | + zDbExists = sqlite3_mprintf("SELECT * FROM %Q.sqlite_schema", zFrom); | |
| 230292 | + if( zDbExists==0 ){ | |
| 230293 | + rc = SQLITE_NOMEM; | |
| 230294 | + }else{ | |
| 230295 | + sqlite3_stmt *pDbExists = 0; | |
| 230296 | + rc = sqlite3_prepare_v2(db, zDbExists, -1, &pDbExists, 0); | |
| 230297 | + if( rc==SQLITE_ERROR ){ | |
| 230298 | + rc = SQLITE_OK; | |
| 230299 | + nCol = -1; | |
| 230300 | + } | |
| 230301 | + sqlite3_finalize(pDbExists); | |
| 230302 | + sqlite3_free(zDbExists); | |
| 230303 | + } | |
| 230304 | + | |
| 230305 | + if( rc==SQLITE_OK && nCol==0 ){ | |
| 230306 | + rc = sessionTableInfo(0, db, zFrom, zTbl, | |
| 230307 | + &nCol, 0, 0, &azCol, 0, 0, &abPK, | |
| 230308 | + pSession->bImplicitPK ? &bRowid : 0 | |
| 230309 | + ); | |
| 230310 | + } | |
| 230278 | 230311 | if( rc==SQLITE_OK ){ |
| 230279 | 230312 | if( pTo->nCol!=nCol ){ |
| 230280 | - bMismatch = 1; | |
| 230313 | + if( nCol<=0 ){ | |
| 230314 | + rc = SQLITE_SCHEMA; | |
| 230315 | + if( pzErrMsg ){ | |
| 230316 | + *pzErrMsg = sqlite3_mprintf("no such table: %s.%s", zFrom, zTbl); | |
| 230317 | + } | |
| 230318 | + }else{ | |
| 230319 | + bMismatch = 1; | |
| 230320 | + } | |
| 230281 | 230321 | }else{ |
| 230282 | 230322 | int i; |
| 230283 | 230323 | for(i=0; i<nCol; i++){ |
| 230284 | 230324 | if( pTo->abPK[i]!=abPK[i] ) bMismatch = 1; |
| 230285 | 230325 | if( sqlite3_stricmp(azCol[i], pTo->azCol[i]) ) bMismatch = 1; |
| @@ -257173,11 +257213,11 @@ | ||
| 257173 | 257213 | int nArg, /* Number of args */ |
| 257174 | 257214 | sqlite3_value **apUnused /* Function arguments */ |
| 257175 | 257215 | ){ |
| 257176 | 257216 | assert( nArg==0 ); |
| 257177 | 257217 | UNUSED_PARAM2(nArg, apUnused); |
| 257178 | - sqlite3_result_text(pCtx, "fts5: 2025-04-10 10:18:07 20acd630b91609725794ce84f9eda01d5f3c898407f0948264830851d25ccaa6", -1, SQLITE_TRANSIENT); | |
| 257218 | + sqlite3_result_text(pCtx, "fts5: 2025-04-15 21:59:38 d22475b81c4e26ccc50f3b5626d43b32f7a2de34e5a764539554665bdda735d5", -1, SQLITE_TRANSIENT); | |
| 257179 | 257219 | } |
| 257180 | 257220 | |
| 257181 | 257221 | /* |
| 257182 | 257222 | ** Implementation of fts5_locale(LOCALE, TEXT) function. |
| 257183 | 257223 | ** |
| 257184 | 257224 |
| --- extsrc/sqlite3.c | |
| +++ extsrc/sqlite3.c | |
| @@ -16,11 +16,11 @@ | |
| 16 | ** if you want a wrapper to interface SQLite with your choice of programming |
| 17 | ** language. The code for the "sqlite3" command-line shell is also in a |
| 18 | ** separate file. This file contains only code for the core SQLite library. |
| 19 | ** |
| 20 | ** The content in this amalgamation comes from Fossil check-in |
| 21 | ** 20acd630b91609725794ce84f9eda01d5f3c with changes in files: |
| 22 | ** |
| 23 | ** |
| 24 | */ |
| 25 | #ifndef SQLITE_AMALGAMATION |
| 26 | #define SQLITE_CORE 1 |
| @@ -465,11 +465,11 @@ | |
| 465 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 466 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 467 | */ |
| 468 | #define SQLITE_VERSION "3.50.0" |
| 469 | #define SQLITE_VERSION_NUMBER 3050000 |
| 470 | #define SQLITE_SOURCE_ID "2025-04-10 10:18:07 20acd630b91609725794ce84f9eda01d5f3c898407f0948264830851d25ccaa6" |
| 471 | |
| 472 | /* |
| 473 | ** CAPI3REF: Run-Time Library Version Numbers |
| 474 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 475 | ** |
| @@ -11946,12 +11946,13 @@ | |
| 11946 | ** To clarify, if this function is called and then a changeset constructed |
| 11947 | ** using [sqlite3session_changeset()], then after applying that changeset to |
| 11948 | ** database zFrom the contents of the two compatible tables would be |
| 11949 | ** identical. |
| 11950 | ** |
| 11951 | ** It an error if database zFrom does not exist or does not contain the |
| 11952 | ** required compatible table. |
| 11953 | ** |
| 11954 | ** If the operation is successful, SQLITE_OK is returned. Otherwise, an SQLite |
| 11955 | ** error code. In this case, if argument pzErrMsg is not NULL, *pzErrMsg |
| 11956 | ** may be set to point to a buffer containing an English language error |
| 11957 | ** message. It is the responsibility of the caller to free this buffer using |
| @@ -19162,10 +19163,11 @@ | |
| 19162 | unsigned noSkipScan:1; /* Do not try to use skip-scan if true */ |
| 19163 | unsigned hasStat1:1; /* aiRowLogEst values come from sqlite_stat1 */ |
| 19164 | unsigned bLowQual:1; /* sqlite_stat1 says this is a low-quality index */ |
| 19165 | unsigned bNoQuery:1; /* Do not use this index to optimize queries */ |
| 19166 | unsigned bAscKeyBug:1; /* True if the bba7b69f9849b5bf bug applies */ |
| 19167 | unsigned bHasVCol:1; /* Index references one or more VIRTUAL columns */ |
| 19168 | unsigned bHasExpr:1; /* Index contains an expression, either a literal |
| 19169 | ** expression, or a reference to a VIRTUAL column */ |
| 19170 | #ifdef SQLITE_ENABLE_STAT4 |
| 19171 | int nSample; /* Number of elements in aSample[] */ |
| @@ -127237,10 +127239,11 @@ | |
| 127237 | }else{ |
| 127238 | j = pCExpr->iColumn; |
| 127239 | assert( j<=0x7fff ); |
| 127240 | if( j<0 ){ |
| 127241 | j = pTab->iPKey; |
| 127242 | }else{ |
| 127243 | if( pTab->aCol[j].notNull==0 ){ |
| 127244 | pIndex->uniqNotNull = 0; |
| 127245 | } |
| 127246 | if( pTab->aCol[j].colFlags & COLFLAG_VIRTUAL ){ |
| @@ -149706,11 +149709,12 @@ | |
| 149706 | && pE2->iColumn==pColumn->iColumn |
| 149707 | ){ |
| 149708 | return; /* Already present. Return without doing anything. */ |
| 149709 | } |
| 149710 | } |
| 149711 | if( sqlite3ExprAffinity(pColumn)==SQLITE_AFF_BLOB ){ |
| 149712 | pConst->bHasAffBlob = 1; |
| 149713 | } |
| 149714 | |
| 149715 | pConst->nConst++; |
| 149716 | pConst->apExpr = sqlite3DbReallocOrFree(pConst->pParse->db, pConst->apExpr, |
| @@ -149781,11 +149785,12 @@ | |
| 149781 | for(i=0; i<pConst->nConst; i++){ |
| 149782 | Expr *pColumn = pConst->apExpr[i*2]; |
| 149783 | if( pColumn==pExpr ) continue; |
| 149784 | if( pColumn->iTable!=pExpr->iTable ) continue; |
| 149785 | if( pColumn->iColumn!=pExpr->iColumn ) continue; |
| 149786 | if( bIgnoreAffBlob && sqlite3ExprAffinity(pColumn)==SQLITE_AFF_BLOB ){ |
| 149787 | break; |
| 149788 | } |
| 149789 | /* A match is found. Add the EP_FixedCol property */ |
| 149790 | pConst->nChng++; |
| 149791 | ExprClearProperty(pExpr, EP_Leaf); |
| @@ -152965,10 +152970,16 @@ | |
| 152965 | pWInfo = sqlite3WhereBegin(pParse, pTabList, pWhere, sSort.pOrderBy, |
| 152966 | p->pEList, p, wctrlFlags, p->nSelectRow); |
| 152967 | if( pWInfo==0 ) goto select_end; |
| 152968 | if( sqlite3WhereOutputRowCount(pWInfo) < p->nSelectRow ){ |
| 152969 | p->nSelectRow = sqlite3WhereOutputRowCount(pWInfo); |
| 152970 | } |
| 152971 | if( sDistinct.isTnct && sqlite3WhereIsDistinct(pWInfo) ){ |
| 152972 | sDistinct.eTnctType = sqlite3WhereIsDistinct(pWInfo); |
| 152973 | } |
| 152974 | if( sSort.pOrderBy ){ |
| @@ -160131,11 +160142,11 @@ | |
| 160131 | |
| 160132 | |
| 160133 | /* |
| 160134 | ** pX is an expression of the form: (vector) IN (SELECT ...) |
| 160135 | ** In other words, it is a vector IN operator with a SELECT clause on the |
| 160136 | ** LHS. But not all terms in the vector are indexable and the terms might |
| 160137 | ** not be in the correct order for indexing. |
| 160138 | ** |
| 160139 | ** This routine makes a copy of the input pX expression and then adjusts |
| 160140 | ** the vector on the LHS with corresponding changes to the SELECT so that |
| 160141 | ** the vector contains only index terms and those terms are in the correct |
| @@ -167926,11 +167937,11 @@ | |
| 167926 | } |
| 167927 | |
| 167928 | if( (pNew->wsFlags & WHERE_TOP_LIMIT)==0 |
| 167929 | && pNew->u.btree.nEq<pProbe->nColumn |
| 167930 | && (pNew->u.btree.nEq<pProbe->nKeyCol || |
| 167931 | pProbe->idxType!=SQLITE_IDXTYPE_PRIMARYKEY) |
| 167932 | ){ |
| 167933 | if( pNew->u.btree.nEq>3 ){ |
| 167934 | sqlite3ProgressCheck(pParse); |
| 167935 | } |
| 167936 | whereLoopAddBtreeIndex(pBuilder, pSrc, pProbe, nInMul+nIn); |
| @@ -171384,11 +171395,12 @@ | |
| 171384 | wherePathSolver(pWInfo, pWInfo->nRowOut<0 ? 1 : pWInfo->nRowOut+1); |
| 171385 | if( db->mallocFailed ) goto whereBeginError; |
| 171386 | } |
| 171387 | |
| 171388 | /* TUNING: Assume that a DISTINCT clause on a subquery reduces |
| 171389 | ** the output size by a factor of 8 (LogEst -30). |
| 171390 | */ |
| 171391 | if( (pWInfo->wctrlFlags & WHERE_WANT_DISTINCT)!=0 ){ |
| 171392 | WHERETRACE(0x0080,("nRowOut reduced from %d to %d due to DISTINCT\n", |
| 171393 | pWInfo->nRowOut, pWInfo->nRowOut-30)); |
| 171394 | pWInfo->nRowOut -= 30; |
| @@ -206261,20 +206273,20 @@ | |
| 206261 | case FTS3_MATCHINFO_LCS: |
| 206262 | nVal = pInfo->nCol; |
| 206263 | break; |
| 206264 | |
| 206265 | case FTS3_MATCHINFO_LHITS: |
| 206266 | nVal = pInfo->nCol * pInfo->nPhrase; |
| 206267 | break; |
| 206268 | |
| 206269 | case FTS3_MATCHINFO_LHITS_BM: |
| 206270 | nVal = pInfo->nPhrase * ((pInfo->nCol + 31) / 32); |
| 206271 | break; |
| 206272 | |
| 206273 | default: |
| 206274 | assert( cArg==FTS3_MATCHINFO_HITS ); |
| 206275 | nVal = pInfo->nCol * pInfo->nPhrase * 3; |
| 206276 | break; |
| 206277 | } |
| 206278 | |
| 206279 | return nVal; |
| 206280 | } |
| @@ -229245,10 +229257,12 @@ | |
| 229245 | int rc = SQLITE_OK; |
| 229246 | |
| 229247 | if( pTab->nCol==0 ){ |
| 229248 | u8 *abPK; |
| 229249 | assert( pTab->azCol==0 || pTab->abPK==0 ); |
| 229250 | rc = sessionTableInfo(pSession, db, zDb, |
| 229251 | pTab->zName, &pTab->nCol, &pTab->nTotalCol, 0, &pTab->azCol, |
| 229252 | &pTab->azDflt, &pTab->aiIdx, &abPK, |
| 229253 | ((pSession==0 || pSession->bImplicitPK) ? &pTab->bRowid : 0) |
| 229254 | ); |
| @@ -230265,21 +230279,47 @@ | |
| 230265 | |
| 230266 | /* Check the table schemas match */ |
| 230267 | if( rc==SQLITE_OK ){ |
| 230268 | int bHasPk = 0; |
| 230269 | int bMismatch = 0; |
| 230270 | int nCol; /* Columns in zFrom.zTbl */ |
| 230271 | int bRowid = 0; |
| 230272 | u8 *abPK; |
| 230273 | const char **azCol = 0; |
| 230274 | rc = sessionTableInfo(0, db, zFrom, zTbl, |
| 230275 | &nCol, 0, 0, &azCol, 0, 0, &abPK, |
| 230276 | pSession->bImplicitPK ? &bRowid : 0 |
| 230277 | ); |
| 230278 | if( rc==SQLITE_OK ){ |
| 230279 | if( pTo->nCol!=nCol ){ |
| 230280 | bMismatch = 1; |
| 230281 | }else{ |
| 230282 | int i; |
| 230283 | for(i=0; i<nCol; i++){ |
| 230284 | if( pTo->abPK[i]!=abPK[i] ) bMismatch = 1; |
| 230285 | if( sqlite3_stricmp(azCol[i], pTo->azCol[i]) ) bMismatch = 1; |
| @@ -257173,11 +257213,11 @@ | |
| 257173 | int nArg, /* Number of args */ |
| 257174 | sqlite3_value **apUnused /* Function arguments */ |
| 257175 | ){ |
| 257176 | assert( nArg==0 ); |
| 257177 | UNUSED_PARAM2(nArg, apUnused); |
| 257178 | sqlite3_result_text(pCtx, "fts5: 2025-04-10 10:18:07 20acd630b91609725794ce84f9eda01d5f3c898407f0948264830851d25ccaa6", -1, SQLITE_TRANSIENT); |
| 257179 | } |
| 257180 | |
| 257181 | /* |
| 257182 | ** Implementation of fts5_locale(LOCALE, TEXT) function. |
| 257183 | ** |
| 257184 |
| --- extsrc/sqlite3.c | |
| +++ extsrc/sqlite3.c | |
| @@ -16,11 +16,11 @@ | |
| 16 | ** if you want a wrapper to interface SQLite with your choice of programming |
| 17 | ** language. The code for the "sqlite3" command-line shell is also in a |
| 18 | ** separate file. This file contains only code for the core SQLite library. |
| 19 | ** |
| 20 | ** The content in this amalgamation comes from Fossil check-in |
| 21 | ** d22475b81c4e26ccc50f3b5626d43b32f7a2 with changes in files: |
| 22 | ** |
| 23 | ** |
| 24 | */ |
| 25 | #ifndef SQLITE_AMALGAMATION |
| 26 | #define SQLITE_CORE 1 |
| @@ -465,11 +465,11 @@ | |
| 465 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 466 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 467 | */ |
| 468 | #define SQLITE_VERSION "3.50.0" |
| 469 | #define SQLITE_VERSION_NUMBER 3050000 |
| 470 | #define SQLITE_SOURCE_ID "2025-04-15 21:59:38 d22475b81c4e26ccc50f3b5626d43b32f7a2de34e5a764539554665bdda735d5" |
| 471 | |
| 472 | /* |
| 473 | ** CAPI3REF: Run-Time Library Version Numbers |
| 474 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 475 | ** |
| @@ -11946,12 +11946,13 @@ | |
| 11946 | ** To clarify, if this function is called and then a changeset constructed |
| 11947 | ** using [sqlite3session_changeset()], then after applying that changeset to |
| 11948 | ** database zFrom the contents of the two compatible tables would be |
| 11949 | ** identical. |
| 11950 | ** |
| 11951 | ** Unless the call to this function is a no-op as described above, it is an |
| 11952 | ** error if database zFrom does not exist or does not contain the required |
| 11953 | ** compatible table. |
| 11954 | ** |
| 11955 | ** If the operation is successful, SQLITE_OK is returned. Otherwise, an SQLite |
| 11956 | ** error code. In this case, if argument pzErrMsg is not NULL, *pzErrMsg |
| 11957 | ** may be set to point to a buffer containing an English language error |
| 11958 | ** message. It is the responsibility of the caller to free this buffer using |
| @@ -19162,10 +19163,11 @@ | |
| 19163 | unsigned noSkipScan:1; /* Do not try to use skip-scan if true */ |
| 19164 | unsigned hasStat1:1; /* aiRowLogEst values come from sqlite_stat1 */ |
| 19165 | unsigned bLowQual:1; /* sqlite_stat1 says this is a low-quality index */ |
| 19166 | unsigned bNoQuery:1; /* Do not use this index to optimize queries */ |
| 19167 | unsigned bAscKeyBug:1; /* True if the bba7b69f9849b5bf bug applies */ |
| 19168 | unsigned bIdxRowid:1; /* One or more of the index keys is the ROWID */ |
| 19169 | unsigned bHasVCol:1; /* Index references one or more VIRTUAL columns */ |
| 19170 | unsigned bHasExpr:1; /* Index contains an expression, either a literal |
| 19171 | ** expression, or a reference to a VIRTUAL column */ |
| 19172 | #ifdef SQLITE_ENABLE_STAT4 |
| 19173 | int nSample; /* Number of elements in aSample[] */ |
| @@ -127237,10 +127239,11 @@ | |
| 127239 | }else{ |
| 127240 | j = pCExpr->iColumn; |
| 127241 | assert( j<=0x7fff ); |
| 127242 | if( j<0 ){ |
| 127243 | j = pTab->iPKey; |
| 127244 | pIndex->bIdxRowid = 1; |
| 127245 | }else{ |
| 127246 | if( pTab->aCol[j].notNull==0 ){ |
| 127247 | pIndex->uniqNotNull = 0; |
| 127248 | } |
| 127249 | if( pTab->aCol[j].colFlags & COLFLAG_VIRTUAL ){ |
| @@ -149706,11 +149709,12 @@ | |
| 149709 | && pE2->iColumn==pColumn->iColumn |
| 149710 | ){ |
| 149711 | return; /* Already present. Return without doing anything. */ |
| 149712 | } |
| 149713 | } |
| 149714 | assert( SQLITE_AFF_NONE<SQLITE_AFF_BLOB ); |
| 149715 | if( sqlite3ExprAffinity(pColumn)<=SQLITE_AFF_BLOB ){ |
| 149716 | pConst->bHasAffBlob = 1; |
| 149717 | } |
| 149718 | |
| 149719 | pConst->nConst++; |
| 149720 | pConst->apExpr = sqlite3DbReallocOrFree(pConst->pParse->db, pConst->apExpr, |
| @@ -149781,11 +149785,12 @@ | |
| 149785 | for(i=0; i<pConst->nConst; i++){ |
| 149786 | Expr *pColumn = pConst->apExpr[i*2]; |
| 149787 | if( pColumn==pExpr ) continue; |
| 149788 | if( pColumn->iTable!=pExpr->iTable ) continue; |
| 149789 | if( pColumn->iColumn!=pExpr->iColumn ) continue; |
| 149790 | assert( SQLITE_AFF_NONE<SQLITE_AFF_BLOB ); |
| 149791 | if( bIgnoreAffBlob && sqlite3ExprAffinity(pColumn)<=SQLITE_AFF_BLOB ){ |
| 149792 | break; |
| 149793 | } |
| 149794 | /* A match is found. Add the EP_FixedCol property */ |
| 149795 | pConst->nChng++; |
| 149796 | ExprClearProperty(pExpr, EP_Leaf); |
| @@ -152965,10 +152970,16 @@ | |
| 152970 | pWInfo = sqlite3WhereBegin(pParse, pTabList, pWhere, sSort.pOrderBy, |
| 152971 | p->pEList, p, wctrlFlags, p->nSelectRow); |
| 152972 | if( pWInfo==0 ) goto select_end; |
| 152973 | if( sqlite3WhereOutputRowCount(pWInfo) < p->nSelectRow ){ |
| 152974 | p->nSelectRow = sqlite3WhereOutputRowCount(pWInfo); |
| 152975 | if( pDest->eDest<=SRT_DistQueue && pDest->eDest>=SRT_DistFifo ){ |
| 152976 | /* TUNING: For a UNION CTE, because UNION is implies DISTINCT, |
| 152977 | ** reduce the estimated output row count by 8 (LogEst 30). |
| 152978 | ** Search for tag-20250414a to see other cases */ |
| 152979 | p->nSelectRow -= 30; |
| 152980 | } |
| 152981 | } |
| 152982 | if( sDistinct.isTnct && sqlite3WhereIsDistinct(pWInfo) ){ |
| 152983 | sDistinct.eTnctType = sqlite3WhereIsDistinct(pWInfo); |
| 152984 | } |
| 152985 | if( sSort.pOrderBy ){ |
| @@ -160131,11 +160142,11 @@ | |
| 160142 | |
| 160143 | |
| 160144 | /* |
| 160145 | ** pX is an expression of the form: (vector) IN (SELECT ...) |
| 160146 | ** In other words, it is a vector IN operator with a SELECT clause on the |
| 160147 | ** RHS. But not all terms in the vector are indexable and the terms might |
| 160148 | ** not be in the correct order for indexing. |
| 160149 | ** |
| 160150 | ** This routine makes a copy of the input pX expression and then adjusts |
| 160151 | ** the vector on the LHS with corresponding changes to the SELECT so that |
| 160152 | ** the vector contains only index terms and those terms are in the correct |
| @@ -167926,11 +167937,11 @@ | |
| 167937 | } |
| 167938 | |
| 167939 | if( (pNew->wsFlags & WHERE_TOP_LIMIT)==0 |
| 167940 | && pNew->u.btree.nEq<pProbe->nColumn |
| 167941 | && (pNew->u.btree.nEq<pProbe->nKeyCol || |
| 167942 | (pProbe->idxType!=SQLITE_IDXTYPE_PRIMARYKEY && !pProbe->bIdxRowid)) |
| 167943 | ){ |
| 167944 | if( pNew->u.btree.nEq>3 ){ |
| 167945 | sqlite3ProgressCheck(pParse); |
| 167946 | } |
| 167947 | whereLoopAddBtreeIndex(pBuilder, pSrc, pProbe, nInMul+nIn); |
| @@ -171384,11 +171395,12 @@ | |
| 171395 | wherePathSolver(pWInfo, pWInfo->nRowOut<0 ? 1 : pWInfo->nRowOut+1); |
| 171396 | if( db->mallocFailed ) goto whereBeginError; |
| 171397 | } |
| 171398 | |
| 171399 | /* TUNING: Assume that a DISTINCT clause on a subquery reduces |
| 171400 | ** the output size by a factor of 8 (LogEst -30). Search for |
| 171401 | ** tag-20250414a to see other cases. |
| 171402 | */ |
| 171403 | if( (pWInfo->wctrlFlags & WHERE_WANT_DISTINCT)!=0 ){ |
| 171404 | WHERETRACE(0x0080,("nRowOut reduced from %d to %d due to DISTINCT\n", |
| 171405 | pWInfo->nRowOut, pWInfo->nRowOut-30)); |
| 171406 | pWInfo->nRowOut -= 30; |
| @@ -206261,20 +206273,20 @@ | |
| 206273 | case FTS3_MATCHINFO_LCS: |
| 206274 | nVal = pInfo->nCol; |
| 206275 | break; |
| 206276 | |
| 206277 | case FTS3_MATCHINFO_LHITS: |
| 206278 | nVal = (size_t)pInfo->nCol * pInfo->nPhrase; |
| 206279 | break; |
| 206280 | |
| 206281 | case FTS3_MATCHINFO_LHITS_BM: |
| 206282 | nVal = (size_t)pInfo->nPhrase * ((pInfo->nCol + 31) / 32); |
| 206283 | break; |
| 206284 | |
| 206285 | default: |
| 206286 | assert( cArg==FTS3_MATCHINFO_HITS ); |
| 206287 | nVal = (size_t)pInfo->nCol * pInfo->nPhrase * 3; |
| 206288 | break; |
| 206289 | } |
| 206290 | |
| 206291 | return nVal; |
| 206292 | } |
| @@ -229245,10 +229257,12 @@ | |
| 229257 | int rc = SQLITE_OK; |
| 229258 | |
| 229259 | if( pTab->nCol==0 ){ |
| 229260 | u8 *abPK; |
| 229261 | assert( pTab->azCol==0 || pTab->abPK==0 ); |
| 229262 | sqlite3_free(pTab->azCol); |
| 229263 | pTab->abPK = 0; |
| 229264 | rc = sessionTableInfo(pSession, db, zDb, |
| 229265 | pTab->zName, &pTab->nCol, &pTab->nTotalCol, 0, &pTab->azCol, |
| 229266 | &pTab->azDflt, &pTab->aiIdx, &abPK, |
| 229267 | ((pSession==0 || pSession->bImplicitPK) ? &pTab->bRowid : 0) |
| 229268 | ); |
| @@ -230265,21 +230279,47 @@ | |
| 230279 | |
| 230280 | /* Check the table schemas match */ |
| 230281 | if( rc==SQLITE_OK ){ |
| 230282 | int bHasPk = 0; |
| 230283 | int bMismatch = 0; |
| 230284 | int nCol = 0; /* Columns in zFrom.zTbl */ |
| 230285 | int bRowid = 0; |
| 230286 | u8 *abPK = 0; |
| 230287 | const char **azCol = 0; |
| 230288 | char *zDbExists = 0; |
| 230289 | |
| 230290 | /* Check that database zFrom is attached. */ |
| 230291 | zDbExists = sqlite3_mprintf("SELECT * FROM %Q.sqlite_schema", zFrom); |
| 230292 | if( zDbExists==0 ){ |
| 230293 | rc = SQLITE_NOMEM; |
| 230294 | }else{ |
| 230295 | sqlite3_stmt *pDbExists = 0; |
| 230296 | rc = sqlite3_prepare_v2(db, zDbExists, -1, &pDbExists, 0); |
| 230297 | if( rc==SQLITE_ERROR ){ |
| 230298 | rc = SQLITE_OK; |
| 230299 | nCol = -1; |
| 230300 | } |
| 230301 | sqlite3_finalize(pDbExists); |
| 230302 | sqlite3_free(zDbExists); |
| 230303 | } |
| 230304 | |
| 230305 | if( rc==SQLITE_OK && nCol==0 ){ |
| 230306 | rc = sessionTableInfo(0, db, zFrom, zTbl, |
| 230307 | &nCol, 0, 0, &azCol, 0, 0, &abPK, |
| 230308 | pSession->bImplicitPK ? &bRowid : 0 |
| 230309 | ); |
| 230310 | } |
| 230311 | if( rc==SQLITE_OK ){ |
| 230312 | if( pTo->nCol!=nCol ){ |
| 230313 | if( nCol<=0 ){ |
| 230314 | rc = SQLITE_SCHEMA; |
| 230315 | if( pzErrMsg ){ |
| 230316 | *pzErrMsg = sqlite3_mprintf("no such table: %s.%s", zFrom, zTbl); |
| 230317 | } |
| 230318 | }else{ |
| 230319 | bMismatch = 1; |
| 230320 | } |
| 230321 | }else{ |
| 230322 | int i; |
| 230323 | for(i=0; i<nCol; i++){ |
| 230324 | if( pTo->abPK[i]!=abPK[i] ) bMismatch = 1; |
| 230325 | if( sqlite3_stricmp(azCol[i], pTo->azCol[i]) ) bMismatch = 1; |
| @@ -257173,11 +257213,11 @@ | |
| 257213 | int nArg, /* Number of args */ |
| 257214 | sqlite3_value **apUnused /* Function arguments */ |
| 257215 | ){ |
| 257216 | assert( nArg==0 ); |
| 257217 | UNUSED_PARAM2(nArg, apUnused); |
| 257218 | sqlite3_result_text(pCtx, "fts5: 2025-04-15 21:59:38 d22475b81c4e26ccc50f3b5626d43b32f7a2de34e5a764539554665bdda735d5", -1, SQLITE_TRANSIENT); |
| 257219 | } |
| 257220 | |
| 257221 | /* |
| 257222 | ** Implementation of fts5_locale(LOCALE, TEXT) function. |
| 257223 | ** |
| 257224 |
+4
-3
| --- extsrc/sqlite3.h | ||
| +++ extsrc/sqlite3.h | ||
| @@ -146,11 +146,11 @@ | ||
| 146 | 146 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 147 | 147 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 148 | 148 | */ |
| 149 | 149 | #define SQLITE_VERSION "3.50.0" |
| 150 | 150 | #define SQLITE_VERSION_NUMBER 3050000 |
| 151 | -#define SQLITE_SOURCE_ID "2025-04-10 10:18:07 20acd630b91609725794ce84f9eda01d5f3c898407f0948264830851d25ccaa6" | |
| 151 | +#define SQLITE_SOURCE_ID "2025-04-15 21:59:38 d22475b81c4e26ccc50f3b5626d43b32f7a2de34e5a764539554665bdda735d5" | |
| 152 | 152 | |
| 153 | 153 | /* |
| 154 | 154 | ** CAPI3REF: Run-Time Library Version Numbers |
| 155 | 155 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 156 | 156 | ** |
| @@ -11627,12 +11627,13 @@ | ||
| 11627 | 11627 | ** To clarify, if this function is called and then a changeset constructed |
| 11628 | 11628 | ** using [sqlite3session_changeset()], then after applying that changeset to |
| 11629 | 11629 | ** database zFrom the contents of the two compatible tables would be |
| 11630 | 11630 | ** identical. |
| 11631 | 11631 | ** |
| 11632 | -** It an error if database zFrom does not exist or does not contain the | |
| 11633 | -** required compatible table. | |
| 11632 | +** Unless the call to this function is a no-op as described above, it is an | |
| 11633 | +** error if database zFrom does not exist or does not contain the required | |
| 11634 | +** compatible table. | |
| 11634 | 11635 | ** |
| 11635 | 11636 | ** If the operation is successful, SQLITE_OK is returned. Otherwise, an SQLite |
| 11636 | 11637 | ** error code. In this case, if argument pzErrMsg is not NULL, *pzErrMsg |
| 11637 | 11638 | ** may be set to point to a buffer containing an English language error |
| 11638 | 11639 | ** message. It is the responsibility of the caller to free this buffer using |
| 11639 | 11640 |
| --- extsrc/sqlite3.h | |
| +++ extsrc/sqlite3.h | |
| @@ -146,11 +146,11 @@ | |
| 146 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 147 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 148 | */ |
| 149 | #define SQLITE_VERSION "3.50.0" |
| 150 | #define SQLITE_VERSION_NUMBER 3050000 |
| 151 | #define SQLITE_SOURCE_ID "2025-04-10 10:18:07 20acd630b91609725794ce84f9eda01d5f3c898407f0948264830851d25ccaa6" |
| 152 | |
| 153 | /* |
| 154 | ** CAPI3REF: Run-Time Library Version Numbers |
| 155 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 156 | ** |
| @@ -11627,12 +11627,13 @@ | |
| 11627 | ** To clarify, if this function is called and then a changeset constructed |
| 11628 | ** using [sqlite3session_changeset()], then after applying that changeset to |
| 11629 | ** database zFrom the contents of the two compatible tables would be |
| 11630 | ** identical. |
| 11631 | ** |
| 11632 | ** It an error if database zFrom does not exist or does not contain the |
| 11633 | ** required compatible table. |
| 11634 | ** |
| 11635 | ** If the operation is successful, SQLITE_OK is returned. Otherwise, an SQLite |
| 11636 | ** error code. In this case, if argument pzErrMsg is not NULL, *pzErrMsg |
| 11637 | ** may be set to point to a buffer containing an English language error |
| 11638 | ** message. It is the responsibility of the caller to free this buffer using |
| 11639 |
| --- extsrc/sqlite3.h | |
| +++ extsrc/sqlite3.h | |
| @@ -146,11 +146,11 @@ | |
| 146 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 147 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 148 | */ |
| 149 | #define SQLITE_VERSION "3.50.0" |
| 150 | #define SQLITE_VERSION_NUMBER 3050000 |
| 151 | #define SQLITE_SOURCE_ID "2025-04-15 21:59:38 d22475b81c4e26ccc50f3b5626d43b32f7a2de34e5a764539554665bdda735d5" |
| 152 | |
| 153 | /* |
| 154 | ** CAPI3REF: Run-Time Library Version Numbers |
| 155 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 156 | ** |
| @@ -11627,12 +11627,13 @@ | |
| 11627 | ** To clarify, if this function is called and then a changeset constructed |
| 11628 | ** using [sqlite3session_changeset()], then after applying that changeset to |
| 11629 | ** database zFrom the contents of the two compatible tables would be |
| 11630 | ** identical. |
| 11631 | ** |
| 11632 | ** Unless the call to this function is a no-op as described above, it is an |
| 11633 | ** error if database zFrom does not exist or does not contain the required |
| 11634 | ** compatible table. |
| 11635 | ** |
| 11636 | ** If the operation is successful, SQLITE_OK is returned. Otherwise, an SQLite |
| 11637 | ** error code. In this case, if argument pzErrMsg is not NULL, *pzErrMsg |
| 11638 | ** may be set to point to a buffer containing an English language error |
| 11639 | ** message. It is the responsibility of the caller to free this buffer using |
| 11640 |