Summary
Marino does not parse SET PERSIST, SET PERSIST_ONLY, or RESET PERSIST. These are the canonical way to write durable system-variable changes from a SQL session.
MySQL version
Introduced in MySQL 8.0.11 (the same version marino targets — but the variants are not in marino's grammar).
Current state in marino
grep -in '\\bPERSIST\\b\|\\bPERSIST_ONLY\\b' parser/parser.y parser/keywords.go returns no matches. STATS_PERSISTENT exists but is unrelated.
Example SQL
SET PERSIST max_connections = 200;
SET PERSIST_ONLY max_connections = 250;
SET PERSIST sql_mode = 'TRADITIONAL';
Multiple settings in one statement:
SET PERSIST
max_connections = 200,
long_query_time = 0.5;
Clearing persisted settings:
RESET PERSIST max_connections;
RESET PERSIST IF EXISTS max_connections;
RESET PERSIST;
Validation
All forms above run successfully against MySQL 9.2.0 Community.
Notes for the implementer
- Add
PERSIST and PERSIST_ONLY as non-reserved keywords.
- Extend the
SET statement so each variable assignment can carry a scope flag (SESSION / GLOBAL / PERSIST / PERSIST_ONLY). The scope keyword may appear either as SET PERSIST x=... or as SET @@PERSIST.x = ....
- Add
ResetPersistStmt AST node with optional IF EXISTS and optional variable name (no name = clear all).
- Reference: https://dev.mysql.com/doc/refman/9.2/en/set-variable.html
Summary
Marino does not parse
SET PERSIST,SET PERSIST_ONLY, orRESET PERSIST. These are the canonical way to write durable system-variable changes from a SQL session.MySQL version
Introduced in MySQL 8.0.11 (the same version marino targets — but the variants are not in marino's grammar).
Current state in marino
grep -in '\\bPERSIST\\b\|\\bPERSIST_ONLY\\b' parser/parser.y parser/keywords.goreturns no matches.STATS_PERSISTENTexists but is unrelated.Example SQL
Multiple settings in one statement:
Clearing persisted settings:
Validation
All forms above run successfully against MySQL 9.2.0 Community.
Notes for the implementer
PERSISTandPERSIST_ONLYas non-reserved keywords.SETstatement so each variable assignment can carry a scope flag (SESSION/GLOBAL/PERSIST/PERSIST_ONLY). The scope keyword may appear either asSET PERSIST x=...or asSET @@PERSIST.x = ....ResetPersistStmtAST node with optionalIF EXISTSand optional variable name (no name = clear all).