Skip to content

Latest commit

 

History

History
53 lines (44 loc) · 2.75 KB

File metadata and controls

53 lines (44 loc) · 2.75 KB

Corpus provenance

The *.test files in this directory are generated by go run ./cmd/regenerate-parse. Do not edit them by hand.

ast/ is a different thing and follows the opposite rule: ast/*.sql are hand-written scripts, a curated tour of the node set, and are meant to be edited. Their ast/*.tree snapshots are regenerated with go test ./parser -update and reviewed in the diff. Snapshots are meyer's own goldens; they never outrank the accept/reject corpus below.

  • Source of the SQL: SQLite's own test suite from the pinned release below — every test/*.test TCL script, not a curated subset. SQL blocks are extracted verbatim from do_execsql_test, do_catchsql_test and do_eqp_test invocations whose SQL argument is a literal TCL brace block (cases using TCL substitution are skipped, as are the few whose oracle message spans more than one line, which the file format cannot hold). Scripts that yield no such block — the C-level tokenizer tests, the VFS and WAL harnesses — have no corpus file here.
  • Source of the expectations: a real SQLite build. Every statement of every case is prepared independently with sqlite3_prepare_v2 against an empty in-memory database (nothing is executed) using the oracle program in internal/sqlitesrc/oracle/oracle.c, compiled against the pinned amalgamation. The raw per-statement outcomes (OK, or result code + error offset + exact error message, either way with pzTail) are stored in the corpus files. pzTail records how far SQLite's parser got, and the harness needs it to know which text was never verified: a grammar action can fail part-way through a statement and leave the rest of it unparsed, and a statement that prepared fine may still have had text after it that sqlite3_complete failed to split off. A pzTail that reached the end of the statement is left out of the file, which is the usual case.

Pinned SQLite release

artifact file SHA-256
SQLite 3.53.4 amalgamation https://sqlite.org/2026/sqlite-amalgamation-3530400.zip 1e71ddf93849c6a6ecf58b827c0692073d2dd7ee40196158068f7b29f422e87d
SQLite 3.53.4 source https://sqlite.org/2026/sqlite-src-3530400.zip d18fa15aec74d8c17e1463f861095adc01b5ad190256acb4f91d22f0368d232b

License

SQLite's source code and test suite are in the public domain. The authors' statement (from the header of the SQLite test files):

The author disclaims copyright to this source code. In place of a legal notice, here is a blessing:

May you do good and not evil. May you find forgiveness for yourself and forgive others. May you share freely, never taking more than you give.

All other files in this repository are covered by the repository's MIT license (see /LICENSE).