Commit 7251ec0
authored
Merge upstream SQLite 3.46.1 (#2238)
Updates libSQL's vendored SQLite from 3.45.1 → 3.46.1 (upstream tag
version-3.46.1, f3d536d).
Despite libSQL claiming to be 3.46.1 in the version strings, it was
based on upstream version 3.45.1 (9ed72eb).
What's in here:
- libsql-sqlite3/ — the vendored SQLite source tree merged up to 3.46.1,
with libSQL's modifications preserved (vector indexes, extra pragmas,
WASM tweaks, etc.).
- libsql-ffi/bundled/ — regenerated amalgamation (sqlite3.c/sqlite3.h
now report SQLITE_VERSION "3.46.1" with the …alt1 libSQL source-id
marker) and session_bindgen.rs, via LIBSQL_DEV=1 cargo build --features
multiple-ciphers,session. The SQLite3MultipleCiphers fileio.c/series.c
were out-of-band synced to match 3.46.1.
- Tooling — scripts/sqlite-diff (diffs only upstream's src/ artifacts
between two trees) and scripts/update-sqlite-bundle.sh, so future bumps
are reproducible.
- ext/intck/ is new from upstream and was relocated under
libsql-sqlite3/ where Makefile.in already expects it.
Conflicts resolved:
- src/pragma.c (integrity_check) — upstream replaced the per-table count
loop with a single pre-pass using b-tree counts from OP_IntegrityCk.
Took upstream's refactored form and re-added the IsVectorIndex(pIdx)
skip in the relocated loop, keeping cnt++ unconditional so aRoot
register indexing stays aligned. The existing per-row vector-index skip
was untouched.
- src/where.c — kept libSQL's if (pProbe->idxIsVector) opMask = 0;
alongside upstream's refined bLowQual && pSrc->fg.isIndexedBy==0
(cherry-pick 626d619); took upstream's WHERE_KEEP_ALL_JOINS
(cherry-pick 2fdb323).
- src/shell.c.in — libSQL's .init_wasm_func_table and upstream's new
.intck command coexist.
- ext/wasm/GNUmakefile — preserved libSQL's -DSQLITE_OMIT_SHARED_MEM and
-lm next to upstream's new SEE filter hook (c-pp preprocessor only; no
effect on WASM output).
- tool/mksqlite3c.tcl — kept wasmedge_bindings.c in the amalgamation
source list.
- FTS3/FTS5 + mechanical files — taken from upstream; these were
merge-base artifacts (base 3.45.0 vs HEAD already at 3.45.1). libSQL's
local trigram-tokenizer crash fix (3e56d28) is now superseded by
upstream's a751fdd.
How this was verified:
The `libsql-sqlite3/src` tree was diffed against both clean upstream
bases using scripts/sqlite-diff and compared the two patches — they
should differ only in context lines and hunk offsets (upstream code that
changed between releases), never in libSQL's actual +/- content.
```
scripts/sqlite-diff <clean-3.45.1> libsql-sqlite3 > libsql-sqlite3-3.45.1.patch
scripts/sqlite-diff <clean-3.46.1> libsql-sqlite3 > libsql-sqlite3-3.46.1.patch
```
The diffs are the same except for a single divergence is the `PRAGMA
integrity_check vector-index` guard, which is the same libSQL change in
two shapes because upstream refactored that loop between releases:
- vs 3.45.1: if( IsVectorIndex(pIdx) ) continue;
- vs 3.46.1: folded into upstream's new check → if(
pIdx->pPartIdxWhere==0 && !IsVectorIndex(pIdx) ){
Both skip vector indexes during integrity check — identical semantics.
Ground truth confirms the tree is correctly ported (src/pragma.c:1804).
Test plan:
* SQLite TCL test suite253 files changed
Lines changed: 26732 additions & 13087 deletions
File tree
- libsql-ffi/bundled
- SQLite3MultipleCiphers/src
- bindings
- src
- libsql-sqlite3
- art
- autoconf
- tea
- doc
- ext
- consio
- expert
- fts3
- fts5
- test
- icu
- intck
- misc
- rbu
- recover
- rtree
- session
- userauth
- wasm
- SQLTester
- api
- common
- fiddle
- src
- test
- tool
- scripts
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
375 | | - | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
376 | 378 | | |
377 | 379 | | |
378 | 380 | | |
| |||
458 | 460 | | |
459 | 461 | | |
460 | 462 | | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
468 | 476 | | |
469 | 477 | | |
470 | 478 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
110 | 114 | | |
111 | | - | |
| 115 | + | |
112 | 116 | | |
113 | 117 | | |
114 | | - | |
115 | | - | |
| 118 | + | |
| 119 | + | |
116 | 120 | | |
117 | 121 | | |
118 | 122 | | |
| |||
372 | 376 | | |
373 | 377 | | |
374 | 378 | | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
382 | 386 | | |
383 | 387 | | |
384 | 388 | | |
| |||
392 | 396 | | |
393 | 397 | | |
394 | 398 | | |
395 | | - | |
| 399 | + | |
396 | 400 | | |
397 | 401 | | |
398 | 402 | | |
399 | 403 | | |
400 | | - | |
| 404 | + | |
401 | 405 | | |
402 | 406 | | |
403 | 407 | | |
404 | 408 | | |
405 | | - | |
| 409 | + | |
406 | 410 | | |
407 | 411 | | |
408 | 412 | | |
409 | 413 | | |
410 | | - | |
| 414 | + | |
411 | 415 | | |
412 | 416 | | |
413 | 417 | | |
414 | 418 | | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
415 | 437 | | |
416 | 438 | | |
417 | 439 | | |
| |||
422 | 444 | | |
423 | 445 | | |
424 | 446 | | |
425 | | - | |
| 447 | + | |
426 | 448 | | |
427 | 449 | | |
428 | 450 | | |
| |||
442 | 464 | | |
443 | 465 | | |
444 | 466 | | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
449 | 474 | | |
450 | 475 | | |
451 | 476 | | |
452 | 477 | | |
453 | 478 | | |
454 | 479 | | |
455 | 480 | | |
| 481 | + | |
456 | 482 | | |
| 483 | + | |
457 | 484 | | |
458 | 485 | | |
459 | | - | |
| 486 | + | |
460 | 487 | | |
461 | 488 | | |
462 | 489 | | |
463 | 490 | | |
464 | 491 | | |
465 | 492 | | |
466 | 493 | | |
467 | | - | |
| 494 | + | |
468 | 495 | | |
469 | 496 | | |
470 | 497 | | |
471 | 498 | | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
472 | 515 | | |
473 | 516 | | |
474 | 517 | | |
475 | 518 | | |
476 | | - | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
477 | 524 | | |
478 | 525 | | |
479 | 526 | | |
480 | | - | |
| 527 | + | |
481 | 528 | | |
482 | 529 | | |
483 | 530 | | |
484 | 531 | | |
485 | | - | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
486 | 538 | | |
487 | 539 | | |
488 | | - | |
| 540 | + | |
| 541 | + | |
489 | 542 | | |
490 | 543 | | |
491 | 544 | | |
| |||
506 | 559 | | |
507 | 560 | | |
508 | 561 | | |
509 | | - | |
| 562 | + | |
510 | 563 | | |
511 | 564 | | |
512 | 565 | | |
513 | 566 | | |
514 | 567 | | |
515 | 568 | | |
516 | | - | |
| 569 | + | |
517 | 570 | | |
518 | | - | |
| 571 | + | |
519 | 572 | | |
520 | 573 | | |
521 | 574 | | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
522 | 578 | | |
523 | 579 | | |
524 | 580 | | |
| |||
0 commit comments