Repository navigation
ParserSQL 1.1.1 is a correctness release for SET ... TRANSACTION and several PostgreSQL SET forms. In 1.1.0, emitted SQL and digests could lose content or change meaning.
Fixes
- MySQL
SET [GLOBAL|SESSION|LOCAL|PERSIST|PERSIST_ONLY] TRANSACTION: the scope is kept. Before this release, every scope was emitted as plainSET TRANSACTION.- Every characteristic is parsed, not only the first one.
READ ONLYis no longer misread as an isolation level.- Whitespace, newlines, comments and keyword case are normalized in NORMAL and DIGEST output.
- MySQL statements that mix
TRANSACTIONwith other SET items (in either order) are now a parse error, as on MySQL 8.4, MySQL 5.7 and MariaDB 10.11. Before, they were accepted with only part of the input parsed. Valid mixes such asSET NAMES utf8mb4, sql_mode='x'still parse. - PostgreSQL transaction forms:
SET SESSION CHARACTERISTICS AS TRANSACTION ...is kept distinct fromSET SESSION TRANSACTION .... The newFLAG_SET_TRANSACTION_CHARACTERISTICSflag marks it.SET LOCAL TRANSACTION ...andSET TRANSACTION SNAPSHOT '...'now parse.- All transaction modes are parsed.
- PostgreSQL
SET ROLE,SET SESSION AUTHORIZATIONandSET CONSTRAINTS: emitted in full. Before, the output was an emptySET. - PostgreSQL multi-value assignments (
SET search_path TO a, b, including withSESSIONorLOCAL): all values are kept.
AST / API changes
NODE_SET_TRANSACTIONstores each characteristic as its ownNODE_TRANSACTION_OPTIONchild, with a canonical value (for exampleISOLATION LEVEL READ COMMITTEDorREAD ONLY). This is the same node type used forBEGIN/START TRANSACTION.- The optional first child is the scope, as a
NODE_IDENTIFIERwith a canonical uppercase value.sourcekeeps the original spelling. SetParser<D>::parse()returns ERROR for a SET statement that mixesTRANSACTIONwith other items.
Migration notes
- Digest text changes for the statements above. Review query rules and stats keyed on the old digests. The old digests were:
SET TRANSACTION ...for every scoped form.SETfor PostgreSQL ROLE, SESSION AUTHORIZATION and CONSTRAINTS.- Only the first value of a multi-value
search_path.
- Consumers that walk the old
NODE_IDENTIFIERcharacteristic children must switch toNODE_TRANSACTION_OPTION.
Validation
make test: 1,790 tests passed; 37 backend-dependent tests skipped.- PostgreSQL harness: 87 unit tests and 5,122 committed compatibility cases passed. Six baseline rows improved from TRAILING_INPUT to DEEP_SUPPORTED.
- MySQL harness: 545 curated cases, 0 mismatches.
- Each changed form was checked against MySQL 8.4.8 (
PREPARE) and libpg_query 18. - CI on #71 passed all regular jobs. The release commit has the same source tree as the tested PR revision.
Release commit: c7adfcb1d578f3121f876bebf2ee5b4978cbf7af.