Fossil SCM
Update the built-in SQLite to the latest 3.50.0 beta, for testing.
Commit
56795263f7b5a532e5267fafb7d7545e8d41d4216783beab35bd5ebf119b4979
Parent
3ecef40695e5fec…
2 files changed
+42
-128
+1
-1
+42
-128
| --- 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 | -** 336ceeccc6f85bd78f4a26648af7edf9056d with changes in files: | |
| 21 | +** de0dfac1e5ca9d2661674c20664095386f60 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-05-15 11:20:54 336ceeccc6f85bd78f4a26648af7edf9056d569a767b4120f125a02b2090a349" | |
| 470 | +#define SQLITE_SOURCE_ID "2025-05-26 07:15:20 de0dfac1e5ca9d2661674c20664095386f60c77378311507fcba08111df52b38" | |
| 471 | 471 | |
| 472 | 472 | /* |
| 473 | 473 | ** CAPI3REF: Run-Time Library Version Numbers |
| 474 | 474 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 475 | 475 | ** |
| @@ -35013,11 +35013,11 @@ | ||
| 35013 | 35013 | } |
| 35014 | 35014 | |
| 35015 | 35015 | /* |
| 35016 | 35016 | ** Write a single UTF8 character whose value is v into the |
| 35017 | 35017 | ** buffer starting at zOut. zOut must be sized to hold at |
| 35018 | -** least for bytes. Return the number of bytes needed | |
| 35018 | +** least four bytes. Return the number of bytes needed | |
| 35019 | 35019 | ** to encode the new character. |
| 35020 | 35020 | */ |
| 35021 | 35021 | SQLITE_PRIVATE int sqlite3AppendOneUtf8Character(char *zOut, u32 v){ |
| 35022 | 35022 | if( v<0x00080 ){ |
| 35023 | 35023 | zOut[0] = (u8)(v & 0xff); |
| @@ -51333,17 +51333,17 @@ | ||
| 51333 | 51333 | int nChar; |
| 51334 | 51334 | LPWSTR zWideFilename; |
| 51335 | 51335 | |
| 51336 | 51336 | if( osCygwin_conv_path && !(winIsDriveLetterAndColon(zFilename) |
| 51337 | 51337 | && winIsDirSep(zFilename[2])) ){ |
| 51338 | - int nByte; | |
| 51338 | + i64 nByte; | |
| 51339 | 51339 | int convertflag = CCP_POSIX_TO_WIN_W; |
| 51340 | 51340 | if( !strchr(zFilename, '/') ) convertflag |= CCP_RELATIVE; |
| 51341 | - nByte = (int)osCygwin_conv_path(convertflag, | |
| 51341 | + nByte = (i64)osCygwin_conv_path(convertflag, | |
| 51342 | 51342 | zFilename, 0, 0); |
| 51343 | 51343 | if( nByte>0 ){ |
| 51344 | - zConverted = sqlite3MallocZero(nByte+12); | |
| 51344 | + zConverted = sqlite3MallocZero(12+(u64)nByte); | |
| 51345 | 51345 | if ( zConverted==0 ){ |
| 51346 | 51346 | return zConverted; |
| 51347 | 51347 | } |
| 51348 | 51348 | zWideFilename = zConverted; |
| 51349 | 51349 | /* Filenames should be prefixed, except when converted |
| @@ -52222,31 +52222,10 @@ | ||
| 52222 | 52222 | ** |
| 52223 | 52223 | ** This division contains the implementation of methods on the |
| 52224 | 52224 | ** sqlite3_vfs object. |
| 52225 | 52225 | */ |
| 52226 | 52226 | |
| 52227 | -#if 0 /* No longer necessary */ | |
| 52228 | -/* | |
| 52229 | -** Convert a filename from whatever the underlying operating system | |
| 52230 | -** supports for filenames into UTF-8. Space to hold the result is | |
| 52231 | -** obtained from malloc and must be freed by the calling function. | |
| 52232 | -*/ | |
| 52233 | -static char *winConvertToUtf8Filename(const void *zFilename){ | |
| 52234 | - char *zConverted = 0; | |
| 52235 | - if( osIsNT() ){ | |
| 52236 | - zConverted = winUnicodeToUtf8(zFilename); | |
| 52237 | - } | |
| 52238 | -#ifdef SQLITE_WIN32_HAS_ANSI | |
| 52239 | - else{ | |
| 52240 | - zConverted = winMbcsToUtf8(zFilename, osAreFileApisANSI()); | |
| 52241 | - } | |
| 52242 | -#endif | |
| 52243 | - /* caller will handle out of memory */ | |
| 52244 | - return zConverted; | |
| 52245 | -} | |
| 52246 | -#endif | |
| 52247 | - | |
| 52248 | 52227 | /* |
| 52249 | 52228 | ** This function returns non-zero if the specified UTF-8 string buffer |
| 52250 | 52229 | ** ends with a directory separator character or one was successfully |
| 52251 | 52230 | ** added to it. |
| 52252 | 52231 | */ |
| @@ -52382,46 +52361,10 @@ | ||
| 52382 | 52361 | sqlite3_snprintf(nMax, zBuf, "%s", zDir); |
| 52383 | 52362 | sqlite3_free(zConverted); |
| 52384 | 52363 | break; |
| 52385 | 52364 | } |
| 52386 | 52365 | sqlite3_free(zConverted); |
| 52387 | -#if 0 /* No longer necessary */ | |
| 52388 | - }else{ | |
| 52389 | - zConverted = sqlite3MallocZero( nMax+1 ); | |
| 52390 | - if( !zConverted ){ | |
| 52391 | - sqlite3_free(zBuf); | |
| 52392 | - OSTRACE(("TEMP-FILENAME rc=SQLITE_IOERR_NOMEM\n")); | |
| 52393 | - return SQLITE_IOERR_NOMEM_BKPT; | |
| 52394 | - } | |
| 52395 | - if( osCygwin_conv_path( | |
| 52396 | - CCP_POSIX_TO_WIN_W, zDir, | |
| 52397 | - zConverted, nMax+1)<0 ){ | |
| 52398 | - sqlite3_free(zConverted); | |
| 52399 | - sqlite3_free(zBuf); | |
| 52400 | - OSTRACE(("TEMP-FILENAME rc=SQLITE_IOERR_CONVPATH\n")); | |
| 52401 | - return winLogError(SQLITE_IOERR_CONVPATH, (DWORD)errno, | |
| 52402 | - "winGetTempname2", zDir); | |
| 52403 | - } | |
| 52404 | - if( winIsDir(zConverted) ){ | |
| 52405 | - /* At this point, we know the candidate directory exists and should | |
| 52406 | - ** be used. However, we may need to convert the string containing | |
| 52407 | - ** its name into UTF-8 (i.e. if it is UTF-16 right now). | |
| 52408 | - */ | |
| 52409 | - char *zUtf8 = winConvertToUtf8Filename(zConverted); | |
| 52410 | - if( !zUtf8 ){ | |
| 52411 | - sqlite3_free(zConverted); | |
| 52412 | - sqlite3_free(zBuf); | |
| 52413 | - OSTRACE(("TEMP-FILENAME rc=SQLITE_IOERR_NOMEM\n")); | |
| 52414 | - return SQLITE_IOERR_NOMEM_BKPT; | |
| 52415 | - } | |
| 52416 | - sqlite3_snprintf(nMax, zBuf, "%s", zUtf8); | |
| 52417 | - sqlite3_free(zUtf8); | |
| 52418 | - sqlite3_free(zConverted); | |
| 52419 | - break; | |
| 52420 | - } | |
| 52421 | - sqlite3_free(zConverted); | |
| 52422 | -#endif /* No longer necessary */ | |
| 52423 | 52366 | } |
| 52424 | 52367 | } |
| 52425 | 52368 | } |
| 52426 | 52369 | #endif |
| 52427 | 52370 | |
| @@ -53316,38 +53259,10 @@ | ||
| 53316 | 53259 | winSimplifyName(zFull); |
| 53317 | 53260 | return rc; |
| 53318 | 53261 | } |
| 53319 | 53262 | } |
| 53320 | 53263 | #endif /* __CYGWIN__ */ |
| 53321 | -#if 0 /* This doesn't work correctly at all! See: | |
| 53322 | - <https://marc.info/?l=sqlite-users&m=139299149416314&w=2> | |
| 53323 | -*/ | |
| 53324 | - SimulateIOError( return SQLITE_ERROR ); | |
| 53325 | - UNUSED_PARAMETER(nFull); | |
| 53326 | - assert( nFull>=pVfs->mxPathname ); | |
| 53327 | - char *zOut = sqlite3MallocZero( pVfs->mxPathname+1 ); | |
| 53328 | - if( !zOut ){ | |
| 53329 | - return SQLITE_IOERR_NOMEM_BKPT; | |
| 53330 | - } | |
| 53331 | - if( osCygwin_conv_path( | |
| 53332 | - CCP_POSIX_TO_WIN_W, | |
| 53333 | - zRelative, zOut, pVfs->mxPathname+1)<0 ){ | |
| 53334 | - sqlite3_free(zOut); | |
| 53335 | - return winLogError(SQLITE_CANTOPEN_CONVPATH, (DWORD)errno, | |
| 53336 | - "winFullPathname2", zRelative); | |
| 53337 | - }else{ | |
| 53338 | - char *zUtf8 = winConvertToUtf8Filename(zOut); | |
| 53339 | - if( !zUtf8 ){ | |
| 53340 | - sqlite3_free(zOut); | |
| 53341 | - return SQLITE_IOERR_NOMEM_BKPT; | |
| 53342 | - } | |
| 53343 | - sqlite3_snprintf(MIN(nFull, pVfs->mxPathname), zFull, "%s", zUtf8); | |
| 53344 | - sqlite3_free(zUtf8); | |
| 53345 | - sqlite3_free(zOut); | |
| 53346 | - } | |
| 53347 | - return SQLITE_OK; | |
| 53348 | -#endif | |
| 53349 | 53264 | |
| 53350 | 53265 | #if (SQLITE_OS_WINCE || SQLITE_OS_WINRT) && defined(_WIN32) |
| 53351 | 53266 | SimulateIOError( return SQLITE_ERROR ); |
| 53352 | 53267 | /* WinCE has no concept of a relative pathname, or so I am told. */ |
| 53353 | 53268 | /* WinRT has no way to convert a relative path to an absolute one. */ |
| @@ -53489,31 +53404,12 @@ | ||
| 53489 | 53404 | ** Interfaces for opening a shared library, finding entry points |
| 53490 | 53405 | ** within the shared library, and closing the shared library. |
| 53491 | 53406 | */ |
| 53492 | 53407 | static void *winDlOpen(sqlite3_vfs *pVfs, const char *zFilename){ |
| 53493 | 53408 | HANDLE h; |
| 53494 | -#if 0 /* This doesn't work correctly at all! See: | |
| 53495 | - <https://marc.info/?l=sqlite-users&m=139299149416314&w=2> | |
| 53496 | -*/ | |
| 53497 | - int nFull = pVfs->mxPathname+1; | |
| 53498 | - char *zFull = sqlite3MallocZero( nFull ); | |
| 53499 | - void *zConverted = 0; | |
| 53500 | - if( zFull==0 ){ | |
| 53501 | - OSTRACE(("DLOPEN name=%s, handle=%p\n", zFilename, (void*)0)); | |
| 53502 | - return 0; | |
| 53503 | - } | |
| 53504 | - if( winFullPathname(pVfs, zFilename, nFull, zFull)!=SQLITE_OK ){ | |
| 53505 | - sqlite3_free(zFull); | |
| 53506 | - OSTRACE(("DLOPEN name=%s, handle=%p\n", zFilename, (void*)0)); | |
| 53507 | - return 0; | |
| 53508 | - } | |
| 53509 | - zConverted = winConvertFromUtf8Filename(zFull); | |
| 53510 | - sqlite3_free(zFull); | |
| 53511 | -#else | |
| 53512 | 53409 | void *zConverted = winConvertFromUtf8Filename(zFilename); |
| 53513 | 53410 | UNUSED_PARAMETER(pVfs); |
| 53514 | -#endif | |
| 53515 | 53411 | if( zConverted==0 ){ |
| 53516 | 53412 | OSTRACE(("DLOPEN name=%s, handle=%p\n", zFilename, (void*)0)); |
| 53517 | 53413 | return 0; |
| 53518 | 53414 | } |
| 53519 | 53415 | if( osIsNT() ){ |
| @@ -119021,14 +118917,14 @@ | ||
| 119021 | 118917 | }else{ |
| 119022 | 118918 | nQuot = sqlite3Strlen30(zQuot)-1; |
| 119023 | 118919 | } |
| 119024 | 118920 | |
| 119025 | 118921 | assert( nQuot>=nNew && nSql>=0 && nNew>=0 ); |
| 119026 | - zOut = sqlite3DbMallocZero(db, (u64)(nSql + pRename->nList*nQuot + 1)); | |
| 118922 | + zOut = sqlite3DbMallocZero(db, (u64)nSql + pRename->nList*(u64)nQuot + 1); | |
| 119027 | 118923 | }else{ |
| 119028 | 118924 | assert( nSql>0 ); |
| 119029 | - zOut = (char*)sqlite3DbMallocZero(db, (u64)(nSql*2+1) * 3); | |
| 118925 | + zOut = (char*)sqlite3DbMallocZero(db, (2*(u64)nSql + 1) * 3); | |
| 119030 | 118926 | if( zOut ){ |
| 119031 | 118927 | zBuf1 = &zOut[nSql*2+1]; |
| 119032 | 118928 | zBuf2 = &zOut[nSql*4+2]; |
| 119033 | 118929 | } |
| 119034 | 118930 | } |
| @@ -138768,10 +138664,12 @@ | ||
| 138768 | 138664 | /* Version 3.43.0 and later */ |
| 138769 | 138665 | int (*stmt_explain)(sqlite3_stmt*,int); |
| 138770 | 138666 | /* Version 3.44.0 and later */ |
| 138771 | 138667 | void *(*get_clientdata)(sqlite3*,const char*); |
| 138772 | 138668 | int (*set_clientdata)(sqlite3*, const char*, void*, void(*)(void*)); |
| 138669 | + /* Version 3.50.0 and later */ | |
| 138670 | + int (*setlk_timeout)(sqlite3*,int,int); | |
| 138773 | 138671 | }; |
| 138774 | 138672 | |
| 138775 | 138673 | /* |
| 138776 | 138674 | ** This is the function signature used for all extension entry points. It |
| 138777 | 138675 | ** is also defined in the file "loadext.c". |
| @@ -139101,10 +138999,12 @@ | ||
| 139101 | 138999 | /* Version 3.43.0 and later */ |
| 139102 | 139000 | #define sqlite3_stmt_explain sqlite3_api->stmt_explain |
| 139103 | 139001 | /* Version 3.44.0 and later */ |
| 139104 | 139002 | #define sqlite3_get_clientdata sqlite3_api->get_clientdata |
| 139105 | 139003 | #define sqlite3_set_clientdata sqlite3_api->set_clientdata |
| 139004 | +/* Version 3.50.0 and later */ | |
| 139005 | +#define sqlite3_setlk_timeout sqlite3_api->setlk_timeout | |
| 139106 | 139006 | #endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */ |
| 139107 | 139007 | |
| 139108 | 139008 | #if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) |
| 139109 | 139009 | /* This case when the file really is being compiled as a loadable |
| 139110 | 139010 | ** extension */ |
| @@ -139622,11 +139522,13 @@ | ||
| 139622 | 139522 | sqlite3_is_interrupted, |
| 139623 | 139523 | /* Version 3.43.0 and later */ |
| 139624 | 139524 | sqlite3_stmt_explain, |
| 139625 | 139525 | /* Version 3.44.0 and later */ |
| 139626 | 139526 | sqlite3_get_clientdata, |
| 139627 | - sqlite3_set_clientdata | |
| 139527 | + sqlite3_set_clientdata, | |
| 139528 | + /* Version 3.50.0 and later */ | |
| 139529 | + sqlite3_setlk_timeout | |
| 139628 | 139530 | }; |
| 139629 | 139531 | |
| 139630 | 139532 | /* True if x is the directory separator character |
| 139631 | 139533 | */ |
| 139632 | 139534 | #if SQLITE_OS_WIN |
| @@ -153362,10 +153264,14 @@ | ||
| 153362 | 153264 | } |
| 153363 | 153265 | |
| 153364 | 153266 | if( iOrderByCol ){ |
| 153365 | 153267 | Expr *pX = p->pEList->a[iOrderByCol-1].pExpr; |
| 153366 | 153268 | Expr *pBase = sqlite3ExprSkipCollateAndLikely(pX); |
| 153269 | + while( ALWAYS(pBase!=0) && pBase->op==TK_IF_NULL_ROW ){ | |
| 153270 | + pX = pBase->pLeft; | |
| 153271 | + pBase = sqlite3ExprSkipCollateAndLikely(pX); | |
| 153272 | + } | |
| 153367 | 153273 | if( ALWAYS(pBase!=0) |
| 153368 | 153274 | && pBase->op!=TK_AGG_COLUMN |
| 153369 | 153275 | && pBase->op!=TK_REGISTER |
| 153370 | 153276 | ){ |
| 153371 | 153277 | sqlite3ExprToRegister(pX, iAMem+j); |
| @@ -212677,22 +212583,24 @@ | ||
| 212677 | 212583 | const char *z; |
| 212678 | 212584 | u32 n; |
| 212679 | 212585 | UNUSED_PARAMETER(argc); |
| 212680 | 212586 | pStr = (JsonString*)sqlite3_aggregate_context(ctx, sizeof(*pStr)); |
| 212681 | 212587 | if( pStr ){ |
| 212588 | + z = (const char*)sqlite3_value_text(argv[0]); | |
| 212589 | + n = sqlite3Strlen30(z); | |
| 212682 | 212590 | if( pStr->zBuf==0 ){ |
| 212683 | 212591 | jsonStringInit(pStr, ctx); |
| 212684 | 212592 | jsonAppendChar(pStr, '{'); |
| 212685 | - }else if( pStr->nUsed>1 ){ | |
| 212593 | + }else if( pStr->nUsed>1 && z!=0 ){ | |
| 212686 | 212594 | jsonAppendChar(pStr, ','); |
| 212687 | 212595 | } |
| 212688 | 212596 | pStr->pCtx = ctx; |
| 212689 | - z = (const char*)sqlite3_value_text(argv[0]); | |
| 212690 | - n = sqlite3Strlen30(z); | |
| 212691 | - jsonAppendString(pStr, z, n); | |
| 212692 | - jsonAppendChar(pStr, ':'); | |
| 212693 | - jsonAppendSqlValue(pStr, argv[1]); | |
| 212597 | + if( z!=0 ){ | |
| 212598 | + jsonAppendString(pStr, z, n); | |
| 212599 | + jsonAppendChar(pStr, ':'); | |
| 212600 | + jsonAppendSqlValue(pStr, argv[1]); | |
| 212601 | + } | |
| 212694 | 212602 | } |
| 212695 | 212603 | } |
| 212696 | 212604 | static void jsonObjectCompute(sqlite3_context *ctx, int isFinal){ |
| 212697 | 212605 | JsonString *pStr; |
| 212698 | 212606 | pStr = (JsonString*)sqlite3_aggregate_context(ctx, 0); |
| @@ -231506,18 +231414,19 @@ | ||
| 231506 | 231414 | /* |
| 231507 | 231415 | ** If the SessionInput object passed as the only argument is a streaming |
| 231508 | 231416 | ** object and the buffer is full, discard some data to free up space. |
| 231509 | 231417 | */ |
| 231510 | 231418 | static void sessionDiscardData(SessionInput *pIn){ |
| 231511 | - if( pIn->xInput && pIn->iNext>=sessions_strm_chunk_size ){ | |
| 231512 | - int nMove = pIn->buf.nBuf - pIn->iNext; | |
| 231419 | + if( pIn->xInput && pIn->iCurrent>=sessions_strm_chunk_size ){ | |
| 231420 | + int nMove = pIn->buf.nBuf - pIn->iCurrent; | |
| 231513 | 231421 | assert( nMove>=0 ); |
| 231514 | 231422 | if( nMove>0 ){ |
| 231515 | - memmove(pIn->buf.aBuf, &pIn->buf.aBuf[pIn->iNext], nMove); | |
| 231423 | + memmove(pIn->buf.aBuf, &pIn->buf.aBuf[pIn->iCurrent], nMove); | |
| 231516 | 231424 | } |
| 231517 | - pIn->buf.nBuf -= pIn->iNext; | |
| 231518 | - pIn->iNext = 0; | |
| 231425 | + pIn->buf.nBuf -= pIn->iCurrent; | |
| 231426 | + pIn->iNext -= pIn->iCurrent; | |
| 231427 | + pIn->iCurrent = 0; | |
| 231519 | 231428 | pIn->nData = pIn->buf.nBuf; |
| 231520 | 231429 | } |
| 231521 | 231430 | } |
| 231522 | 231431 | |
| 231523 | 231432 | /* |
| @@ -231867,12 +231776,12 @@ | ||
| 231867 | 231776 | ** sufficient either for the 'T' or 'P' byte and the varint that follows |
| 231868 | 231777 | ** it, or for the two single byte values otherwise. */ |
| 231869 | 231778 | p->rc = sessionInputBuffer(&p->in, 2); |
| 231870 | 231779 | if( p->rc!=SQLITE_OK ) return p->rc; |
| 231871 | 231780 | |
| 231872 | - sessionDiscardData(&p->in); | |
| 231873 | 231781 | p->in.iCurrent = p->in.iNext; |
| 231782 | + sessionDiscardData(&p->in); | |
| 231874 | 231783 | |
| 231875 | 231784 | /* If the iterator is already at the end of the changeset, return DONE. */ |
| 231876 | 231785 | if( p->in.iNext>=p->in.nData ){ |
| 231877 | 231786 | return SQLITE_DONE; |
| 231878 | 231787 | } |
| @@ -234227,18 +234136,23 @@ | ||
| 234227 | 234136 | */ |
| 234228 | 234137 | SQLITE_API int sqlite3changegroup_add_change( |
| 234229 | 234138 | sqlite3_changegroup *pGrp, |
| 234230 | 234139 | sqlite3_changeset_iter *pIter |
| 234231 | 234140 | ){ |
| 234141 | + int rc = SQLITE_OK; | |
| 234142 | + | |
| 234232 | 234143 | if( pIter->in.iCurrent==pIter->in.iNext |
| 234233 | 234144 | || pIter->rc!=SQLITE_OK |
| 234234 | 234145 | || pIter->bInvert |
| 234235 | 234146 | ){ |
| 234236 | 234147 | /* Iterator does not point to any valid entry or is an INVERT iterator. */ |
| 234237 | - return SQLITE_ERROR; | |
| 234148 | + rc = SQLITE_ERROR; | |
| 234149 | + }else{ | |
| 234150 | + pIter->in.bNoDiscard = 1; | |
| 234151 | + rc = sessionOneChangeToHash(pGrp, pIter, 0); | |
| 234238 | 234152 | } |
| 234239 | - return sessionOneChangeToHash(pGrp, pIter, 0); | |
| 234153 | + return rc; | |
| 234240 | 234154 | } |
| 234241 | 234155 | |
| 234242 | 234156 | /* |
| 234243 | 234157 | ** Obtain a buffer containing a changeset representing the concatenation |
| 234244 | 234158 | ** of all changesets added to the group so far. |
| @@ -257275,11 +257189,11 @@ | ||
| 257275 | 257189 | int nArg, /* Number of args */ |
| 257276 | 257190 | sqlite3_value **apUnused /* Function arguments */ |
| 257277 | 257191 | ){ |
| 257278 | 257192 | assert( nArg==0 ); |
| 257279 | 257193 | UNUSED_PARAM2(nArg, apUnused); |
| 257280 | - sqlite3_result_text(pCtx, "fts5: 2025-05-15 11:20:54 336ceeccc6f85bd78f4a26648af7edf9056d569a767b4120f125a02b2090a349", -1, SQLITE_TRANSIENT); | |
| 257194 | + sqlite3_result_text(pCtx, "fts5: 2025-05-26 07:15:20 de0dfac1e5ca9d2661674c20664095386f60c77378311507fcba08111df52b38", -1, SQLITE_TRANSIENT); | |
| 257281 | 257195 | } |
| 257282 | 257196 | |
| 257283 | 257197 | /* |
| 257284 | 257198 | ** Implementation of fts5_locale(LOCALE, TEXT) function. |
| 257285 | 257199 | ** |
| 257286 | 257200 |
| --- 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 | ** 336ceeccc6f85bd78f4a26648af7edf9056d 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-05-15 11:20:54 336ceeccc6f85bd78f4a26648af7edf9056d569a767b4120f125a02b2090a349" |
| 471 | |
| 472 | /* |
| 473 | ** CAPI3REF: Run-Time Library Version Numbers |
| 474 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 475 | ** |
| @@ -35013,11 +35013,11 @@ | |
| 35013 | } |
| 35014 | |
| 35015 | /* |
| 35016 | ** Write a single UTF8 character whose value is v into the |
| 35017 | ** buffer starting at zOut. zOut must be sized to hold at |
| 35018 | ** least for bytes. Return the number of bytes needed |
| 35019 | ** to encode the new character. |
| 35020 | */ |
| 35021 | SQLITE_PRIVATE int sqlite3AppendOneUtf8Character(char *zOut, u32 v){ |
| 35022 | if( v<0x00080 ){ |
| 35023 | zOut[0] = (u8)(v & 0xff); |
| @@ -51333,17 +51333,17 @@ | |
| 51333 | int nChar; |
| 51334 | LPWSTR zWideFilename; |
| 51335 | |
| 51336 | if( osCygwin_conv_path && !(winIsDriveLetterAndColon(zFilename) |
| 51337 | && winIsDirSep(zFilename[2])) ){ |
| 51338 | int nByte; |
| 51339 | int convertflag = CCP_POSIX_TO_WIN_W; |
| 51340 | if( !strchr(zFilename, '/') ) convertflag |= CCP_RELATIVE; |
| 51341 | nByte = (int)osCygwin_conv_path(convertflag, |
| 51342 | zFilename, 0, 0); |
| 51343 | if( nByte>0 ){ |
| 51344 | zConverted = sqlite3MallocZero(nByte+12); |
| 51345 | if ( zConverted==0 ){ |
| 51346 | return zConverted; |
| 51347 | } |
| 51348 | zWideFilename = zConverted; |
| 51349 | /* Filenames should be prefixed, except when converted |
| @@ -52222,31 +52222,10 @@ | |
| 52222 | ** |
| 52223 | ** This division contains the implementation of methods on the |
| 52224 | ** sqlite3_vfs object. |
| 52225 | */ |
| 52226 | |
| 52227 | #if 0 /* No longer necessary */ |
| 52228 | /* |
| 52229 | ** Convert a filename from whatever the underlying operating system |
| 52230 | ** supports for filenames into UTF-8. Space to hold the result is |
| 52231 | ** obtained from malloc and must be freed by the calling function. |
| 52232 | */ |
| 52233 | static char *winConvertToUtf8Filename(const void *zFilename){ |
| 52234 | char *zConverted = 0; |
| 52235 | if( osIsNT() ){ |
| 52236 | zConverted = winUnicodeToUtf8(zFilename); |
| 52237 | } |
| 52238 | #ifdef SQLITE_WIN32_HAS_ANSI |
| 52239 | else{ |
| 52240 | zConverted = winMbcsToUtf8(zFilename, osAreFileApisANSI()); |
| 52241 | } |
| 52242 | #endif |
| 52243 | /* caller will handle out of memory */ |
| 52244 | return zConverted; |
| 52245 | } |
| 52246 | #endif |
| 52247 | |
| 52248 | /* |
| 52249 | ** This function returns non-zero if the specified UTF-8 string buffer |
| 52250 | ** ends with a directory separator character or one was successfully |
| 52251 | ** added to it. |
| 52252 | */ |
| @@ -52382,46 +52361,10 @@ | |
| 52382 | sqlite3_snprintf(nMax, zBuf, "%s", zDir); |
| 52383 | sqlite3_free(zConverted); |
| 52384 | break; |
| 52385 | } |
| 52386 | sqlite3_free(zConverted); |
| 52387 | #if 0 /* No longer necessary */ |
| 52388 | }else{ |
| 52389 | zConverted = sqlite3MallocZero( nMax+1 ); |
| 52390 | if( !zConverted ){ |
| 52391 | sqlite3_free(zBuf); |
| 52392 | OSTRACE(("TEMP-FILENAME rc=SQLITE_IOERR_NOMEM\n")); |
| 52393 | return SQLITE_IOERR_NOMEM_BKPT; |
| 52394 | } |
| 52395 | if( osCygwin_conv_path( |
| 52396 | CCP_POSIX_TO_WIN_W, zDir, |
| 52397 | zConverted, nMax+1)<0 ){ |
| 52398 | sqlite3_free(zConverted); |
| 52399 | sqlite3_free(zBuf); |
| 52400 | OSTRACE(("TEMP-FILENAME rc=SQLITE_IOERR_CONVPATH\n")); |
| 52401 | return winLogError(SQLITE_IOERR_CONVPATH, (DWORD)errno, |
| 52402 | "winGetTempname2", zDir); |
| 52403 | } |
| 52404 | if( winIsDir(zConverted) ){ |
| 52405 | /* At this point, we know the candidate directory exists and should |
| 52406 | ** be used. However, we may need to convert the string containing |
| 52407 | ** its name into UTF-8 (i.e. if it is UTF-16 right now). |
| 52408 | */ |
| 52409 | char *zUtf8 = winConvertToUtf8Filename(zConverted); |
| 52410 | if( !zUtf8 ){ |
| 52411 | sqlite3_free(zConverted); |
| 52412 | sqlite3_free(zBuf); |
| 52413 | OSTRACE(("TEMP-FILENAME rc=SQLITE_IOERR_NOMEM\n")); |
| 52414 | return SQLITE_IOERR_NOMEM_BKPT; |
| 52415 | } |
| 52416 | sqlite3_snprintf(nMax, zBuf, "%s", zUtf8); |
| 52417 | sqlite3_free(zUtf8); |
| 52418 | sqlite3_free(zConverted); |
| 52419 | break; |
| 52420 | } |
| 52421 | sqlite3_free(zConverted); |
| 52422 | #endif /* No longer necessary */ |
| 52423 | } |
| 52424 | } |
| 52425 | } |
| 52426 | #endif |
| 52427 | |
| @@ -53316,38 +53259,10 @@ | |
| 53316 | winSimplifyName(zFull); |
| 53317 | return rc; |
| 53318 | } |
| 53319 | } |
| 53320 | #endif /* __CYGWIN__ */ |
| 53321 | #if 0 /* This doesn't work correctly at all! See: |
| 53322 | <https://marc.info/?l=sqlite-users&m=139299149416314&w=2> |
| 53323 | */ |
| 53324 | SimulateIOError( return SQLITE_ERROR ); |
| 53325 | UNUSED_PARAMETER(nFull); |
| 53326 | assert( nFull>=pVfs->mxPathname ); |
| 53327 | char *zOut = sqlite3MallocZero( pVfs->mxPathname+1 ); |
| 53328 | if( !zOut ){ |
| 53329 | return SQLITE_IOERR_NOMEM_BKPT; |
| 53330 | } |
| 53331 | if( osCygwin_conv_path( |
| 53332 | CCP_POSIX_TO_WIN_W, |
| 53333 | zRelative, zOut, pVfs->mxPathname+1)<0 ){ |
| 53334 | sqlite3_free(zOut); |
| 53335 | return winLogError(SQLITE_CANTOPEN_CONVPATH, (DWORD)errno, |
| 53336 | "winFullPathname2", zRelative); |
| 53337 | }else{ |
| 53338 | char *zUtf8 = winConvertToUtf8Filename(zOut); |
| 53339 | if( !zUtf8 ){ |
| 53340 | sqlite3_free(zOut); |
| 53341 | return SQLITE_IOERR_NOMEM_BKPT; |
| 53342 | } |
| 53343 | sqlite3_snprintf(MIN(nFull, pVfs->mxPathname), zFull, "%s", zUtf8); |
| 53344 | sqlite3_free(zUtf8); |
| 53345 | sqlite3_free(zOut); |
| 53346 | } |
| 53347 | return SQLITE_OK; |
| 53348 | #endif |
| 53349 | |
| 53350 | #if (SQLITE_OS_WINCE || SQLITE_OS_WINRT) && defined(_WIN32) |
| 53351 | SimulateIOError( return SQLITE_ERROR ); |
| 53352 | /* WinCE has no concept of a relative pathname, or so I am told. */ |
| 53353 | /* WinRT has no way to convert a relative path to an absolute one. */ |
| @@ -53489,31 +53404,12 @@ | |
| 53489 | ** Interfaces for opening a shared library, finding entry points |
| 53490 | ** within the shared library, and closing the shared library. |
| 53491 | */ |
| 53492 | static void *winDlOpen(sqlite3_vfs *pVfs, const char *zFilename){ |
| 53493 | HANDLE h; |
| 53494 | #if 0 /* This doesn't work correctly at all! See: |
| 53495 | <https://marc.info/?l=sqlite-users&m=139299149416314&w=2> |
| 53496 | */ |
| 53497 | int nFull = pVfs->mxPathname+1; |
| 53498 | char *zFull = sqlite3MallocZero( nFull ); |
| 53499 | void *zConverted = 0; |
| 53500 | if( zFull==0 ){ |
| 53501 | OSTRACE(("DLOPEN name=%s, handle=%p\n", zFilename, (void*)0)); |
| 53502 | return 0; |
| 53503 | } |
| 53504 | if( winFullPathname(pVfs, zFilename, nFull, zFull)!=SQLITE_OK ){ |
| 53505 | sqlite3_free(zFull); |
| 53506 | OSTRACE(("DLOPEN name=%s, handle=%p\n", zFilename, (void*)0)); |
| 53507 | return 0; |
| 53508 | } |
| 53509 | zConverted = winConvertFromUtf8Filename(zFull); |
| 53510 | sqlite3_free(zFull); |
| 53511 | #else |
| 53512 | void *zConverted = winConvertFromUtf8Filename(zFilename); |
| 53513 | UNUSED_PARAMETER(pVfs); |
| 53514 | #endif |
| 53515 | if( zConverted==0 ){ |
| 53516 | OSTRACE(("DLOPEN name=%s, handle=%p\n", zFilename, (void*)0)); |
| 53517 | return 0; |
| 53518 | } |
| 53519 | if( osIsNT() ){ |
| @@ -119021,14 +118917,14 @@ | |
| 119021 | }else{ |
| 119022 | nQuot = sqlite3Strlen30(zQuot)-1; |
| 119023 | } |
| 119024 | |
| 119025 | assert( nQuot>=nNew && nSql>=0 && nNew>=0 ); |
| 119026 | zOut = sqlite3DbMallocZero(db, (u64)(nSql + pRename->nList*nQuot + 1)); |
| 119027 | }else{ |
| 119028 | assert( nSql>0 ); |
| 119029 | zOut = (char*)sqlite3DbMallocZero(db, (u64)(nSql*2+1) * 3); |
| 119030 | if( zOut ){ |
| 119031 | zBuf1 = &zOut[nSql*2+1]; |
| 119032 | zBuf2 = &zOut[nSql*4+2]; |
| 119033 | } |
| 119034 | } |
| @@ -138768,10 +138664,12 @@ | |
| 138768 | /* Version 3.43.0 and later */ |
| 138769 | int (*stmt_explain)(sqlite3_stmt*,int); |
| 138770 | /* Version 3.44.0 and later */ |
| 138771 | void *(*get_clientdata)(sqlite3*,const char*); |
| 138772 | int (*set_clientdata)(sqlite3*, const char*, void*, void(*)(void*)); |
| 138773 | }; |
| 138774 | |
| 138775 | /* |
| 138776 | ** This is the function signature used for all extension entry points. It |
| 138777 | ** is also defined in the file "loadext.c". |
| @@ -139101,10 +138999,12 @@ | |
| 139101 | /* Version 3.43.0 and later */ |
| 139102 | #define sqlite3_stmt_explain sqlite3_api->stmt_explain |
| 139103 | /* Version 3.44.0 and later */ |
| 139104 | #define sqlite3_get_clientdata sqlite3_api->get_clientdata |
| 139105 | #define sqlite3_set_clientdata sqlite3_api->set_clientdata |
| 139106 | #endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */ |
| 139107 | |
| 139108 | #if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) |
| 139109 | /* This case when the file really is being compiled as a loadable |
| 139110 | ** extension */ |
| @@ -139622,11 +139522,13 @@ | |
| 139622 | sqlite3_is_interrupted, |
| 139623 | /* Version 3.43.0 and later */ |
| 139624 | sqlite3_stmt_explain, |
| 139625 | /* Version 3.44.0 and later */ |
| 139626 | sqlite3_get_clientdata, |
| 139627 | sqlite3_set_clientdata |
| 139628 | }; |
| 139629 | |
| 139630 | /* True if x is the directory separator character |
| 139631 | */ |
| 139632 | #if SQLITE_OS_WIN |
| @@ -153362,10 +153264,14 @@ | |
| 153362 | } |
| 153363 | |
| 153364 | if( iOrderByCol ){ |
| 153365 | Expr *pX = p->pEList->a[iOrderByCol-1].pExpr; |
| 153366 | Expr *pBase = sqlite3ExprSkipCollateAndLikely(pX); |
| 153367 | if( ALWAYS(pBase!=0) |
| 153368 | && pBase->op!=TK_AGG_COLUMN |
| 153369 | && pBase->op!=TK_REGISTER |
| 153370 | ){ |
| 153371 | sqlite3ExprToRegister(pX, iAMem+j); |
| @@ -212677,22 +212583,24 @@ | |
| 212677 | const char *z; |
| 212678 | u32 n; |
| 212679 | UNUSED_PARAMETER(argc); |
| 212680 | pStr = (JsonString*)sqlite3_aggregate_context(ctx, sizeof(*pStr)); |
| 212681 | if( pStr ){ |
| 212682 | if( pStr->zBuf==0 ){ |
| 212683 | jsonStringInit(pStr, ctx); |
| 212684 | jsonAppendChar(pStr, '{'); |
| 212685 | }else if( pStr->nUsed>1 ){ |
| 212686 | jsonAppendChar(pStr, ','); |
| 212687 | } |
| 212688 | pStr->pCtx = ctx; |
| 212689 | z = (const char*)sqlite3_value_text(argv[0]); |
| 212690 | n = sqlite3Strlen30(z); |
| 212691 | jsonAppendString(pStr, z, n); |
| 212692 | jsonAppendChar(pStr, ':'); |
| 212693 | jsonAppendSqlValue(pStr, argv[1]); |
| 212694 | } |
| 212695 | } |
| 212696 | static void jsonObjectCompute(sqlite3_context *ctx, int isFinal){ |
| 212697 | JsonString *pStr; |
| 212698 | pStr = (JsonString*)sqlite3_aggregate_context(ctx, 0); |
| @@ -231506,18 +231414,19 @@ | |
| 231506 | /* |
| 231507 | ** If the SessionInput object passed as the only argument is a streaming |
| 231508 | ** object and the buffer is full, discard some data to free up space. |
| 231509 | */ |
| 231510 | static void sessionDiscardData(SessionInput *pIn){ |
| 231511 | if( pIn->xInput && pIn->iNext>=sessions_strm_chunk_size ){ |
| 231512 | int nMove = pIn->buf.nBuf - pIn->iNext; |
| 231513 | assert( nMove>=0 ); |
| 231514 | if( nMove>0 ){ |
| 231515 | memmove(pIn->buf.aBuf, &pIn->buf.aBuf[pIn->iNext], nMove); |
| 231516 | } |
| 231517 | pIn->buf.nBuf -= pIn->iNext; |
| 231518 | pIn->iNext = 0; |
| 231519 | pIn->nData = pIn->buf.nBuf; |
| 231520 | } |
| 231521 | } |
| 231522 | |
| 231523 | /* |
| @@ -231867,12 +231776,12 @@ | |
| 231867 | ** sufficient either for the 'T' or 'P' byte and the varint that follows |
| 231868 | ** it, or for the two single byte values otherwise. */ |
| 231869 | p->rc = sessionInputBuffer(&p->in, 2); |
| 231870 | if( p->rc!=SQLITE_OK ) return p->rc; |
| 231871 | |
| 231872 | sessionDiscardData(&p->in); |
| 231873 | p->in.iCurrent = p->in.iNext; |
| 231874 | |
| 231875 | /* If the iterator is already at the end of the changeset, return DONE. */ |
| 231876 | if( p->in.iNext>=p->in.nData ){ |
| 231877 | return SQLITE_DONE; |
| 231878 | } |
| @@ -234227,18 +234136,23 @@ | |
| 234227 | */ |
| 234228 | SQLITE_API int sqlite3changegroup_add_change( |
| 234229 | sqlite3_changegroup *pGrp, |
| 234230 | sqlite3_changeset_iter *pIter |
| 234231 | ){ |
| 234232 | if( pIter->in.iCurrent==pIter->in.iNext |
| 234233 | || pIter->rc!=SQLITE_OK |
| 234234 | || pIter->bInvert |
| 234235 | ){ |
| 234236 | /* Iterator does not point to any valid entry or is an INVERT iterator. */ |
| 234237 | return SQLITE_ERROR; |
| 234238 | } |
| 234239 | return sessionOneChangeToHash(pGrp, pIter, 0); |
| 234240 | } |
| 234241 | |
| 234242 | /* |
| 234243 | ** Obtain a buffer containing a changeset representing the concatenation |
| 234244 | ** of all changesets added to the group so far. |
| @@ -257275,11 +257189,11 @@ | |
| 257275 | int nArg, /* Number of args */ |
| 257276 | sqlite3_value **apUnused /* Function arguments */ |
| 257277 | ){ |
| 257278 | assert( nArg==0 ); |
| 257279 | UNUSED_PARAM2(nArg, apUnused); |
| 257280 | sqlite3_result_text(pCtx, "fts5: 2025-05-15 11:20:54 336ceeccc6f85bd78f4a26648af7edf9056d569a767b4120f125a02b2090a349", -1, SQLITE_TRANSIENT); |
| 257281 | } |
| 257282 | |
| 257283 | /* |
| 257284 | ** Implementation of fts5_locale(LOCALE, TEXT) function. |
| 257285 | ** |
| 257286 |
| --- 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 | ** de0dfac1e5ca9d2661674c20664095386f60 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-05-26 07:15:20 de0dfac1e5ca9d2661674c20664095386f60c77378311507fcba08111df52b38" |
| 471 | |
| 472 | /* |
| 473 | ** CAPI3REF: Run-Time Library Version Numbers |
| 474 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 475 | ** |
| @@ -35013,11 +35013,11 @@ | |
| 35013 | } |
| 35014 | |
| 35015 | /* |
| 35016 | ** Write a single UTF8 character whose value is v into the |
| 35017 | ** buffer starting at zOut. zOut must be sized to hold at |
| 35018 | ** least four bytes. Return the number of bytes needed |
| 35019 | ** to encode the new character. |
| 35020 | */ |
| 35021 | SQLITE_PRIVATE int sqlite3AppendOneUtf8Character(char *zOut, u32 v){ |
| 35022 | if( v<0x00080 ){ |
| 35023 | zOut[0] = (u8)(v & 0xff); |
| @@ -51333,17 +51333,17 @@ | |
| 51333 | int nChar; |
| 51334 | LPWSTR zWideFilename; |
| 51335 | |
| 51336 | if( osCygwin_conv_path && !(winIsDriveLetterAndColon(zFilename) |
| 51337 | && winIsDirSep(zFilename[2])) ){ |
| 51338 | i64 nByte; |
| 51339 | int convertflag = CCP_POSIX_TO_WIN_W; |
| 51340 | if( !strchr(zFilename, '/') ) convertflag |= CCP_RELATIVE; |
| 51341 | nByte = (i64)osCygwin_conv_path(convertflag, |
| 51342 | zFilename, 0, 0); |
| 51343 | if( nByte>0 ){ |
| 51344 | zConverted = sqlite3MallocZero(12+(u64)nByte); |
| 51345 | if ( zConverted==0 ){ |
| 51346 | return zConverted; |
| 51347 | } |
| 51348 | zWideFilename = zConverted; |
| 51349 | /* Filenames should be prefixed, except when converted |
| @@ -52222,31 +52222,10 @@ | |
| 52222 | ** |
| 52223 | ** This division contains the implementation of methods on the |
| 52224 | ** sqlite3_vfs object. |
| 52225 | */ |
| 52226 | |
| 52227 | /* |
| 52228 | ** This function returns non-zero if the specified UTF-8 string buffer |
| 52229 | ** ends with a directory separator character or one was successfully |
| 52230 | ** added to it. |
| 52231 | */ |
| @@ -52382,46 +52361,10 @@ | |
| 52361 | sqlite3_snprintf(nMax, zBuf, "%s", zDir); |
| 52362 | sqlite3_free(zConverted); |
| 52363 | break; |
| 52364 | } |
| 52365 | sqlite3_free(zConverted); |
| 52366 | } |
| 52367 | } |
| 52368 | } |
| 52369 | #endif |
| 52370 | |
| @@ -53316,38 +53259,10 @@ | |
| 53259 | winSimplifyName(zFull); |
| 53260 | return rc; |
| 53261 | } |
| 53262 | } |
| 53263 | #endif /* __CYGWIN__ */ |
| 53264 | |
| 53265 | #if (SQLITE_OS_WINCE || SQLITE_OS_WINRT) && defined(_WIN32) |
| 53266 | SimulateIOError( return SQLITE_ERROR ); |
| 53267 | /* WinCE has no concept of a relative pathname, or so I am told. */ |
| 53268 | /* WinRT has no way to convert a relative path to an absolute one. */ |
| @@ -53489,31 +53404,12 @@ | |
| 53404 | ** Interfaces for opening a shared library, finding entry points |
| 53405 | ** within the shared library, and closing the shared library. |
| 53406 | */ |
| 53407 | static void *winDlOpen(sqlite3_vfs *pVfs, const char *zFilename){ |
| 53408 | HANDLE h; |
| 53409 | void *zConverted = winConvertFromUtf8Filename(zFilename); |
| 53410 | UNUSED_PARAMETER(pVfs); |
| 53411 | if( zConverted==0 ){ |
| 53412 | OSTRACE(("DLOPEN name=%s, handle=%p\n", zFilename, (void*)0)); |
| 53413 | return 0; |
| 53414 | } |
| 53415 | if( osIsNT() ){ |
| @@ -119021,14 +118917,14 @@ | |
| 118917 | }else{ |
| 118918 | nQuot = sqlite3Strlen30(zQuot)-1; |
| 118919 | } |
| 118920 | |
| 118921 | assert( nQuot>=nNew && nSql>=0 && nNew>=0 ); |
| 118922 | zOut = sqlite3DbMallocZero(db, (u64)nSql + pRename->nList*(u64)nQuot + 1); |
| 118923 | }else{ |
| 118924 | assert( nSql>0 ); |
| 118925 | zOut = (char*)sqlite3DbMallocZero(db, (2*(u64)nSql + 1) * 3); |
| 118926 | if( zOut ){ |
| 118927 | zBuf1 = &zOut[nSql*2+1]; |
| 118928 | zBuf2 = &zOut[nSql*4+2]; |
| 118929 | } |
| 118930 | } |
| @@ -138768,10 +138664,12 @@ | |
| 138664 | /* Version 3.43.0 and later */ |
| 138665 | int (*stmt_explain)(sqlite3_stmt*,int); |
| 138666 | /* Version 3.44.0 and later */ |
| 138667 | void *(*get_clientdata)(sqlite3*,const char*); |
| 138668 | int (*set_clientdata)(sqlite3*, const char*, void*, void(*)(void*)); |
| 138669 | /* Version 3.50.0 and later */ |
| 138670 | int (*setlk_timeout)(sqlite3*,int,int); |
| 138671 | }; |
| 138672 | |
| 138673 | /* |
| 138674 | ** This is the function signature used for all extension entry points. It |
| 138675 | ** is also defined in the file "loadext.c". |
| @@ -139101,10 +138999,12 @@ | |
| 138999 | /* Version 3.43.0 and later */ |
| 139000 | #define sqlite3_stmt_explain sqlite3_api->stmt_explain |
| 139001 | /* Version 3.44.0 and later */ |
| 139002 | #define sqlite3_get_clientdata sqlite3_api->get_clientdata |
| 139003 | #define sqlite3_set_clientdata sqlite3_api->set_clientdata |
| 139004 | /* Version 3.50.0 and later */ |
| 139005 | #define sqlite3_setlk_timeout sqlite3_api->setlk_timeout |
| 139006 | #endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */ |
| 139007 | |
| 139008 | #if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) |
| 139009 | /* This case when the file really is being compiled as a loadable |
| 139010 | ** extension */ |
| @@ -139622,11 +139522,13 @@ | |
| 139522 | sqlite3_is_interrupted, |
| 139523 | /* Version 3.43.0 and later */ |
| 139524 | sqlite3_stmt_explain, |
| 139525 | /* Version 3.44.0 and later */ |
| 139526 | sqlite3_get_clientdata, |
| 139527 | sqlite3_set_clientdata, |
| 139528 | /* Version 3.50.0 and later */ |
| 139529 | sqlite3_setlk_timeout |
| 139530 | }; |
| 139531 | |
| 139532 | /* True if x is the directory separator character |
| 139533 | */ |
| 139534 | #if SQLITE_OS_WIN |
| @@ -153362,10 +153264,14 @@ | |
| 153264 | } |
| 153265 | |
| 153266 | if( iOrderByCol ){ |
| 153267 | Expr *pX = p->pEList->a[iOrderByCol-1].pExpr; |
| 153268 | Expr *pBase = sqlite3ExprSkipCollateAndLikely(pX); |
| 153269 | while( ALWAYS(pBase!=0) && pBase->op==TK_IF_NULL_ROW ){ |
| 153270 | pX = pBase->pLeft; |
| 153271 | pBase = sqlite3ExprSkipCollateAndLikely(pX); |
| 153272 | } |
| 153273 | if( ALWAYS(pBase!=0) |
| 153274 | && pBase->op!=TK_AGG_COLUMN |
| 153275 | && pBase->op!=TK_REGISTER |
| 153276 | ){ |
| 153277 | sqlite3ExprToRegister(pX, iAMem+j); |
| @@ -212677,22 +212583,24 @@ | |
| 212583 | const char *z; |
| 212584 | u32 n; |
| 212585 | UNUSED_PARAMETER(argc); |
| 212586 | pStr = (JsonString*)sqlite3_aggregate_context(ctx, sizeof(*pStr)); |
| 212587 | if( pStr ){ |
| 212588 | z = (const char*)sqlite3_value_text(argv[0]); |
| 212589 | n = sqlite3Strlen30(z); |
| 212590 | if( pStr->zBuf==0 ){ |
| 212591 | jsonStringInit(pStr, ctx); |
| 212592 | jsonAppendChar(pStr, '{'); |
| 212593 | }else if( pStr->nUsed>1 && z!=0 ){ |
| 212594 | jsonAppendChar(pStr, ','); |
| 212595 | } |
| 212596 | pStr->pCtx = ctx; |
| 212597 | if( z!=0 ){ |
| 212598 | jsonAppendString(pStr, z, n); |
| 212599 | jsonAppendChar(pStr, ':'); |
| 212600 | jsonAppendSqlValue(pStr, argv[1]); |
| 212601 | } |
| 212602 | } |
| 212603 | } |
| 212604 | static void jsonObjectCompute(sqlite3_context *ctx, int isFinal){ |
| 212605 | JsonString *pStr; |
| 212606 | pStr = (JsonString*)sqlite3_aggregate_context(ctx, 0); |
| @@ -231506,18 +231414,19 @@ | |
| 231414 | /* |
| 231415 | ** If the SessionInput object passed as the only argument is a streaming |
| 231416 | ** object and the buffer is full, discard some data to free up space. |
| 231417 | */ |
| 231418 | static void sessionDiscardData(SessionInput *pIn){ |
| 231419 | if( pIn->xInput && pIn->iCurrent>=sessions_strm_chunk_size ){ |
| 231420 | int nMove = pIn->buf.nBuf - pIn->iCurrent; |
| 231421 | assert( nMove>=0 ); |
| 231422 | if( nMove>0 ){ |
| 231423 | memmove(pIn->buf.aBuf, &pIn->buf.aBuf[pIn->iCurrent], nMove); |
| 231424 | } |
| 231425 | pIn->buf.nBuf -= pIn->iCurrent; |
| 231426 | pIn->iNext -= pIn->iCurrent; |
| 231427 | pIn->iCurrent = 0; |
| 231428 | pIn->nData = pIn->buf.nBuf; |
| 231429 | } |
| 231430 | } |
| 231431 | |
| 231432 | /* |
| @@ -231867,12 +231776,12 @@ | |
| 231776 | ** sufficient either for the 'T' or 'P' byte and the varint that follows |
| 231777 | ** it, or for the two single byte values otherwise. */ |
| 231778 | p->rc = sessionInputBuffer(&p->in, 2); |
| 231779 | if( p->rc!=SQLITE_OK ) return p->rc; |
| 231780 | |
| 231781 | p->in.iCurrent = p->in.iNext; |
| 231782 | sessionDiscardData(&p->in); |
| 231783 | |
| 231784 | /* If the iterator is already at the end of the changeset, return DONE. */ |
| 231785 | if( p->in.iNext>=p->in.nData ){ |
| 231786 | return SQLITE_DONE; |
| 231787 | } |
| @@ -234227,18 +234136,23 @@ | |
| 234136 | */ |
| 234137 | SQLITE_API int sqlite3changegroup_add_change( |
| 234138 | sqlite3_changegroup *pGrp, |
| 234139 | sqlite3_changeset_iter *pIter |
| 234140 | ){ |
| 234141 | int rc = SQLITE_OK; |
| 234142 | |
| 234143 | if( pIter->in.iCurrent==pIter->in.iNext |
| 234144 | || pIter->rc!=SQLITE_OK |
| 234145 | || pIter->bInvert |
| 234146 | ){ |
| 234147 | /* Iterator does not point to any valid entry or is an INVERT iterator. */ |
| 234148 | rc = SQLITE_ERROR; |
| 234149 | }else{ |
| 234150 | pIter->in.bNoDiscard = 1; |
| 234151 | rc = sessionOneChangeToHash(pGrp, pIter, 0); |
| 234152 | } |
| 234153 | return rc; |
| 234154 | } |
| 234155 | |
| 234156 | /* |
| 234157 | ** Obtain a buffer containing a changeset representing the concatenation |
| 234158 | ** of all changesets added to the group so far. |
| @@ -257275,11 +257189,11 @@ | |
| 257189 | int nArg, /* Number of args */ |
| 257190 | sqlite3_value **apUnused /* Function arguments */ |
| 257191 | ){ |
| 257192 | assert( nArg==0 ); |
| 257193 | UNUSED_PARAM2(nArg, apUnused); |
| 257194 | sqlite3_result_text(pCtx, "fts5: 2025-05-26 07:15:20 de0dfac1e5ca9d2661674c20664095386f60c77378311507fcba08111df52b38", -1, SQLITE_TRANSIENT); |
| 257195 | } |
| 257196 | |
| 257197 | /* |
| 257198 | ** Implementation of fts5_locale(LOCALE, TEXT) function. |
| 257199 | ** |
| 257200 |
+1
-1
| --- 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-05-15 11:20:54 336ceeccc6f85bd78f4a26648af7edf9056d569a767b4120f125a02b2090a349" | |
| 151 | +#define SQLITE_SOURCE_ID "2025-05-26 07:15:20 de0dfac1e5ca9d2661674c20664095386f60c77378311507fcba08111df52b38" | |
| 152 | 152 | |
| 153 | 153 | /* |
| 154 | 154 | ** CAPI3REF: Run-Time Library Version Numbers |
| 155 | 155 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 156 | 156 | ** |
| 157 | 157 |
| --- 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-05-15 11:20:54 336ceeccc6f85bd78f4a26648af7edf9056d569a767b4120f125a02b2090a349" |
| 152 | |
| 153 | /* |
| 154 | ** CAPI3REF: Run-Time Library Version Numbers |
| 155 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 156 | ** |
| 157 |
| --- 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-05-26 07:15:20 de0dfac1e5ca9d2661674c20664095386f60c77378311507fcba08111df52b38" |
| 152 | |
| 153 | /* |
| 154 | ** CAPI3REF: Run-Time Library Version Numbers |
| 155 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 156 | ** |
| 157 |