Fossil SCM
Update the built-in SQLite to the latest trunk check-in for beta-testing.
Commit
d0d5159c281e7a389703d4556a5c9a87618954dcf97aeacabe16f64d14b083c7
Parent
f72ef850fce0452…
2 files changed
+308
-157
+2
-2
+308
-157
| --- 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 | -** b67889e4f17c3280f839ee7045256cc47d6c with changes in files: | |
| 21 | +** b5ebbd004183f81902fa79a143222204b33d 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-10 19:33:11 b67889e4f17c3280f839ee7045256cc47d6ce3ed60d880925e3d30f9ebbcf3ff" | |
| 472 | +#define SQLITE_SOURCE_ID "2026-02-16 11:14:59 b5ebbd004183f81902fa79a143222204b33dbe1cacb918194556b8dac67bd567" | |
| 473 | 473 | #define SQLITE_SCM_BRANCH "trunk" |
| 474 | 474 | #define SQLITE_SCM_TAGS "" |
| 475 | -#define SQLITE_SCM_DATETIME "2026-02-10T19:33:11.305Z" | |
| 475 | +#define SQLITE_SCM_DATETIME "2026-02-16T11:14:59.370Z" | |
| 476 | 476 | |
| 477 | 477 | /* |
| 478 | 478 | ** CAPI3REF: Run-Time Library Version Numbers |
| 479 | 479 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 480 | 480 | ** |
| @@ -15836,10 +15836,11 @@ | ||
| 15836 | 15836 | #ifdef SQLITE_4_BYTE_ALIGNED_MALLOC |
| 15837 | 15837 | # define EIGHT_BYTE_ALIGNMENT(X) ((((uptr)(X) - (uptr)0)&3)==0) |
| 15838 | 15838 | #else |
| 15839 | 15839 | # define EIGHT_BYTE_ALIGNMENT(X) ((((uptr)(X) - (uptr)0)&7)==0) |
| 15840 | 15840 | #endif |
| 15841 | +#define TWO_BYTE_ALIGNMENT(X) ((((uptr)(X) - (uptr)0)&1)==0) | |
| 15841 | 15842 | |
| 15842 | 15843 | /* |
| 15843 | 15844 | ** Disable MMAP on platforms where it is known to not work |
| 15844 | 15845 | */ |
| 15845 | 15846 | #if defined(__OpenBSD__) || defined(__QNXNTO__) |
| @@ -20616,33 +20617,33 @@ | ||
| 20616 | 20617 | int rc; /* Return code from execution */ |
| 20617 | 20618 | LogEst nQueryLoop; /* Est number of iterations of a query (10*log2(N)) */ |
| 20618 | 20619 | u8 nested; /* Number of nested calls to the parser/code generator */ |
| 20619 | 20620 | u8 nTempReg; /* Number of temporary registers in aTempReg[] */ |
| 20620 | 20621 | u8 isMultiWrite; /* True if statement may modify/insert multiple rows */ |
| 20621 | - u8 mayAbort; /* True if statement may throw an ABORT exception */ | |
| 20622 | - u8 hasCompound; /* Need to invoke convertCompoundSelectToSubquery() */ | |
| 20623 | 20622 | u8 disableLookaside; /* Number of times lookaside has been disabled */ |
| 20624 | 20623 | u8 prepFlags; /* SQLITE_PREPARE_* flags */ |
| 20625 | 20624 | u8 withinRJSubrtn; /* Nesting level for RIGHT JOIN body subroutines */ |
| 20626 | - u8 bHasExists; /* Has a correlated "EXISTS (SELECT ....)" expression */ | |
| 20627 | 20625 | u8 mSubrtnSig; /* mini Bloom filter on available SubrtnSig.selId */ |
| 20628 | 20626 | u8 eTriggerOp; /* TK_UPDATE, TK_INSERT or TK_DELETE */ |
| 20629 | - u8 bReturning; /* Coding a RETURNING trigger */ | |
| 20630 | 20627 | u8 eOrconf; /* Default ON CONFLICT policy for trigger steps */ |
| 20631 | - u8 disableTriggers; /* True to disable triggers */ | |
| 20632 | 20628 | #if defined(SQLITE_DEBUG) || defined(SQLITE_COVERAGE_TEST) |
| 20633 | 20629 | u8 earlyCleanup; /* OOM inside sqlite3ParserAddCleanup() */ |
| 20634 | 20630 | #endif |
| 20635 | 20631 | #ifdef SQLITE_DEBUG |
| 20636 | 20632 | u8 ifNotExists; /* Might be true if IF NOT EXISTS. Assert()s only */ |
| 20637 | 20633 | u8 isCreate; /* CREATE TABLE, INDEX, or VIEW (but not TRIGGER) |
| 20638 | 20634 | ** and ALTER TABLE ADD COLUMN. */ |
| 20639 | 20635 | #endif |
| 20640 | - bft colNamesSet :1; /* TRUE after OP_ColumnName has been issued to pVdbe */ | |
| 20641 | - bft bHasWith :1; /* True if statement contains WITH */ | |
| 20642 | - bft okConstFactor :1; /* OK to factor out constants */ | |
| 20643 | - bft checkSchema :1; /* Causes schema cookie check after an error */ | |
| 20636 | + bft disableTriggers:1; /* True to disable triggers */ | |
| 20637 | + bft mayAbort :1; /* True if statement may throw an ABORT exception */ | |
| 20638 | + bft hasCompound :1; /* Need to invoke convertCompoundSelectToSubquery() */ | |
| 20639 | + bft bReturning :1; /* Coding a RETURNING trigger */ | |
| 20640 | + bft bHasExists :1; /* Has a correlated "EXISTS (SELECT ....)" expression */ | |
| 20641 | + bft colNamesSet :1; /* TRUE after OP_ColumnName has been issued to pVdbe */ | |
| 20642 | + bft bHasWith :1; /* True if statement contains WITH */ | |
| 20643 | + bft okConstFactor:1; /* OK to factor out constants */ | |
| 20644 | + bft checkSchema :1; /* Causes schema cookie check after an error */ | |
| 20644 | 20645 | int nRangeReg; /* Size of the temporary register block */ |
| 20645 | 20646 | int iRangeReg; /* First register in temporary register block */ |
| 20646 | 20647 | int nErr; /* Number of errors seen */ |
| 20647 | 20648 | int nTab; /* Number of previously allocated VDBE cursors */ |
| 20648 | 20649 | int nMem; /* Number of memory cells used so far */ |
| @@ -36454,44 +36455,254 @@ | ||
| 36454 | 36455 | z++; |
| 36455 | 36456 | } |
| 36456 | 36457 | return h; |
| 36457 | 36458 | } |
| 36458 | 36459 | |
| 36459 | -/* Double-Double multiplication. (x[0],x[1]) *= (y,yy) | |
| 36460 | -** | |
| 36461 | -** Reference: | |
| 36462 | -** T. J. Dekker, "A Floating-Point Technique for Extending the | |
| 36463 | -** Available Precision". 1971-07-26. | |
| 36464 | -*/ | |
| 36465 | -static void dekkerMul2(volatile double *x, double y, double yy){ | |
| 36466 | - /* | |
| 36467 | - ** The "volatile" keywords on parameter x[] and on local variables | |
| 36468 | - ** below are needed force intermediate results to be truncated to | |
| 36469 | - ** binary64 rather than be carried around in an extended-precision | |
| 36470 | - ** format. The truncation is necessary for the Dekker algorithm to | |
| 36471 | - ** work. Intel x86 floating point might omit the truncation without | |
| 36472 | - ** the use of volatile. | |
| 36473 | - */ | |
| 36474 | - volatile double tx, ty, p, q, c, cc; | |
| 36475 | - double hx, hy; | |
| 36476 | - u64 m; | |
| 36477 | - memcpy(&m, (void*)&x[0], 8); | |
| 36478 | - m &= 0xfffffffffc000000LL; | |
| 36479 | - memcpy(&hx, &m, 8); | |
| 36480 | - tx = x[0] - hx; | |
| 36481 | - memcpy(&m, &y, 8); | |
| 36482 | - m &= 0xfffffffffc000000LL; | |
| 36483 | - memcpy(&hy, &m, 8); | |
| 36484 | - ty = y - hy; | |
| 36485 | - p = hx*hy; | |
| 36486 | - q = hx*ty + tx*hy; | |
| 36487 | - c = p+q; | |
| 36488 | - cc = p - c + q + tx*ty; | |
| 36489 | - cc = x[0]*yy + x[1]*y + cc; | |
| 36490 | - x[0] = c + cc; | |
| 36491 | - x[1] = c - x[0]; | |
| 36492 | - x[1] += cc; | |
| 36460 | +/* | |
| 36461 | +** Two inputs are multiplied to get a 128-bit result. Return | |
| 36462 | +** the high-order 64 bits of that result. | |
| 36463 | +*/ | |
| 36464 | +static u64 sqlite3Multiply128(u64 a, u64 b){ | |
| 36465 | +#if (defined(__GNUC__) || defined(__clang__)) \ | |
| 36466 | + && (defined(__x86_64__) || defined(__aarch64__) || defined(__riscv)) | |
| 36467 | + return ((__uint128_t)a * b) >> 64; | |
| 36468 | +#elif defined(_MSC_VER) && defined(_M_X64) | |
| 36469 | + return __umulh(a, b); | |
| 36470 | +#else | |
| 36471 | + u64 a1 = (u32)a; | |
| 36472 | + u64 a2 = a >> 32; | |
| 36473 | + u64 b1 = (u32)b; | |
| 36474 | + u64 b2 = b >> 32; | |
| 36475 | + u64 p0 = a1 * b1; | |
| 36476 | + u64 p1 = a1 * b2; | |
| 36477 | + u64 p2 = a2 * b1; | |
| 36478 | + u64 p3 = a2 * b2; | |
| 36479 | + u64 carry = ((p0 >> 32) + (u32)p1 + (u32)p2) >> 32; | |
| 36480 | + return p3 + (p1 >> 32) + (p2 >> 32) + carry; | |
| 36481 | +#endif | |
| 36482 | +} | |
| 36483 | + | |
| 36484 | +/* | |
| 36485 | +** Return a u64 with the N-th bit set. | |
| 36486 | +*/ | |
| 36487 | +#define U64_BIT(N) (((u64)1)<<(N)) | |
| 36488 | + | |
| 36489 | +/* | |
| 36490 | +** Range of powers of 10 that we need to deal with when converting | |
| 36491 | +** IEEE754 doubles to and from decimal. | |
| 36492 | +*/ | |
| 36493 | +#define POWERSOF10_FIRST (-348) | |
| 36494 | +#define POWERSOF10_LAST (+347) | |
| 36495 | + | |
| 36496 | +/* | |
| 36497 | +** For any p between -348 and +347, return the integer part of | |
| 36498 | +** | |
| 36499 | +** pow(10,p) * pow(2,63-pow10to2(p)) | |
| 36500 | +** | |
| 36501 | +** Or, in other words, for any p in range, return the most significant | |
| 36502 | +** 64 bits of pow(10,p). The pow(10,p) value is shifted left or right, | |
| 36503 | +** as appropriate so the most significant 64 bits fit exactly into a | |
| 36504 | +** 64-bit unsigned integer. | |
| 36505 | +** | |
| 36506 | +** Algorithm: | |
| 36507 | +** | |
| 36508 | +** (1) For p between 0 and 26, return the value directly from the aBase[] | |
| 36509 | +** lookup table. | |
| 36510 | +** | |
| 36511 | +** (2) For p outside the range 0 to 26, use aScale[] for the initial value | |
| 36512 | +** then refine that result (if necessary) by a single multiplication | |
| 36513 | +** against aBase[]. | |
| 36514 | +*/ | |
| 36515 | +static u64 powerOfTen(int p){ | |
| 36516 | + static const u64 aBase[] = { | |
| 36517 | + 0x8000000000000000LLU, /* 0: 1.0e+0 << 63 */ | |
| 36518 | + 0xa000000000000000LLU, /* 1: 1.0e+1 << 60 */ | |
| 36519 | + 0xc800000000000000LLU, /* 2: 1.0e+2 << 57 */ | |
| 36520 | + 0xfa00000000000000LLU, /* 3: 1.0e+3 << 54 */ | |
| 36521 | + 0x9c40000000000000LLU, /* 4: 1.0e+4 << 50 */ | |
| 36522 | + 0xc350000000000000LLU, /* 5: 1.0e+5 << 47 */ | |
| 36523 | + 0xf424000000000000LLU, /* 6: 1.0e+6 << 44 */ | |
| 36524 | + 0x9896800000000000LLU, /* 7: 1.0e+7 << 40 */ | |
| 36525 | + 0xbebc200000000000LLU, /* 8: 1.0e+8 << 37 */ | |
| 36526 | + 0xee6b280000000000LLU, /* 9: 1.0e+9 << 34 */ | |
| 36527 | + 0x9502f90000000000LLU, /* 10: 1.0e+10 << 30 */ | |
| 36528 | + 0xba43b74000000000LLU, /* 11: 1.0e+11 << 27 */ | |
| 36529 | + 0xe8d4a51000000000LLU, /* 12: 1.0e+12 << 24 */ | |
| 36530 | + 0x9184e72a00000000LLU, /* 13: 1.0e+13 << 20 */ | |
| 36531 | + 0xb5e620f480000000LLU, /* 14: 1.0e+14 << 17 */ | |
| 36532 | + 0xe35fa931a0000000LLU, /* 15: 1.0e+15 << 14 */ | |
| 36533 | + 0x8e1bc9bf04000000LLU, /* 16: 1.0e+16 << 10 */ | |
| 36534 | + 0xb1a2bc2ec5000000LLU, /* 17: 1.0e+17 << 7 */ | |
| 36535 | + 0xde0b6b3a76400000LLU, /* 18: 1.0e+18 << 4 */ | |
| 36536 | + 0x8ac7230489e80000LLU, /* 19: 1.0e+19 >> 0 */ | |
| 36537 | + 0xad78ebc5ac620000LLU, /* 20: 1.0e+20 >> 3 */ | |
| 36538 | + 0xd8d726b7177a8000LLU, /* 21: 1.0e+21 >> 6 */ | |
| 36539 | + 0x878678326eac9000LLU, /* 22: 1.0e+22 >> 10 */ | |
| 36540 | + 0xa968163f0a57b400LLU, /* 23: 1.0e+23 >> 13 */ | |
| 36541 | + 0xd3c21bcecceda100LLU, /* 24: 1.0e+24 >> 16 */ | |
| 36542 | + 0x84595161401484a0LLU, /* 25: 1.0e+25 >> 20 */ | |
| 36543 | + 0xa56fa5b99019a5c8LLU, /* 26: 1.0e+26 >> 23 */ | |
| 36544 | + }; | |
| 36545 | + static const u64 aScale[] = { | |
| 36546 | + 0x8049a4ac0c5811aeLLU, /* 0: 1.0e-351 << 1229 */ | |
| 36547 | + 0xcf42894a5dce35eaLLU, /* 1: 1.0e-324 << 1140 */ | |
| 36548 | + 0xa76c582338ed2621LLU, /* 2: 1.0e-297 << 1050 */ | |
| 36549 | + 0x873e4f75e2224e68LLU, /* 3: 1.0e-270 << 960 */ | |
| 36550 | + 0xda7f5bf590966848LLU, /* 4: 1.0e-243 << 871 */ | |
| 36551 | + 0xb080392cc4349decLLU, /* 5: 1.0e-216 << 781 */ | |
| 36552 | + 0x8e938662882af53eLLU, /* 6: 1.0e-189 << 691 */ | |
| 36553 | + 0xe65829b3046b0afaLLU, /* 7: 1.0e-162 << 602 */ | |
| 36554 | + 0xba121a4650e4ddebLLU, /* 8: 1.0e-135 << 512 */ | |
| 36555 | + 0x964e858c91ba2655LLU, /* 9: 1.0e-108 << 422 */ | |
| 36556 | + 0xf2d56790ab41c2a2LLU, /* 10: 1.0e-81 << 333 */ | |
| 36557 | + 0xc428d05aa4751e4cLLU, /* 11: 1.0e-54 << 243 */ | |
| 36558 | + 0x9e74d1b791e07e48LLU, /* 12: 1.0e-27 << 153 */ | |
| 36559 | + 0x8000000000000000LLU, /* 13: 1.0e+0 << 63 */ | |
| 36560 | + 0xcecb8f27f4200f3aLLU, /* 14: 1.0e+27 >> 26 */ | |
| 36561 | + 0xa70c3c40a64e6c51LLU, /* 15: 1.0e+54 >> 116 */ | |
| 36562 | + 0x86f0ac99b4e8dafdLLU, /* 16: 1.0e+81 >> 206 */ | |
| 36563 | + 0xda01ee641a708de9LLU, /* 17: 1.0e+108 >> 295 */ | |
| 36564 | + 0xb01ae745b101e9e4LLU, /* 18: 1.0e+135 >> 385 */ | |
| 36565 | + 0x8e41ade9fbebc27dLLU, /* 19: 1.0e+162 >> 475 */ | |
| 36566 | + 0xe5d3ef282a242e81LLU, /* 20: 1.0e+189 >> 564 */ | |
| 36567 | + 0xb9a74a0637ce2ee1LLU, /* 21: 1.0e+216 >> 654 */ | |
| 36568 | + 0x95f83d0a1fb69cd9LLU, /* 22: 1.0e+243 >> 744 */ | |
| 36569 | + 0xf24a01a73cf2dccfLLU, /* 23: 1.0e+270 >> 833 */ | |
| 36570 | + 0xc3b8358109e84f07LLU, /* 24: 1.0e+297 >> 923 */ | |
| 36571 | + 0x9e19db92b4e31ba9LLU, /* 25: 1.0e+324 >> 1013 */ | |
| 36572 | + }; | |
| 36573 | + int g, n; | |
| 36574 | + u64 x, y; | |
| 36575 | + | |
| 36576 | + assert( p>=POWERSOF10_FIRST && p<=POWERSOF10_LAST ); | |
| 36577 | + if( p<0 ){ | |
| 36578 | + g = p/27; | |
| 36579 | + n = p%27; | |
| 36580 | + if( n ){ | |
| 36581 | + g--; | |
| 36582 | + n += 27; | |
| 36583 | + } | |
| 36584 | + }else if( p<27 ){ | |
| 36585 | + return aBase[p]; | |
| 36586 | + }else{ | |
| 36587 | + g = p/27; | |
| 36588 | + n = p%27; | |
| 36589 | + } | |
| 36590 | + y = aScale[g+13]; | |
| 36591 | + if( n==0 ){ | |
| 36592 | + return y; | |
| 36593 | + } | |
| 36594 | + x = sqlite3Multiply128(aBase[n],y); | |
| 36595 | + if( (U64_BIT(63) & x)==0 ){ | |
| 36596 | + x <<= 1; | |
| 36597 | + } | |
| 36598 | + return x; | |
| 36599 | +} | |
| 36600 | + | |
| 36601 | +/* | |
| 36602 | +** pow10to2(x) computes floor(log2(pow(10,x))). | |
| 36603 | +** pow2to10(y) computes floor(log10(pow(2,y))). | |
| 36604 | +** | |
| 36605 | +** Conceptually, pow10to2(p) converts a base-10 exponent p into | |
| 36606 | +** a corresponding base-2 exponent, and pow2to10(e) converts a base-2 | |
| 36607 | +** exponent into a base-10 exponent. | |
| 36608 | +** | |
| 36609 | +** The conversions are based on the observation that: | |
| 36610 | +** | |
| 36611 | +** ln(10.0)/ln(2.0) == 108853/32768 (approximately) | |
| 36612 | +** ln(2.0)/ln(10.0) == 78913/262144 (approximately) | |
| 36613 | +** | |
| 36614 | +** These ratios are approximate, but they are accurate to 5 digits, | |
| 36615 | +** which is close enough for the usage here. Right-shift is used | |
| 36616 | +** for division so that rounding of negative numbers happens in the | |
| 36617 | +** right direction. | |
| 36618 | +*/ | |
| 36619 | +static int pwr10to2(int p){ return (p*108853) >> 15; } | |
| 36620 | +static int pwr2to10(int p){ return (p*78913) >> 18; } | |
| 36621 | + | |
| 36622 | +/* | |
| 36623 | +** Count leading zeros for a 64-bit unsigned integer. | |
| 36624 | +*/ | |
| 36625 | +static int countLeadingZeros(u64 m){ | |
| 36626 | +#if defined(__GNUC__) || defined(__clang__) | |
| 36627 | + return __builtin_clzll(m); | |
| 36628 | +#else | |
| 36629 | + int n = 0; | |
| 36630 | + if( m <= 0x00000000ffffffffULL) { n += 32; m <<= 32; } | |
| 36631 | + if( m <= 0x0000ffffffffffffULL) { n += 16; m <<= 16; } | |
| 36632 | + if( m <= 0x00ffffffffffffffULL) { n += 8; m <<= 8; } | |
| 36633 | + if( m <= 0x0fffffffffffffffULL) { n += 4; m <<= 4; } | |
| 36634 | + if( m <= 0x3fffffffffffffffULL) { n += 2; m <<= 2; } | |
| 36635 | + if( m <= 0x7fffffffffffffffULL) { n += 1; } | |
| 36636 | + return n; | |
| 36637 | +#endif | |
| 36638 | +} | |
| 36639 | + | |
| 36640 | +/* | |
| 36641 | +** Given m and e, which represent a quantity r == m*pow(2,e), | |
| 36642 | +** return values *pD and *pP such that r == (*pD)*pow(10,*pP), | |
| 36643 | +** approximately. *pD should contain at least n significant digits. | |
| 36644 | +** | |
| 36645 | +** The input m is required to have its highest bit set. In other words, | |
| 36646 | +** m should be left-shifted, and e decremented, to maximize the value of m. | |
| 36647 | +*/ | |
| 36648 | +static void sqlite3Fp2Convert10(u64 m, int e, int n, u64 *pD, int *pP){ | |
| 36649 | + int p; | |
| 36650 | + u64 h, out; | |
| 36651 | + p = n - 1 - pwr2to10(e+63); | |
| 36652 | + h = sqlite3Multiply128(m, powerOfTen(p)); | |
| 36653 | + assert( -(e + pwr10to2(p) + 3) >=0 ); | |
| 36654 | + assert( -(e + pwr10to2(p) + 3) <64 ); | |
| 36655 | + out = h >> -(e + pwr10to2(p) + 3); | |
| 36656 | + *pD = (out + 2 + ((out>>2)&1)) >> 2; | |
| 36657 | + *pP = -p; | |
| 36658 | +} | |
| 36659 | + | |
| 36660 | +/* | |
| 36661 | +** Return an IEEE754 floating point value that approximates d*pow(10,p). | |
| 36662 | +*/ | |
| 36663 | +static double sqlite3Fp10Convert2(u64 d, int p){ | |
| 36664 | + u64 out; | |
| 36665 | + int b; | |
| 36666 | + int e1; | |
| 36667 | + int e2; | |
| 36668 | + int lp; | |
| 36669 | + u64 h; | |
| 36670 | + double r; | |
| 36671 | + assert( (d & U64_BIT(63))==0 ); | |
| 36672 | + assert( d!=0 ); | |
| 36673 | + if( p<POWERSOF10_FIRST ){ | |
| 36674 | + return 0.0; | |
| 36675 | + } | |
| 36676 | + if( p>POWERSOF10_LAST ){ | |
| 36677 | + return INFINITY; | |
| 36678 | + } | |
| 36679 | + b = 64 - countLeadingZeros(d); | |
| 36680 | + lp = pwr10to2(p); | |
| 36681 | + e1 = 53 - b - lp; | |
| 36682 | + if( e1>1074 ){ | |
| 36683 | + if( -(b + lp) >= 1077 ) return 0.0; | |
| 36684 | + e1 = 1074; | |
| 36685 | + } | |
| 36686 | + e2 = e1 - (64-b); | |
| 36687 | + h = sqlite3Multiply128(d<<(64-b), powerOfTen(p)); | |
| 36688 | + assert( -(e2 + lp + 3) >=0 ); | |
| 36689 | + assert( -(e2 + lp + 3) <64 ); | |
| 36690 | + out = (h >> -(e2 + lp + 3)) | 1; | |
| 36691 | + if( out >= U64_BIT(55)-2 ){ | |
| 36692 | + out = (out>>1) | (out&1); | |
| 36693 | + e1--; | |
| 36694 | + } | |
| 36695 | + if( e1<=(-972) ){ | |
| 36696 | + return INFINITY; | |
| 36697 | + } | |
| 36698 | + out = (out + 1 + ((out>>2)&1)) >> 2; | |
| 36699 | + if( (out & U64_BIT(52))!=0 ){ | |
| 36700 | + out = (out & ~U64_BIT(52)) | ((u64)(1075-e1)<<52); | |
| 36701 | + } | |
| 36702 | + memcpy(&r, &out, 8); | |
| 36703 | + return r; | |
| 36493 | 36704 | } |
| 36494 | 36705 | |
| 36495 | 36706 | /* |
| 36496 | 36707 | ** The string z[] is an text representation of a real number. |
| 36497 | 36708 | ** Convert this string to a double and write it into *pResult. |
| @@ -36535,12 +36746,10 @@ | ||
| 36535 | 36746 | int esign = 1; /* sign of exponent */ |
| 36536 | 36747 | int e = 0; /* exponent */ |
| 36537 | 36748 | int eValid = 1; /* True exponent is either not used or is well-formed */ |
| 36538 | 36749 | int nDigit = 0; /* Number of digits processed */ |
| 36539 | 36750 | int eType = 1; /* 1: pure integer, 2+: fractional -1 or less: bad UTF16 */ |
| 36540 | - u64 s2; /* round-tripped significand */ | |
| 36541 | - double rr[2]; | |
| 36542 | 36751 | |
| 36543 | 36752 | assert( enc==SQLITE_UTF8 || enc==SQLITE_UTF16LE || enc==SQLITE_UTF16BE ); |
| 36544 | 36753 | *pResult = 0.0; /* Default return value, in case of an error */ |
| 36545 | 36754 | if( length==0 ) return 0; |
| 36546 | 36755 | |
| @@ -36574,11 +36783,11 @@ | ||
| 36574 | 36783 | |
| 36575 | 36784 | /* copy max significant digits to significand */ |
| 36576 | 36785 | while( z<zEnd && sqlite3Isdigit(*z) ){ |
| 36577 | 36786 | s = s*10 + (*z - '0'); |
| 36578 | 36787 | z+=incr; nDigit++; |
| 36579 | - if( s>=((LARGEST_UINT64-9)/10) ){ | |
| 36788 | + if( s>=((LARGEST_INT64-9)/10) ){ | |
| 36580 | 36789 | /* skip non-significant significand digits |
| 36581 | 36790 | ** (increase exponent by d to shift decimal left) */ |
| 36582 | 36791 | while( z<zEnd && sqlite3Isdigit(*z) ){ z+=incr; d++; } |
| 36583 | 36792 | } |
| 36584 | 36793 | } |
| @@ -36589,11 +36798,11 @@ | ||
| 36589 | 36798 | z+=incr; |
| 36590 | 36799 | eType++; |
| 36591 | 36800 | /* copy digits from after decimal to significand |
| 36592 | 36801 | ** (decrease exponent by d to shift decimal right) */ |
| 36593 | 36802 | while( z<zEnd && sqlite3Isdigit(*z) ){ |
| 36594 | - if( s<((LARGEST_UINT64-9)/10) ){ | |
| 36803 | + if( s<((LARGEST_INT64-9)/10) ){ | |
| 36595 | 36804 | s = s*10 + (*z - '0'); |
| 36596 | 36805 | d--; |
| 36597 | 36806 | nDigit++; |
| 36598 | 36807 | } |
| 36599 | 36808 | z+=incr; |
| @@ -36638,66 +36847,11 @@ | ||
| 36638 | 36847 | } |
| 36639 | 36848 | |
| 36640 | 36849 | /* adjust exponent by d, and update sign */ |
| 36641 | 36850 | e = (e*esign) + d; |
| 36642 | 36851 | |
| 36643 | - /* Try to adjust the exponent to make it smaller */ | |
| 36644 | - while( e>0 && s<((LARGEST_UINT64-0x7ff)/10) ){ | |
| 36645 | - s *= 10; | |
| 36646 | - e--; | |
| 36647 | - } | |
| 36648 | - while( e<0 && (s%10)==0 ){ | |
| 36649 | - s /= 10; | |
| 36650 | - e++; | |
| 36651 | - } | |
| 36652 | - | |
| 36653 | - rr[0] = (double)s; | |
| 36654 | - assert( sizeof(s2)==sizeof(rr[0]) ); | |
| 36655 | -#ifdef SQLITE_DEBUG | |
| 36656 | - rr[1] = 18446744073709549568.0; | |
| 36657 | - memcpy(&s2, &rr[1], sizeof(s2)); | |
| 36658 | - assert( s2==0x43efffffffffffffLL ); | |
| 36659 | -#endif | |
| 36660 | - /* Largest double that can be safely converted to u64 | |
| 36661 | - ** vvvvvvvvvvvvvvvvvvvvvv */ | |
| 36662 | - if( rr[0]<=18446744073709549568.0 ){ | |
| 36663 | - s2 = (u64)rr[0]; | |
| 36664 | - rr[1] = s>=s2 ? (double)(s - s2) : -(double)(s2 - s); | |
| 36665 | - }else{ | |
| 36666 | - rr[1] = 0.0; | |
| 36667 | - } | |
| 36668 | - assert( rr[1]<=1.0e-10*rr[0] ); /* Equal only when rr[0]==0.0 */ | |
| 36669 | - | |
| 36670 | - if( e>0 ){ | |
| 36671 | - while( e>=100 ){ | |
| 36672 | - e -= 100; | |
| 36673 | - dekkerMul2(rr, 1.0e+100, -1.5902891109759918046e+83); | |
| 36674 | - } | |
| 36675 | - while( e>=10 ){ | |
| 36676 | - e -= 10; | |
| 36677 | - dekkerMul2(rr, 1.0e+10, 0.0); | |
| 36678 | - } | |
| 36679 | - while( e>=1 ){ | |
| 36680 | - e -= 1; | |
| 36681 | - dekkerMul2(rr, 1.0e+01, 0.0); | |
| 36682 | - } | |
| 36683 | - }else{ | |
| 36684 | - while( e<=-100 ){ | |
| 36685 | - e += 100; | |
| 36686 | - dekkerMul2(rr, 1.0e-100, -1.99918998026028836196e-117); | |
| 36687 | - } | |
| 36688 | - while( e<=-10 ){ | |
| 36689 | - e += 10; | |
| 36690 | - dekkerMul2(rr, 1.0e-10, -3.6432197315497741579e-27); | |
| 36691 | - } | |
| 36692 | - while( e<=-1 ){ | |
| 36693 | - e += 1; | |
| 36694 | - dekkerMul2(rr, 1.0e-01, -5.5511151231257827021e-18); | |
| 36695 | - } | |
| 36696 | - } | |
| 36697 | - *pResult = rr[0]+rr[1]; | |
| 36698 | - if( sqlite3IsNaN(*pResult) ) *pResult = 1e300*1e300; | |
| 36852 | + *pResult = sqlite3Fp10Convert2(s,e); | |
| 36699 | 36853 | if( sign<0 ) *pResult = -*pResult; |
| 36700 | 36854 | assert( !sqlite3IsNaN(*pResult) ); |
| 36701 | 36855 | |
| 36702 | 36856 | atof_return: |
| 36703 | 36857 | /* return true if number and no extra non-whitespace characters after */ |
| @@ -37014,11 +37168,10 @@ | ||
| 37014 | 37168 | */ |
| 37015 | 37169 | SQLITE_PRIVATE void sqlite3FpDecode(FpDecode *p, double r, int iRound, int mxRound){ |
| 37016 | 37170 | int i; |
| 37017 | 37171 | u64 v; |
| 37018 | 37172 | int e, exp = 0; |
| 37019 | - double rr[2]; | |
| 37020 | 37173 | |
| 37021 | 37174 | p->isSpecial = 0; |
| 37022 | 37175 | p->z = p->zBuf; |
| 37023 | 37176 | assert( mxRound>0 ); |
| 37024 | 37177 | |
| @@ -37035,64 +37188,58 @@ | ||
| 37035 | 37188 | return; |
| 37036 | 37189 | }else{ |
| 37037 | 37190 | p->sign = '+'; |
| 37038 | 37191 | } |
| 37039 | 37192 | memcpy(&v,&r,8); |
| 37040 | - e = v>>52; | |
| 37041 | - if( (e&0x7ff)==0x7ff ){ | |
| 37193 | + e = (v>>52)&0x7ff; | |
| 37194 | + if( e==0x7ff ){ | |
| 37042 | 37195 | p->isSpecial = 1 + (v!=0x7ff0000000000000LL); |
| 37043 | 37196 | p->n = 0; |
| 37044 | 37197 | p->iDP = 0; |
| 37045 | 37198 | return; |
| 37046 | 37199 | } |
| 37047 | - | |
| 37048 | - /* Multiply r by powers of ten until it lands somewhere in between | |
| 37049 | - ** 1.0e+19 and 1.0e+17. | |
| 37050 | - ** | |
| 37051 | - ** Use Dekker-style double-double computation to increase the | |
| 37052 | - ** precision. | |
| 37053 | - ** | |
| 37054 | - ** The error terms on constants like 1.0e+100 computed using the | |
| 37055 | - ** decimal extension, for example as follows: | |
| 37056 | - ** | |
| 37057 | - ** SELECT decimal_exp(decimal_sub('1.0e+100',decimal(1.0e+100))); | |
| 37058 | - */ | |
| 37059 | - rr[0] = r; | |
| 37060 | - rr[1] = 0.0; | |
| 37061 | - if( rr[0]>9.223372036854774784e+18 ){ | |
| 37062 | - while( rr[0]>9.223372036854774784e+118 ){ | |
| 37063 | - exp += 100; | |
| 37064 | - dekkerMul2(rr, 1.0e-100, -1.99918998026028836196e-117); | |
| 37065 | - } | |
| 37066 | - while( rr[0]>9.223372036854774784e+28 ){ | |
| 37067 | - exp += 10; | |
| 37068 | - dekkerMul2(rr, 1.0e-10, -3.6432197315497741579e-27); | |
| 37069 | - } | |
| 37070 | - while( rr[0]>9.223372036854774784e+18 ){ | |
| 37071 | - exp += 1; | |
| 37072 | - dekkerMul2(rr, 1.0e-01, -5.5511151231257827021e-18); | |
| 37073 | - } | |
| 37200 | + v &= 0x000fffffffffffffULL; | |
| 37201 | + if( e==0 ){ | |
| 37202 | + int n = countLeadingZeros(v); | |
| 37203 | + v <<= n; | |
| 37204 | + e = -1074 - n; | |
| 37074 | 37205 | }else{ |
| 37075 | - while( rr[0]<9.223372036854774784e-83 ){ | |
| 37076 | - exp -= 100; | |
| 37077 | - dekkerMul2(rr, 1.0e+100, -1.5902891109759918046e+83); | |
| 37078 | - } | |
| 37079 | - while( rr[0]<9.223372036854774784e+07 ){ | |
| 37080 | - exp -= 10; | |
| 37081 | - dekkerMul2(rr, 1.0e+10, 0.0); | |
| 37082 | - } | |
| 37083 | - while( rr[0]<9.22337203685477478e+17 ){ | |
| 37084 | - exp -= 1; | |
| 37085 | - dekkerMul2(rr, 1.0e+01, 0.0); | |
| 37086 | - } | |
| 37087 | - } | |
| 37088 | - v = rr[1]<0.0 ? (u64)rr[0]-(u64)(-rr[1]) : (u64)rr[0]+(u64)rr[1]; | |
| 37206 | + v = (v<<11) | U64_BIT(63); | |
| 37207 | + e -= 1086; | |
| 37208 | + } | |
| 37209 | + sqlite3Fp2Convert10(v, e, 17, &v, &exp); | |
| 37089 | 37210 | |
| 37090 | 37211 | /* Extract significant digits. */ |
| 37091 | 37212 | i = sizeof(p->zBuf)-1; |
| 37092 | 37213 | assert( v>0 ); |
| 37093 | - while( v ){ p->zBuf[i--] = (v%10) + '0'; v /= 10; } | |
| 37214 | + while( v>=10 ){ | |
| 37215 | + static const union { | |
| 37216 | + char a[200]; | |
| 37217 | + short int forAlignment; | |
| 37218 | + } dig = { | |
| 37219 | + "00010203040506070809" | |
| 37220 | + "10111213141516171819" | |
| 37221 | + "20212223242526272829" | |
| 37222 | + "30313233343536373839" | |
| 37223 | + "40414243444546474849" | |
| 37224 | + "50515253545556575859" | |
| 37225 | + "60616263646566676869" | |
| 37226 | + "70717273747576777879" | |
| 37227 | + "80818283848586878889" | |
| 37228 | + "90919293949596979899" | |
| 37229 | + }; | |
| 37230 | + int kk = (v%100)*2; | |
| 37231 | + assert( TWO_BYTE_ALIGNMENT(&dig.a[kk]) ); | |
| 37232 | + assert( TWO_BYTE_ALIGNMENT(&p->zBuf[i-1]) ); | |
| 37233 | + *(u16*)(&p->zBuf[i-1]) = *(u16*)&dig.a[kk]; | |
| 37234 | + i -= 2; | |
| 37235 | + v /= 100; | |
| 37236 | + } | |
| 37237 | + if( v ){ | |
| 37238 | + assert( v<10 ); | |
| 37239 | + p->zBuf[i--] = v + '0'; | |
| 37240 | + } | |
| 37094 | 37241 | assert( i>=0 && i<sizeof(p->zBuf)-1 ); |
| 37095 | 37242 | p->n = sizeof(p->zBuf) - 1 - i; |
| 37096 | 37243 | assert( p->n>0 ); |
| 37097 | 37244 | assert( p->n<sizeof(p->zBuf) ); |
| 37098 | 37245 | p->iDP = p->n + exp; |
| @@ -127706,17 +127853,18 @@ | ||
| 127706 | 127853 | ** |
| 127707 | 127854 | ** zName is temporarily modified while this routine is running, but is |
| 127708 | 127855 | ** restored to its original value prior to this routine returning. |
| 127709 | 127856 | */ |
| 127710 | 127857 | SQLITE_PRIVATE int sqlite3ShadowTableName(sqlite3 *db, const char *zName){ |
| 127711 | - char *zTail; /* Pointer to the last "_" in zName */ | |
| 127858 | + const char *zTail; /* Pointer to the last "_" in zName */ | |
| 127712 | 127859 | Table *pTab; /* Table that zName is a shadow of */ |
| 127860 | + char *zCopy; | |
| 127713 | 127861 | zTail = strrchr(zName, '_'); |
| 127714 | 127862 | if( zTail==0 ) return 0; |
| 127715 | - *zTail = 0; | |
| 127716 | - pTab = sqlite3FindTable(db, zName, 0); | |
| 127717 | - *zTail = '_'; | |
| 127863 | + zCopy = sqlite3DbStrNDup(db, zName, (int)(zTail-zName)); | |
| 127864 | + pTab = zCopy ? sqlite3FindTable(db, zCopy, 0) : 0; | |
| 127865 | + sqlite3DbFree(db, zCopy); | |
| 127718 | 127866 | if( pTab==0 ) return 0; |
| 127719 | 127867 | if( !IsVirtual(pTab) ) return 0; |
| 127720 | 127868 | return sqlite3IsShadowTableOf(db, pTab, zName); |
| 127721 | 127869 | } |
| 127722 | 127870 | #endif /* ifndef SQLITE_OMIT_VIRTUALTABLE */ |
| @@ -129756,10 +129904,11 @@ | ||
| 129756 | 129904 | sqlite3ErrorMsg(pParse, "index associated with UNIQUE " |
| 129757 | 129905 | "or PRIMARY KEY constraint cannot be dropped", 0); |
| 129758 | 129906 | goto exit_drop_index; |
| 129759 | 129907 | } |
| 129760 | 129908 | iDb = sqlite3SchemaToIndex(db, pIndex->pSchema); |
| 129909 | + assert( iDb>=0 && iDb<db->nDb ); | |
| 129761 | 129910 | #ifndef SQLITE_OMIT_AUTHORIZATION |
| 129762 | 129911 | { |
| 129763 | 129912 | int code = SQLITE_DROP_INDEX; |
| 129764 | 129913 | Table *pTab = pIndex->pTable; |
| 129765 | 129914 | const char *zDb = db->aDb[iDb].zDbSName; |
| @@ -133737,11 +133886,11 @@ | ||
| 133737 | 133886 | sqlite3_result_error_nomem(context); |
| 133738 | 133887 | return; |
| 133739 | 133888 | } |
| 133740 | 133889 | i = j = 0; |
| 133741 | 133890 | while( i<nIn ){ |
| 133742 | - char *z = strchr(&zIn[i],'\\'); | |
| 133891 | + const char *z = strchr(&zIn[i],'\\'); | |
| 133743 | 133892 | if( z==0 ){ |
| 133744 | 133893 | n = nIn - i; |
| 133745 | 133894 | memmove(&zOut[j], &zIn[i], n); |
| 133746 | 133895 | j += n; |
| 133747 | 133896 | break; |
| @@ -136908,10 +137057,11 @@ | ||
| 136908 | 137057 | /* If foreign-keys are disabled, this function is a no-op. */ |
| 136909 | 137058 | if( (db->flags&SQLITE_ForeignKeys)==0 ) return; |
| 136910 | 137059 | if( !IsOrdinaryTable(pTab) ) return; |
| 136911 | 137060 | |
| 136912 | 137061 | iDb = sqlite3SchemaToIndex(db, pTab->pSchema); |
| 137062 | + assert( iDb>=00 && iDb<db->nDb ); | |
| 136913 | 137063 | zDb = db->aDb[iDb].zDbSName; |
| 136914 | 137064 | |
| 136915 | 137065 | /* Loop through all the foreign key constraints for which pTab is the |
| 136916 | 137066 | ** child table (the table that the foreign key definition is part of). */ |
| 136917 | 137067 | for(pFKey=pTab->u.tab.pFKey; pFKey; pFKey=pFKey->pNextFrom){ |
| @@ -157109,10 +157259,11 @@ | ||
| 157109 | 157259 | |
| 157110 | 157260 | pParse->pNewTrigger = 0; |
| 157111 | 157261 | if( NEVER(pParse->nErr) || !pTrig ) goto triggerfinish_cleanup; |
| 157112 | 157262 | zName = pTrig->zName; |
| 157113 | 157263 | iDb = sqlite3SchemaToIndex(pParse->db, pTrig->pSchema); |
| 157264 | + assert( iDb>=00 && iDb<db->nDb ); | |
| 157114 | 157265 | pTrig->step_list = pStepList; |
| 157115 | 157266 | while( pStepList ){ |
| 157116 | 157267 | pStepList->pTrig = pTrig; |
| 157117 | 157268 | pStepList = pStepList->pNext; |
| 157118 | 157269 | } |
| @@ -261547,11 +261698,11 @@ | ||
| 261547 | 261698 | int nArg, /* Number of args */ |
| 261548 | 261699 | sqlite3_value **apUnused /* Function arguments */ |
| 261549 | 261700 | ){ |
| 261550 | 261701 | assert( nArg==0 ); |
| 261551 | 261702 | UNUSED_PARAM2(nArg, apUnused); |
| 261552 | - sqlite3_result_text(pCtx, "fts5: 2026-02-11 19:42:46 38d8c0d8a0b0e9990ba7bdcce979f2824ffee22a083cb788a75917628b1eb559", -1, SQLITE_TRANSIENT); | |
| 261703 | + sqlite3_result_text(pCtx, "fts5: 2026-02-13 16:02:27 d62999907d5f5987fe0030e1a4a7144c898e55595ac116eec966741a5099322b", -1, SQLITE_TRANSIENT); | |
| 261553 | 261704 | } |
| 261554 | 261705 | |
| 261555 | 261706 | /* |
| 261556 | 261707 | ** Implementation of fts5_locale(LOCALE, TEXT) function. |
| 261557 | 261708 | ** |
| 261558 | 261709 |
| --- 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 | ** b67889e4f17c3280f839ee7045256cc47d6c with changes in files: |
| 22 | ** |
| 23 | ** |
| 24 | */ |
| 25 | #ifndef SQLITE_AMALGAMATION |
| 26 | #define SQLITE_CORE 1 |
| @@ -467,14 +467,14 @@ | |
| 467 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 468 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 469 | */ |
| 470 | #define SQLITE_VERSION "3.52.0" |
| 471 | #define SQLITE_VERSION_NUMBER 3052000 |
| 472 | #define SQLITE_SOURCE_ID "2026-02-10 19:33:11 b67889e4f17c3280f839ee7045256cc47d6ce3ed60d880925e3d30f9ebbcf3ff" |
| 473 | #define SQLITE_SCM_BRANCH "trunk" |
| 474 | #define SQLITE_SCM_TAGS "" |
| 475 | #define SQLITE_SCM_DATETIME "2026-02-10T19:33:11.305Z" |
| 476 | |
| 477 | /* |
| 478 | ** CAPI3REF: Run-Time Library Version Numbers |
| 479 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 480 | ** |
| @@ -15836,10 +15836,11 @@ | |
| 15836 | #ifdef SQLITE_4_BYTE_ALIGNED_MALLOC |
| 15837 | # define EIGHT_BYTE_ALIGNMENT(X) ((((uptr)(X) - (uptr)0)&3)==0) |
| 15838 | #else |
| 15839 | # define EIGHT_BYTE_ALIGNMENT(X) ((((uptr)(X) - (uptr)0)&7)==0) |
| 15840 | #endif |
| 15841 | |
| 15842 | /* |
| 15843 | ** Disable MMAP on platforms where it is known to not work |
| 15844 | */ |
| 15845 | #if defined(__OpenBSD__) || defined(__QNXNTO__) |
| @@ -20616,33 +20617,33 @@ | |
| 20616 | int rc; /* Return code from execution */ |
| 20617 | LogEst nQueryLoop; /* Est number of iterations of a query (10*log2(N)) */ |
| 20618 | u8 nested; /* Number of nested calls to the parser/code generator */ |
| 20619 | u8 nTempReg; /* Number of temporary registers in aTempReg[] */ |
| 20620 | u8 isMultiWrite; /* True if statement may modify/insert multiple rows */ |
| 20621 | u8 mayAbort; /* True if statement may throw an ABORT exception */ |
| 20622 | u8 hasCompound; /* Need to invoke convertCompoundSelectToSubquery() */ |
| 20623 | u8 disableLookaside; /* Number of times lookaside has been disabled */ |
| 20624 | u8 prepFlags; /* SQLITE_PREPARE_* flags */ |
| 20625 | u8 withinRJSubrtn; /* Nesting level for RIGHT JOIN body subroutines */ |
| 20626 | u8 bHasExists; /* Has a correlated "EXISTS (SELECT ....)" expression */ |
| 20627 | u8 mSubrtnSig; /* mini Bloom filter on available SubrtnSig.selId */ |
| 20628 | u8 eTriggerOp; /* TK_UPDATE, TK_INSERT or TK_DELETE */ |
| 20629 | u8 bReturning; /* Coding a RETURNING trigger */ |
| 20630 | u8 eOrconf; /* Default ON CONFLICT policy for trigger steps */ |
| 20631 | u8 disableTriggers; /* True to disable triggers */ |
| 20632 | #if defined(SQLITE_DEBUG) || defined(SQLITE_COVERAGE_TEST) |
| 20633 | u8 earlyCleanup; /* OOM inside sqlite3ParserAddCleanup() */ |
| 20634 | #endif |
| 20635 | #ifdef SQLITE_DEBUG |
| 20636 | u8 ifNotExists; /* Might be true if IF NOT EXISTS. Assert()s only */ |
| 20637 | u8 isCreate; /* CREATE TABLE, INDEX, or VIEW (but not TRIGGER) |
| 20638 | ** and ALTER TABLE ADD COLUMN. */ |
| 20639 | #endif |
| 20640 | bft colNamesSet :1; /* TRUE after OP_ColumnName has been issued to pVdbe */ |
| 20641 | bft bHasWith :1; /* True if statement contains WITH */ |
| 20642 | bft okConstFactor :1; /* OK to factor out constants */ |
| 20643 | bft checkSchema :1; /* Causes schema cookie check after an error */ |
| 20644 | int nRangeReg; /* Size of the temporary register block */ |
| 20645 | int iRangeReg; /* First register in temporary register block */ |
| 20646 | int nErr; /* Number of errors seen */ |
| 20647 | int nTab; /* Number of previously allocated VDBE cursors */ |
| 20648 | int nMem; /* Number of memory cells used so far */ |
| @@ -36454,44 +36455,254 @@ | |
| 36454 | z++; |
| 36455 | } |
| 36456 | return h; |
| 36457 | } |
| 36458 | |
| 36459 | /* Double-Double multiplication. (x[0],x[1]) *= (y,yy) |
| 36460 | ** |
| 36461 | ** Reference: |
| 36462 | ** T. J. Dekker, "A Floating-Point Technique for Extending the |
| 36463 | ** Available Precision". 1971-07-26. |
| 36464 | */ |
| 36465 | static void dekkerMul2(volatile double *x, double y, double yy){ |
| 36466 | /* |
| 36467 | ** The "volatile" keywords on parameter x[] and on local variables |
| 36468 | ** below are needed force intermediate results to be truncated to |
| 36469 | ** binary64 rather than be carried around in an extended-precision |
| 36470 | ** format. The truncation is necessary for the Dekker algorithm to |
| 36471 | ** work. Intel x86 floating point might omit the truncation without |
| 36472 | ** the use of volatile. |
| 36473 | */ |
| 36474 | volatile double tx, ty, p, q, c, cc; |
| 36475 | double hx, hy; |
| 36476 | u64 m; |
| 36477 | memcpy(&m, (void*)&x[0], 8); |
| 36478 | m &= 0xfffffffffc000000LL; |
| 36479 | memcpy(&hx, &m, 8); |
| 36480 | tx = x[0] - hx; |
| 36481 | memcpy(&m, &y, 8); |
| 36482 | m &= 0xfffffffffc000000LL; |
| 36483 | memcpy(&hy, &m, 8); |
| 36484 | ty = y - hy; |
| 36485 | p = hx*hy; |
| 36486 | q = hx*ty + tx*hy; |
| 36487 | c = p+q; |
| 36488 | cc = p - c + q + tx*ty; |
| 36489 | cc = x[0]*yy + x[1]*y + cc; |
| 36490 | x[0] = c + cc; |
| 36491 | x[1] = c - x[0]; |
| 36492 | x[1] += cc; |
| 36493 | } |
| 36494 | |
| 36495 | /* |
| 36496 | ** The string z[] is an text representation of a real number. |
| 36497 | ** Convert this string to a double and write it into *pResult. |
| @@ -36535,12 +36746,10 @@ | |
| 36535 | int esign = 1; /* sign of exponent */ |
| 36536 | int e = 0; /* exponent */ |
| 36537 | int eValid = 1; /* True exponent is either not used or is well-formed */ |
| 36538 | int nDigit = 0; /* Number of digits processed */ |
| 36539 | int eType = 1; /* 1: pure integer, 2+: fractional -1 or less: bad UTF16 */ |
| 36540 | u64 s2; /* round-tripped significand */ |
| 36541 | double rr[2]; |
| 36542 | |
| 36543 | assert( enc==SQLITE_UTF8 || enc==SQLITE_UTF16LE || enc==SQLITE_UTF16BE ); |
| 36544 | *pResult = 0.0; /* Default return value, in case of an error */ |
| 36545 | if( length==0 ) return 0; |
| 36546 | |
| @@ -36574,11 +36783,11 @@ | |
| 36574 | |
| 36575 | /* copy max significant digits to significand */ |
| 36576 | while( z<zEnd && sqlite3Isdigit(*z) ){ |
| 36577 | s = s*10 + (*z - '0'); |
| 36578 | z+=incr; nDigit++; |
| 36579 | if( s>=((LARGEST_UINT64-9)/10) ){ |
| 36580 | /* skip non-significant significand digits |
| 36581 | ** (increase exponent by d to shift decimal left) */ |
| 36582 | while( z<zEnd && sqlite3Isdigit(*z) ){ z+=incr; d++; } |
| 36583 | } |
| 36584 | } |
| @@ -36589,11 +36798,11 @@ | |
| 36589 | z+=incr; |
| 36590 | eType++; |
| 36591 | /* copy digits from after decimal to significand |
| 36592 | ** (decrease exponent by d to shift decimal right) */ |
| 36593 | while( z<zEnd && sqlite3Isdigit(*z) ){ |
| 36594 | if( s<((LARGEST_UINT64-9)/10) ){ |
| 36595 | s = s*10 + (*z - '0'); |
| 36596 | d--; |
| 36597 | nDigit++; |
| 36598 | } |
| 36599 | z+=incr; |
| @@ -36638,66 +36847,11 @@ | |
| 36638 | } |
| 36639 | |
| 36640 | /* adjust exponent by d, and update sign */ |
| 36641 | e = (e*esign) + d; |
| 36642 | |
| 36643 | /* Try to adjust the exponent to make it smaller */ |
| 36644 | while( e>0 && s<((LARGEST_UINT64-0x7ff)/10) ){ |
| 36645 | s *= 10; |
| 36646 | e--; |
| 36647 | } |
| 36648 | while( e<0 && (s%10)==0 ){ |
| 36649 | s /= 10; |
| 36650 | e++; |
| 36651 | } |
| 36652 | |
| 36653 | rr[0] = (double)s; |
| 36654 | assert( sizeof(s2)==sizeof(rr[0]) ); |
| 36655 | #ifdef SQLITE_DEBUG |
| 36656 | rr[1] = 18446744073709549568.0; |
| 36657 | memcpy(&s2, &rr[1], sizeof(s2)); |
| 36658 | assert( s2==0x43efffffffffffffLL ); |
| 36659 | #endif |
| 36660 | /* Largest double that can be safely converted to u64 |
| 36661 | ** vvvvvvvvvvvvvvvvvvvvvv */ |
| 36662 | if( rr[0]<=18446744073709549568.0 ){ |
| 36663 | s2 = (u64)rr[0]; |
| 36664 | rr[1] = s>=s2 ? (double)(s - s2) : -(double)(s2 - s); |
| 36665 | }else{ |
| 36666 | rr[1] = 0.0; |
| 36667 | } |
| 36668 | assert( rr[1]<=1.0e-10*rr[0] ); /* Equal only when rr[0]==0.0 */ |
| 36669 | |
| 36670 | if( e>0 ){ |
| 36671 | while( e>=100 ){ |
| 36672 | e -= 100; |
| 36673 | dekkerMul2(rr, 1.0e+100, -1.5902891109759918046e+83); |
| 36674 | } |
| 36675 | while( e>=10 ){ |
| 36676 | e -= 10; |
| 36677 | dekkerMul2(rr, 1.0e+10, 0.0); |
| 36678 | } |
| 36679 | while( e>=1 ){ |
| 36680 | e -= 1; |
| 36681 | dekkerMul2(rr, 1.0e+01, 0.0); |
| 36682 | } |
| 36683 | }else{ |
| 36684 | while( e<=-100 ){ |
| 36685 | e += 100; |
| 36686 | dekkerMul2(rr, 1.0e-100, -1.99918998026028836196e-117); |
| 36687 | } |
| 36688 | while( e<=-10 ){ |
| 36689 | e += 10; |
| 36690 | dekkerMul2(rr, 1.0e-10, -3.6432197315497741579e-27); |
| 36691 | } |
| 36692 | while( e<=-1 ){ |
| 36693 | e += 1; |
| 36694 | dekkerMul2(rr, 1.0e-01, -5.5511151231257827021e-18); |
| 36695 | } |
| 36696 | } |
| 36697 | *pResult = rr[0]+rr[1]; |
| 36698 | if( sqlite3IsNaN(*pResult) ) *pResult = 1e300*1e300; |
| 36699 | if( sign<0 ) *pResult = -*pResult; |
| 36700 | assert( !sqlite3IsNaN(*pResult) ); |
| 36701 | |
| 36702 | atof_return: |
| 36703 | /* return true if number and no extra non-whitespace characters after */ |
| @@ -37014,11 +37168,10 @@ | |
| 37014 | */ |
| 37015 | SQLITE_PRIVATE void sqlite3FpDecode(FpDecode *p, double r, int iRound, int mxRound){ |
| 37016 | int i; |
| 37017 | u64 v; |
| 37018 | int e, exp = 0; |
| 37019 | double rr[2]; |
| 37020 | |
| 37021 | p->isSpecial = 0; |
| 37022 | p->z = p->zBuf; |
| 37023 | assert( mxRound>0 ); |
| 37024 | |
| @@ -37035,64 +37188,58 @@ | |
| 37035 | return; |
| 37036 | }else{ |
| 37037 | p->sign = '+'; |
| 37038 | } |
| 37039 | memcpy(&v,&r,8); |
| 37040 | e = v>>52; |
| 37041 | if( (e&0x7ff)==0x7ff ){ |
| 37042 | p->isSpecial = 1 + (v!=0x7ff0000000000000LL); |
| 37043 | p->n = 0; |
| 37044 | p->iDP = 0; |
| 37045 | return; |
| 37046 | } |
| 37047 | |
| 37048 | /* Multiply r by powers of ten until it lands somewhere in between |
| 37049 | ** 1.0e+19 and 1.0e+17. |
| 37050 | ** |
| 37051 | ** Use Dekker-style double-double computation to increase the |
| 37052 | ** precision. |
| 37053 | ** |
| 37054 | ** The error terms on constants like 1.0e+100 computed using the |
| 37055 | ** decimal extension, for example as follows: |
| 37056 | ** |
| 37057 | ** SELECT decimal_exp(decimal_sub('1.0e+100',decimal(1.0e+100))); |
| 37058 | */ |
| 37059 | rr[0] = r; |
| 37060 | rr[1] = 0.0; |
| 37061 | if( rr[0]>9.223372036854774784e+18 ){ |
| 37062 | while( rr[0]>9.223372036854774784e+118 ){ |
| 37063 | exp += 100; |
| 37064 | dekkerMul2(rr, 1.0e-100, -1.99918998026028836196e-117); |
| 37065 | } |
| 37066 | while( rr[0]>9.223372036854774784e+28 ){ |
| 37067 | exp += 10; |
| 37068 | dekkerMul2(rr, 1.0e-10, -3.6432197315497741579e-27); |
| 37069 | } |
| 37070 | while( rr[0]>9.223372036854774784e+18 ){ |
| 37071 | exp += 1; |
| 37072 | dekkerMul2(rr, 1.0e-01, -5.5511151231257827021e-18); |
| 37073 | } |
| 37074 | }else{ |
| 37075 | while( rr[0]<9.223372036854774784e-83 ){ |
| 37076 | exp -= 100; |
| 37077 | dekkerMul2(rr, 1.0e+100, -1.5902891109759918046e+83); |
| 37078 | } |
| 37079 | while( rr[0]<9.223372036854774784e+07 ){ |
| 37080 | exp -= 10; |
| 37081 | dekkerMul2(rr, 1.0e+10, 0.0); |
| 37082 | } |
| 37083 | while( rr[0]<9.22337203685477478e+17 ){ |
| 37084 | exp -= 1; |
| 37085 | dekkerMul2(rr, 1.0e+01, 0.0); |
| 37086 | } |
| 37087 | } |
| 37088 | v = rr[1]<0.0 ? (u64)rr[0]-(u64)(-rr[1]) : (u64)rr[0]+(u64)rr[1]; |
| 37089 | |
| 37090 | /* Extract significant digits. */ |
| 37091 | i = sizeof(p->zBuf)-1; |
| 37092 | assert( v>0 ); |
| 37093 | while( v ){ p->zBuf[i--] = (v%10) + '0'; v /= 10; } |
| 37094 | assert( i>=0 && i<sizeof(p->zBuf)-1 ); |
| 37095 | p->n = sizeof(p->zBuf) - 1 - i; |
| 37096 | assert( p->n>0 ); |
| 37097 | assert( p->n<sizeof(p->zBuf) ); |
| 37098 | p->iDP = p->n + exp; |
| @@ -127706,17 +127853,18 @@ | |
| 127706 | ** |
| 127707 | ** zName is temporarily modified while this routine is running, but is |
| 127708 | ** restored to its original value prior to this routine returning. |
| 127709 | */ |
| 127710 | SQLITE_PRIVATE int sqlite3ShadowTableName(sqlite3 *db, const char *zName){ |
| 127711 | char *zTail; /* Pointer to the last "_" in zName */ |
| 127712 | Table *pTab; /* Table that zName is a shadow of */ |
| 127713 | zTail = strrchr(zName, '_'); |
| 127714 | if( zTail==0 ) return 0; |
| 127715 | *zTail = 0; |
| 127716 | pTab = sqlite3FindTable(db, zName, 0); |
| 127717 | *zTail = '_'; |
| 127718 | if( pTab==0 ) return 0; |
| 127719 | if( !IsVirtual(pTab) ) return 0; |
| 127720 | return sqlite3IsShadowTableOf(db, pTab, zName); |
| 127721 | } |
| 127722 | #endif /* ifndef SQLITE_OMIT_VIRTUALTABLE */ |
| @@ -129756,10 +129904,11 @@ | |
| 129756 | sqlite3ErrorMsg(pParse, "index associated with UNIQUE " |
| 129757 | "or PRIMARY KEY constraint cannot be dropped", 0); |
| 129758 | goto exit_drop_index; |
| 129759 | } |
| 129760 | iDb = sqlite3SchemaToIndex(db, pIndex->pSchema); |
| 129761 | #ifndef SQLITE_OMIT_AUTHORIZATION |
| 129762 | { |
| 129763 | int code = SQLITE_DROP_INDEX; |
| 129764 | Table *pTab = pIndex->pTable; |
| 129765 | const char *zDb = db->aDb[iDb].zDbSName; |
| @@ -133737,11 +133886,11 @@ | |
| 133737 | sqlite3_result_error_nomem(context); |
| 133738 | return; |
| 133739 | } |
| 133740 | i = j = 0; |
| 133741 | while( i<nIn ){ |
| 133742 | char *z = strchr(&zIn[i],'\\'); |
| 133743 | if( z==0 ){ |
| 133744 | n = nIn - i; |
| 133745 | memmove(&zOut[j], &zIn[i], n); |
| 133746 | j += n; |
| 133747 | break; |
| @@ -136908,10 +137057,11 @@ | |
| 136908 | /* If foreign-keys are disabled, this function is a no-op. */ |
| 136909 | if( (db->flags&SQLITE_ForeignKeys)==0 ) return; |
| 136910 | if( !IsOrdinaryTable(pTab) ) return; |
| 136911 | |
| 136912 | iDb = sqlite3SchemaToIndex(db, pTab->pSchema); |
| 136913 | zDb = db->aDb[iDb].zDbSName; |
| 136914 | |
| 136915 | /* Loop through all the foreign key constraints for which pTab is the |
| 136916 | ** child table (the table that the foreign key definition is part of). */ |
| 136917 | for(pFKey=pTab->u.tab.pFKey; pFKey; pFKey=pFKey->pNextFrom){ |
| @@ -157109,10 +157259,11 @@ | |
| 157109 | |
| 157110 | pParse->pNewTrigger = 0; |
| 157111 | if( NEVER(pParse->nErr) || !pTrig ) goto triggerfinish_cleanup; |
| 157112 | zName = pTrig->zName; |
| 157113 | iDb = sqlite3SchemaToIndex(pParse->db, pTrig->pSchema); |
| 157114 | pTrig->step_list = pStepList; |
| 157115 | while( pStepList ){ |
| 157116 | pStepList->pTrig = pTrig; |
| 157117 | pStepList = pStepList->pNext; |
| 157118 | } |
| @@ -261547,11 +261698,11 @@ | |
| 261547 | int nArg, /* Number of args */ |
| 261548 | sqlite3_value **apUnused /* Function arguments */ |
| 261549 | ){ |
| 261550 | assert( nArg==0 ); |
| 261551 | UNUSED_PARAM2(nArg, apUnused); |
| 261552 | sqlite3_result_text(pCtx, "fts5: 2026-02-11 19:42:46 38d8c0d8a0b0e9990ba7bdcce979f2824ffee22a083cb788a75917628b1eb559", -1, SQLITE_TRANSIENT); |
| 261553 | } |
| 261554 | |
| 261555 | /* |
| 261556 | ** Implementation of fts5_locale(LOCALE, TEXT) function. |
| 261557 | ** |
| 261558 |
| --- 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 | ** b5ebbd004183f81902fa79a143222204b33d with changes in files: |
| 22 | ** |
| 23 | ** |
| 24 | */ |
| 25 | #ifndef SQLITE_AMALGAMATION |
| 26 | #define SQLITE_CORE 1 |
| @@ -467,14 +467,14 @@ | |
| 467 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 468 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 469 | */ |
| 470 | #define SQLITE_VERSION "3.52.0" |
| 471 | #define SQLITE_VERSION_NUMBER 3052000 |
| 472 | #define SQLITE_SOURCE_ID "2026-02-16 11:14:59 b5ebbd004183f81902fa79a143222204b33dbe1cacb918194556b8dac67bd567" |
| 473 | #define SQLITE_SCM_BRANCH "trunk" |
| 474 | #define SQLITE_SCM_TAGS "" |
| 475 | #define SQLITE_SCM_DATETIME "2026-02-16T11:14:59.370Z" |
| 476 | |
| 477 | /* |
| 478 | ** CAPI3REF: Run-Time Library Version Numbers |
| 479 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 480 | ** |
| @@ -15836,10 +15836,11 @@ | |
| 15836 | #ifdef SQLITE_4_BYTE_ALIGNED_MALLOC |
| 15837 | # define EIGHT_BYTE_ALIGNMENT(X) ((((uptr)(X) - (uptr)0)&3)==0) |
| 15838 | #else |
| 15839 | # define EIGHT_BYTE_ALIGNMENT(X) ((((uptr)(X) - (uptr)0)&7)==0) |
| 15840 | #endif |
| 15841 | #define TWO_BYTE_ALIGNMENT(X) ((((uptr)(X) - (uptr)0)&1)==0) |
| 15842 | |
| 15843 | /* |
| 15844 | ** Disable MMAP on platforms where it is known to not work |
| 15845 | */ |
| 15846 | #if defined(__OpenBSD__) || defined(__QNXNTO__) |
| @@ -20616,33 +20617,33 @@ | |
| 20617 | int rc; /* Return code from execution */ |
| 20618 | LogEst nQueryLoop; /* Est number of iterations of a query (10*log2(N)) */ |
| 20619 | u8 nested; /* Number of nested calls to the parser/code generator */ |
| 20620 | u8 nTempReg; /* Number of temporary registers in aTempReg[] */ |
| 20621 | u8 isMultiWrite; /* True if statement may modify/insert multiple rows */ |
| 20622 | u8 disableLookaside; /* Number of times lookaside has been disabled */ |
| 20623 | u8 prepFlags; /* SQLITE_PREPARE_* flags */ |
| 20624 | u8 withinRJSubrtn; /* Nesting level for RIGHT JOIN body subroutines */ |
| 20625 | u8 mSubrtnSig; /* mini Bloom filter on available SubrtnSig.selId */ |
| 20626 | u8 eTriggerOp; /* TK_UPDATE, TK_INSERT or TK_DELETE */ |
| 20627 | u8 eOrconf; /* Default ON CONFLICT policy for trigger steps */ |
| 20628 | #if defined(SQLITE_DEBUG) || defined(SQLITE_COVERAGE_TEST) |
| 20629 | u8 earlyCleanup; /* OOM inside sqlite3ParserAddCleanup() */ |
| 20630 | #endif |
| 20631 | #ifdef SQLITE_DEBUG |
| 20632 | u8 ifNotExists; /* Might be true if IF NOT EXISTS. Assert()s only */ |
| 20633 | u8 isCreate; /* CREATE TABLE, INDEX, or VIEW (but not TRIGGER) |
| 20634 | ** and ALTER TABLE ADD COLUMN. */ |
| 20635 | #endif |
| 20636 | bft disableTriggers:1; /* True to disable triggers */ |
| 20637 | bft mayAbort :1; /* True if statement may throw an ABORT exception */ |
| 20638 | bft hasCompound :1; /* Need to invoke convertCompoundSelectToSubquery() */ |
| 20639 | bft bReturning :1; /* Coding a RETURNING trigger */ |
| 20640 | bft bHasExists :1; /* Has a correlated "EXISTS (SELECT ....)" expression */ |
| 20641 | bft colNamesSet :1; /* TRUE after OP_ColumnName has been issued to pVdbe */ |
| 20642 | bft bHasWith :1; /* True if statement contains WITH */ |
| 20643 | bft okConstFactor:1; /* OK to factor out constants */ |
| 20644 | bft checkSchema :1; /* Causes schema cookie check after an error */ |
| 20645 | int nRangeReg; /* Size of the temporary register block */ |
| 20646 | int iRangeReg; /* First register in temporary register block */ |
| 20647 | int nErr; /* Number of errors seen */ |
| 20648 | int nTab; /* Number of previously allocated VDBE cursors */ |
| 20649 | int nMem; /* Number of memory cells used so far */ |
| @@ -36454,44 +36455,254 @@ | |
| 36455 | z++; |
| 36456 | } |
| 36457 | return h; |
| 36458 | } |
| 36459 | |
| 36460 | /* |
| 36461 | ** Two inputs are multiplied to get a 128-bit result. Return |
| 36462 | ** the high-order 64 bits of that result. |
| 36463 | */ |
| 36464 | static u64 sqlite3Multiply128(u64 a, u64 b){ |
| 36465 | #if (defined(__GNUC__) || defined(__clang__)) \ |
| 36466 | && (defined(__x86_64__) || defined(__aarch64__) || defined(__riscv)) |
| 36467 | return ((__uint128_t)a * b) >> 64; |
| 36468 | #elif defined(_MSC_VER) && defined(_M_X64) |
| 36469 | return __umulh(a, b); |
| 36470 | #else |
| 36471 | u64 a1 = (u32)a; |
| 36472 | u64 a2 = a >> 32; |
| 36473 | u64 b1 = (u32)b; |
| 36474 | u64 b2 = b >> 32; |
| 36475 | u64 p0 = a1 * b1; |
| 36476 | u64 p1 = a1 * b2; |
| 36477 | u64 p2 = a2 * b1; |
| 36478 | u64 p3 = a2 * b2; |
| 36479 | u64 carry = ((p0 >> 32) + (u32)p1 + (u32)p2) >> 32; |
| 36480 | return p3 + (p1 >> 32) + (p2 >> 32) + carry; |
| 36481 | #endif |
| 36482 | } |
| 36483 | |
| 36484 | /* |
| 36485 | ** Return a u64 with the N-th bit set. |
| 36486 | */ |
| 36487 | #define U64_BIT(N) (((u64)1)<<(N)) |
| 36488 | |
| 36489 | /* |
| 36490 | ** Range of powers of 10 that we need to deal with when converting |
| 36491 | ** IEEE754 doubles to and from decimal. |
| 36492 | */ |
| 36493 | #define POWERSOF10_FIRST (-348) |
| 36494 | #define POWERSOF10_LAST (+347) |
| 36495 | |
| 36496 | /* |
| 36497 | ** For any p between -348 and +347, return the integer part of |
| 36498 | ** |
| 36499 | ** pow(10,p) * pow(2,63-pow10to2(p)) |
| 36500 | ** |
| 36501 | ** Or, in other words, for any p in range, return the most significant |
| 36502 | ** 64 bits of pow(10,p). The pow(10,p) value is shifted left or right, |
| 36503 | ** as appropriate so the most significant 64 bits fit exactly into a |
| 36504 | ** 64-bit unsigned integer. |
| 36505 | ** |
| 36506 | ** Algorithm: |
| 36507 | ** |
| 36508 | ** (1) For p between 0 and 26, return the value directly from the aBase[] |
| 36509 | ** lookup table. |
| 36510 | ** |
| 36511 | ** (2) For p outside the range 0 to 26, use aScale[] for the initial value |
| 36512 | ** then refine that result (if necessary) by a single multiplication |
| 36513 | ** against aBase[]. |
| 36514 | */ |
| 36515 | static u64 powerOfTen(int p){ |
| 36516 | static const u64 aBase[] = { |
| 36517 | 0x8000000000000000LLU, /* 0: 1.0e+0 << 63 */ |
| 36518 | 0xa000000000000000LLU, /* 1: 1.0e+1 << 60 */ |
| 36519 | 0xc800000000000000LLU, /* 2: 1.0e+2 << 57 */ |
| 36520 | 0xfa00000000000000LLU, /* 3: 1.0e+3 << 54 */ |
| 36521 | 0x9c40000000000000LLU, /* 4: 1.0e+4 << 50 */ |
| 36522 | 0xc350000000000000LLU, /* 5: 1.0e+5 << 47 */ |
| 36523 | 0xf424000000000000LLU, /* 6: 1.0e+6 << 44 */ |
| 36524 | 0x9896800000000000LLU, /* 7: 1.0e+7 << 40 */ |
| 36525 | 0xbebc200000000000LLU, /* 8: 1.0e+8 << 37 */ |
| 36526 | 0xee6b280000000000LLU, /* 9: 1.0e+9 << 34 */ |
| 36527 | 0x9502f90000000000LLU, /* 10: 1.0e+10 << 30 */ |
| 36528 | 0xba43b74000000000LLU, /* 11: 1.0e+11 << 27 */ |
| 36529 | 0xe8d4a51000000000LLU, /* 12: 1.0e+12 << 24 */ |
| 36530 | 0x9184e72a00000000LLU, /* 13: 1.0e+13 << 20 */ |
| 36531 | 0xb5e620f480000000LLU, /* 14: 1.0e+14 << 17 */ |
| 36532 | 0xe35fa931a0000000LLU, /* 15: 1.0e+15 << 14 */ |
| 36533 | 0x8e1bc9bf04000000LLU, /* 16: 1.0e+16 << 10 */ |
| 36534 | 0xb1a2bc2ec5000000LLU, /* 17: 1.0e+17 << 7 */ |
| 36535 | 0xde0b6b3a76400000LLU, /* 18: 1.0e+18 << 4 */ |
| 36536 | 0x8ac7230489e80000LLU, /* 19: 1.0e+19 >> 0 */ |
| 36537 | 0xad78ebc5ac620000LLU, /* 20: 1.0e+20 >> 3 */ |
| 36538 | 0xd8d726b7177a8000LLU, /* 21: 1.0e+21 >> 6 */ |
| 36539 | 0x878678326eac9000LLU, /* 22: 1.0e+22 >> 10 */ |
| 36540 | 0xa968163f0a57b400LLU, /* 23: 1.0e+23 >> 13 */ |
| 36541 | 0xd3c21bcecceda100LLU, /* 24: 1.0e+24 >> 16 */ |
| 36542 | 0x84595161401484a0LLU, /* 25: 1.0e+25 >> 20 */ |
| 36543 | 0xa56fa5b99019a5c8LLU, /* 26: 1.0e+26 >> 23 */ |
| 36544 | }; |
| 36545 | static const u64 aScale[] = { |
| 36546 | 0x8049a4ac0c5811aeLLU, /* 0: 1.0e-351 << 1229 */ |
| 36547 | 0xcf42894a5dce35eaLLU, /* 1: 1.0e-324 << 1140 */ |
| 36548 | 0xa76c582338ed2621LLU, /* 2: 1.0e-297 << 1050 */ |
| 36549 | 0x873e4f75e2224e68LLU, /* 3: 1.0e-270 << 960 */ |
| 36550 | 0xda7f5bf590966848LLU, /* 4: 1.0e-243 << 871 */ |
| 36551 | 0xb080392cc4349decLLU, /* 5: 1.0e-216 << 781 */ |
| 36552 | 0x8e938662882af53eLLU, /* 6: 1.0e-189 << 691 */ |
| 36553 | 0xe65829b3046b0afaLLU, /* 7: 1.0e-162 << 602 */ |
| 36554 | 0xba121a4650e4ddebLLU, /* 8: 1.0e-135 << 512 */ |
| 36555 | 0x964e858c91ba2655LLU, /* 9: 1.0e-108 << 422 */ |
| 36556 | 0xf2d56790ab41c2a2LLU, /* 10: 1.0e-81 << 333 */ |
| 36557 | 0xc428d05aa4751e4cLLU, /* 11: 1.0e-54 << 243 */ |
| 36558 | 0x9e74d1b791e07e48LLU, /* 12: 1.0e-27 << 153 */ |
| 36559 | 0x8000000000000000LLU, /* 13: 1.0e+0 << 63 */ |
| 36560 | 0xcecb8f27f4200f3aLLU, /* 14: 1.0e+27 >> 26 */ |
| 36561 | 0xa70c3c40a64e6c51LLU, /* 15: 1.0e+54 >> 116 */ |
| 36562 | 0x86f0ac99b4e8dafdLLU, /* 16: 1.0e+81 >> 206 */ |
| 36563 | 0xda01ee641a708de9LLU, /* 17: 1.0e+108 >> 295 */ |
| 36564 | 0xb01ae745b101e9e4LLU, /* 18: 1.0e+135 >> 385 */ |
| 36565 | 0x8e41ade9fbebc27dLLU, /* 19: 1.0e+162 >> 475 */ |
| 36566 | 0xe5d3ef282a242e81LLU, /* 20: 1.0e+189 >> 564 */ |
| 36567 | 0xb9a74a0637ce2ee1LLU, /* 21: 1.0e+216 >> 654 */ |
| 36568 | 0x95f83d0a1fb69cd9LLU, /* 22: 1.0e+243 >> 744 */ |
| 36569 | 0xf24a01a73cf2dccfLLU, /* 23: 1.0e+270 >> 833 */ |
| 36570 | 0xc3b8358109e84f07LLU, /* 24: 1.0e+297 >> 923 */ |
| 36571 | 0x9e19db92b4e31ba9LLU, /* 25: 1.0e+324 >> 1013 */ |
| 36572 | }; |
| 36573 | int g, n; |
| 36574 | u64 x, y; |
| 36575 | |
| 36576 | assert( p>=POWERSOF10_FIRST && p<=POWERSOF10_LAST ); |
| 36577 | if( p<0 ){ |
| 36578 | g = p/27; |
| 36579 | n = p%27; |
| 36580 | if( n ){ |
| 36581 | g--; |
| 36582 | n += 27; |
| 36583 | } |
| 36584 | }else if( p<27 ){ |
| 36585 | return aBase[p]; |
| 36586 | }else{ |
| 36587 | g = p/27; |
| 36588 | n = p%27; |
| 36589 | } |
| 36590 | y = aScale[g+13]; |
| 36591 | if( n==0 ){ |
| 36592 | return y; |
| 36593 | } |
| 36594 | x = sqlite3Multiply128(aBase[n],y); |
| 36595 | if( (U64_BIT(63) & x)==0 ){ |
| 36596 | x <<= 1; |
| 36597 | } |
| 36598 | return x; |
| 36599 | } |
| 36600 | |
| 36601 | /* |
| 36602 | ** pow10to2(x) computes floor(log2(pow(10,x))). |
| 36603 | ** pow2to10(y) computes floor(log10(pow(2,y))). |
| 36604 | ** |
| 36605 | ** Conceptually, pow10to2(p) converts a base-10 exponent p into |
| 36606 | ** a corresponding base-2 exponent, and pow2to10(e) converts a base-2 |
| 36607 | ** exponent into a base-10 exponent. |
| 36608 | ** |
| 36609 | ** The conversions are based on the observation that: |
| 36610 | ** |
| 36611 | ** ln(10.0)/ln(2.0) == 108853/32768 (approximately) |
| 36612 | ** ln(2.0)/ln(10.0) == 78913/262144 (approximately) |
| 36613 | ** |
| 36614 | ** These ratios are approximate, but they are accurate to 5 digits, |
| 36615 | ** which is close enough for the usage here. Right-shift is used |
| 36616 | ** for division so that rounding of negative numbers happens in the |
| 36617 | ** right direction. |
| 36618 | */ |
| 36619 | static int pwr10to2(int p){ return (p*108853) >> 15; } |
| 36620 | static int pwr2to10(int p){ return (p*78913) >> 18; } |
| 36621 | |
| 36622 | /* |
| 36623 | ** Count leading zeros for a 64-bit unsigned integer. |
| 36624 | */ |
| 36625 | static int countLeadingZeros(u64 m){ |
| 36626 | #if defined(__GNUC__) || defined(__clang__) |
| 36627 | return __builtin_clzll(m); |
| 36628 | #else |
| 36629 | int n = 0; |
| 36630 | if( m <= 0x00000000ffffffffULL) { n += 32; m <<= 32; } |
| 36631 | if( m <= 0x0000ffffffffffffULL) { n += 16; m <<= 16; } |
| 36632 | if( m <= 0x00ffffffffffffffULL) { n += 8; m <<= 8; } |
| 36633 | if( m <= 0x0fffffffffffffffULL) { n += 4; m <<= 4; } |
| 36634 | if( m <= 0x3fffffffffffffffULL) { n += 2; m <<= 2; } |
| 36635 | if( m <= 0x7fffffffffffffffULL) { n += 1; } |
| 36636 | return n; |
| 36637 | #endif |
| 36638 | } |
| 36639 | |
| 36640 | /* |
| 36641 | ** Given m and e, which represent a quantity r == m*pow(2,e), |
| 36642 | ** return values *pD and *pP such that r == (*pD)*pow(10,*pP), |
| 36643 | ** approximately. *pD should contain at least n significant digits. |
| 36644 | ** |
| 36645 | ** The input m is required to have its highest bit set. In other words, |
| 36646 | ** m should be left-shifted, and e decremented, to maximize the value of m. |
| 36647 | */ |
| 36648 | static void sqlite3Fp2Convert10(u64 m, int e, int n, u64 *pD, int *pP){ |
| 36649 | int p; |
| 36650 | u64 h, out; |
| 36651 | p = n - 1 - pwr2to10(e+63); |
| 36652 | h = sqlite3Multiply128(m, powerOfTen(p)); |
| 36653 | assert( -(e + pwr10to2(p) + 3) >=0 ); |
| 36654 | assert( -(e + pwr10to2(p) + 3) <64 ); |
| 36655 | out = h >> -(e + pwr10to2(p) + 3); |
| 36656 | *pD = (out + 2 + ((out>>2)&1)) >> 2; |
| 36657 | *pP = -p; |
| 36658 | } |
| 36659 | |
| 36660 | /* |
| 36661 | ** Return an IEEE754 floating point value that approximates d*pow(10,p). |
| 36662 | */ |
| 36663 | static double sqlite3Fp10Convert2(u64 d, int p){ |
| 36664 | u64 out; |
| 36665 | int b; |
| 36666 | int e1; |
| 36667 | int e2; |
| 36668 | int lp; |
| 36669 | u64 h; |
| 36670 | double r; |
| 36671 | assert( (d & U64_BIT(63))==0 ); |
| 36672 | assert( d!=0 ); |
| 36673 | if( p<POWERSOF10_FIRST ){ |
| 36674 | return 0.0; |
| 36675 | } |
| 36676 | if( p>POWERSOF10_LAST ){ |
| 36677 | return INFINITY; |
| 36678 | } |
| 36679 | b = 64 - countLeadingZeros(d); |
| 36680 | lp = pwr10to2(p); |
| 36681 | e1 = 53 - b - lp; |
| 36682 | if( e1>1074 ){ |
| 36683 | if( -(b + lp) >= 1077 ) return 0.0; |
| 36684 | e1 = 1074; |
| 36685 | } |
| 36686 | e2 = e1 - (64-b); |
| 36687 | h = sqlite3Multiply128(d<<(64-b), powerOfTen(p)); |
| 36688 | assert( -(e2 + lp + 3) >=0 ); |
| 36689 | assert( -(e2 + lp + 3) <64 ); |
| 36690 | out = (h >> -(e2 + lp + 3)) | 1; |
| 36691 | if( out >= U64_BIT(55)-2 ){ |
| 36692 | out = (out>>1) | (out&1); |
| 36693 | e1--; |
| 36694 | } |
| 36695 | if( e1<=(-972) ){ |
| 36696 | return INFINITY; |
| 36697 | } |
| 36698 | out = (out + 1 + ((out>>2)&1)) >> 2; |
| 36699 | if( (out & U64_BIT(52))!=0 ){ |
| 36700 | out = (out & ~U64_BIT(52)) | ((u64)(1075-e1)<<52); |
| 36701 | } |
| 36702 | memcpy(&r, &out, 8); |
| 36703 | return r; |
| 36704 | } |
| 36705 | |
| 36706 | /* |
| 36707 | ** The string z[] is an text representation of a real number. |
| 36708 | ** Convert this string to a double and write it into *pResult. |
| @@ -36535,12 +36746,10 @@ | |
| 36746 | int esign = 1; /* sign of exponent */ |
| 36747 | int e = 0; /* exponent */ |
| 36748 | int eValid = 1; /* True exponent is either not used or is well-formed */ |
| 36749 | int nDigit = 0; /* Number of digits processed */ |
| 36750 | int eType = 1; /* 1: pure integer, 2+: fractional -1 or less: bad UTF16 */ |
| 36751 | |
| 36752 | assert( enc==SQLITE_UTF8 || enc==SQLITE_UTF16LE || enc==SQLITE_UTF16BE ); |
| 36753 | *pResult = 0.0; /* Default return value, in case of an error */ |
| 36754 | if( length==0 ) return 0; |
| 36755 | |
| @@ -36574,11 +36783,11 @@ | |
| 36783 | |
| 36784 | /* copy max significant digits to significand */ |
| 36785 | while( z<zEnd && sqlite3Isdigit(*z) ){ |
| 36786 | s = s*10 + (*z - '0'); |
| 36787 | z+=incr; nDigit++; |
| 36788 | if( s>=((LARGEST_INT64-9)/10) ){ |
| 36789 | /* skip non-significant significand digits |
| 36790 | ** (increase exponent by d to shift decimal left) */ |
| 36791 | while( z<zEnd && sqlite3Isdigit(*z) ){ z+=incr; d++; } |
| 36792 | } |
| 36793 | } |
| @@ -36589,11 +36798,11 @@ | |
| 36798 | z+=incr; |
| 36799 | eType++; |
| 36800 | /* copy digits from after decimal to significand |
| 36801 | ** (decrease exponent by d to shift decimal right) */ |
| 36802 | while( z<zEnd && sqlite3Isdigit(*z) ){ |
| 36803 | if( s<((LARGEST_INT64-9)/10) ){ |
| 36804 | s = s*10 + (*z - '0'); |
| 36805 | d--; |
| 36806 | nDigit++; |
| 36807 | } |
| 36808 | z+=incr; |
| @@ -36638,66 +36847,11 @@ | |
| 36847 | } |
| 36848 | |
| 36849 | /* adjust exponent by d, and update sign */ |
| 36850 | e = (e*esign) + d; |
| 36851 | |
| 36852 | *pResult = sqlite3Fp10Convert2(s,e); |
| 36853 | if( sign<0 ) *pResult = -*pResult; |
| 36854 | assert( !sqlite3IsNaN(*pResult) ); |
| 36855 | |
| 36856 | atof_return: |
| 36857 | /* return true if number and no extra non-whitespace characters after */ |
| @@ -37014,11 +37168,10 @@ | |
| 37168 | */ |
| 37169 | SQLITE_PRIVATE void sqlite3FpDecode(FpDecode *p, double r, int iRound, int mxRound){ |
| 37170 | int i; |
| 37171 | u64 v; |
| 37172 | int e, exp = 0; |
| 37173 | |
| 37174 | p->isSpecial = 0; |
| 37175 | p->z = p->zBuf; |
| 37176 | assert( mxRound>0 ); |
| 37177 | |
| @@ -37035,64 +37188,58 @@ | |
| 37188 | return; |
| 37189 | }else{ |
| 37190 | p->sign = '+'; |
| 37191 | } |
| 37192 | memcpy(&v,&r,8); |
| 37193 | e = (v>>52)&0x7ff; |
| 37194 | if( e==0x7ff ){ |
| 37195 | p->isSpecial = 1 + (v!=0x7ff0000000000000LL); |
| 37196 | p->n = 0; |
| 37197 | p->iDP = 0; |
| 37198 | return; |
| 37199 | } |
| 37200 | v &= 0x000fffffffffffffULL; |
| 37201 | if( e==0 ){ |
| 37202 | int n = countLeadingZeros(v); |
| 37203 | v <<= n; |
| 37204 | e = -1074 - n; |
| 37205 | }else{ |
| 37206 | v = (v<<11) | U64_BIT(63); |
| 37207 | e -= 1086; |
| 37208 | } |
| 37209 | sqlite3Fp2Convert10(v, e, 17, &v, &exp); |
| 37210 | |
| 37211 | /* Extract significant digits. */ |
| 37212 | i = sizeof(p->zBuf)-1; |
| 37213 | assert( v>0 ); |
| 37214 | while( v>=10 ){ |
| 37215 | static const union { |
| 37216 | char a[200]; |
| 37217 | short int forAlignment; |
| 37218 | } dig = { |
| 37219 | "00010203040506070809" |
| 37220 | "10111213141516171819" |
| 37221 | "20212223242526272829" |
| 37222 | "30313233343536373839" |
| 37223 | "40414243444546474849" |
| 37224 | "50515253545556575859" |
| 37225 | "60616263646566676869" |
| 37226 | "70717273747576777879" |
| 37227 | "80818283848586878889" |
| 37228 | "90919293949596979899" |
| 37229 | }; |
| 37230 | int kk = (v%100)*2; |
| 37231 | assert( TWO_BYTE_ALIGNMENT(&dig.a[kk]) ); |
| 37232 | assert( TWO_BYTE_ALIGNMENT(&p->zBuf[i-1]) ); |
| 37233 | *(u16*)(&p->zBuf[i-1]) = *(u16*)&dig.a[kk]; |
| 37234 | i -= 2; |
| 37235 | v /= 100; |
| 37236 | } |
| 37237 | if( v ){ |
| 37238 | assert( v<10 ); |
| 37239 | p->zBuf[i--] = v + '0'; |
| 37240 | } |
| 37241 | assert( i>=0 && i<sizeof(p->zBuf)-1 ); |
| 37242 | p->n = sizeof(p->zBuf) - 1 - i; |
| 37243 | assert( p->n>0 ); |
| 37244 | assert( p->n<sizeof(p->zBuf) ); |
| 37245 | p->iDP = p->n + exp; |
| @@ -127706,17 +127853,18 @@ | |
| 127853 | ** |
| 127854 | ** zName is temporarily modified while this routine is running, but is |
| 127855 | ** restored to its original value prior to this routine returning. |
| 127856 | */ |
| 127857 | SQLITE_PRIVATE int sqlite3ShadowTableName(sqlite3 *db, const char *zName){ |
| 127858 | const char *zTail; /* Pointer to the last "_" in zName */ |
| 127859 | Table *pTab; /* Table that zName is a shadow of */ |
| 127860 | char *zCopy; |
| 127861 | zTail = strrchr(zName, '_'); |
| 127862 | if( zTail==0 ) return 0; |
| 127863 | zCopy = sqlite3DbStrNDup(db, zName, (int)(zTail-zName)); |
| 127864 | pTab = zCopy ? sqlite3FindTable(db, zCopy, 0) : 0; |
| 127865 | sqlite3DbFree(db, zCopy); |
| 127866 | if( pTab==0 ) return 0; |
| 127867 | if( !IsVirtual(pTab) ) return 0; |
| 127868 | return sqlite3IsShadowTableOf(db, pTab, zName); |
| 127869 | } |
| 127870 | #endif /* ifndef SQLITE_OMIT_VIRTUALTABLE */ |
| @@ -129756,10 +129904,11 @@ | |
| 129904 | sqlite3ErrorMsg(pParse, "index associated with UNIQUE " |
| 129905 | "or PRIMARY KEY constraint cannot be dropped", 0); |
| 129906 | goto exit_drop_index; |
| 129907 | } |
| 129908 | iDb = sqlite3SchemaToIndex(db, pIndex->pSchema); |
| 129909 | assert( iDb>=0 && iDb<db->nDb ); |
| 129910 | #ifndef SQLITE_OMIT_AUTHORIZATION |
| 129911 | { |
| 129912 | int code = SQLITE_DROP_INDEX; |
| 129913 | Table *pTab = pIndex->pTable; |
| 129914 | const char *zDb = db->aDb[iDb].zDbSName; |
| @@ -133737,11 +133886,11 @@ | |
| 133886 | sqlite3_result_error_nomem(context); |
| 133887 | return; |
| 133888 | } |
| 133889 | i = j = 0; |
| 133890 | while( i<nIn ){ |
| 133891 | const char *z = strchr(&zIn[i],'\\'); |
| 133892 | if( z==0 ){ |
| 133893 | n = nIn - i; |
| 133894 | memmove(&zOut[j], &zIn[i], n); |
| 133895 | j += n; |
| 133896 | break; |
| @@ -136908,10 +137057,11 @@ | |
| 137057 | /* If foreign-keys are disabled, this function is a no-op. */ |
| 137058 | if( (db->flags&SQLITE_ForeignKeys)==0 ) return; |
| 137059 | if( !IsOrdinaryTable(pTab) ) return; |
| 137060 | |
| 137061 | iDb = sqlite3SchemaToIndex(db, pTab->pSchema); |
| 137062 | assert( iDb>=00 && iDb<db->nDb ); |
| 137063 | zDb = db->aDb[iDb].zDbSName; |
| 137064 | |
| 137065 | /* Loop through all the foreign key constraints for which pTab is the |
| 137066 | ** child table (the table that the foreign key definition is part of). */ |
| 137067 | for(pFKey=pTab->u.tab.pFKey; pFKey; pFKey=pFKey->pNextFrom){ |
| @@ -157109,10 +157259,11 @@ | |
| 157259 | |
| 157260 | pParse->pNewTrigger = 0; |
| 157261 | if( NEVER(pParse->nErr) || !pTrig ) goto triggerfinish_cleanup; |
| 157262 | zName = pTrig->zName; |
| 157263 | iDb = sqlite3SchemaToIndex(pParse->db, pTrig->pSchema); |
| 157264 | assert( iDb>=00 && iDb<db->nDb ); |
| 157265 | pTrig->step_list = pStepList; |
| 157266 | while( pStepList ){ |
| 157267 | pStepList->pTrig = pTrig; |
| 157268 | pStepList = pStepList->pNext; |
| 157269 | } |
| @@ -261547,11 +261698,11 @@ | |
| 261698 | int nArg, /* Number of args */ |
| 261699 | sqlite3_value **apUnused /* Function arguments */ |
| 261700 | ){ |
| 261701 | assert( nArg==0 ); |
| 261702 | UNUSED_PARAM2(nArg, apUnused); |
| 261703 | sqlite3_result_text(pCtx, "fts5: 2026-02-13 16:02:27 d62999907d5f5987fe0030e1a4a7144c898e55595ac116eec966741a5099322b", -1, SQLITE_TRANSIENT); |
| 261704 | } |
| 261705 | |
| 261706 | /* |
| 261707 | ** Implementation of fts5_locale(LOCALE, TEXT) function. |
| 261708 | ** |
| 261709 |
+2
-2
| --- extsrc/sqlite3.h | ||
| +++ extsrc/sqlite3.h | ||
| @@ -146,14 +146,14 @@ | ||
| 146 | 146 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 147 | 147 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 148 | 148 | */ |
| 149 | 149 | #define SQLITE_VERSION "3.52.0" |
| 150 | 150 | #define SQLITE_VERSION_NUMBER 3052000 |
| 151 | -#define SQLITE_SOURCE_ID "2026-02-10 19:33:11 b67889e4f17c3280f839ee7045256cc47d6ce3ed60d880925e3d30f9ebbcf3ff" | |
| 151 | +#define SQLITE_SOURCE_ID "2026-02-16 11:14:59 b5ebbd004183f81902fa79a143222204b33dbe1cacb918194556b8dac67bd567" | |
| 152 | 152 | #define SQLITE_SCM_BRANCH "trunk" |
| 153 | 153 | #define SQLITE_SCM_TAGS "" |
| 154 | -#define SQLITE_SCM_DATETIME "2026-02-10T19:33:11.305Z" | |
| 154 | +#define SQLITE_SCM_DATETIME "2026-02-16T11:14:59.370Z" | |
| 155 | 155 | |
| 156 | 156 | /* |
| 157 | 157 | ** CAPI3REF: Run-Time Library Version Numbers |
| 158 | 158 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 159 | 159 | ** |
| 160 | 160 |
| --- extsrc/sqlite3.h | |
| +++ extsrc/sqlite3.h | |
| @@ -146,14 +146,14 @@ | |
| 146 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 147 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 148 | */ |
| 149 | #define SQLITE_VERSION "3.52.0" |
| 150 | #define SQLITE_VERSION_NUMBER 3052000 |
| 151 | #define SQLITE_SOURCE_ID "2026-02-10 19:33:11 b67889e4f17c3280f839ee7045256cc47d6ce3ed60d880925e3d30f9ebbcf3ff" |
| 152 | #define SQLITE_SCM_BRANCH "trunk" |
| 153 | #define SQLITE_SCM_TAGS "" |
| 154 | #define SQLITE_SCM_DATETIME "2026-02-10T19:33:11.305Z" |
| 155 | |
| 156 | /* |
| 157 | ** CAPI3REF: Run-Time Library Version Numbers |
| 158 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 159 | ** |
| 160 |
| --- extsrc/sqlite3.h | |
| +++ extsrc/sqlite3.h | |
| @@ -146,14 +146,14 @@ | |
| 146 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 147 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 148 | */ |
| 149 | #define SQLITE_VERSION "3.52.0" |
| 150 | #define SQLITE_VERSION_NUMBER 3052000 |
| 151 | #define SQLITE_SOURCE_ID "2026-02-16 11:14:59 b5ebbd004183f81902fa79a143222204b33dbe1cacb918194556b8dac67bd567" |
| 152 | #define SQLITE_SCM_BRANCH "trunk" |
| 153 | #define SQLITE_SCM_TAGS "" |
| 154 | #define SQLITE_SCM_DATETIME "2026-02-16T11:14:59.370Z" |
| 155 | |
| 156 | /* |
| 157 | ** CAPI3REF: Run-Time Library Version Numbers |
| 158 | ** KEYWORDS: sqlite3_version sqlite3_sourceid |
| 159 | ** |
| 160 |