fix: reject expression-valued PostgreSQL SET assignments
Generic PostgreSQL SET values currently go through the full expression parser. Since PostgreSQL custom operators gained support, SET search_path = "$user", "$invalid"@schema is accepted with an OK AST; ProxySQL's SET adapter then returns a session-variable map for this malformed statement. This is a regression found during release integration testing against ProxySQL's existing partial_ast_gate test.
Validate the resulting generic SET value as a scalar name, string, boolean, number, or signed number. Apply the check to the first value and every comma-separated continuation, and propagate invalid continuation errors instead of returning a successful prefix. MySQL SET retains expression support; special PostgreSQL SET forms keep their existing parsers.
Regression tests cover the exact ProxySQL failure, first/list operator expressions, functions, arithmetic and signed booleans, with positive controls for PostgreSQL scalar values and MySQL CONCAT.
Validation:
- Full
make -j8 test build-corpus-test: 1,773 passed, 37 backend-dependent skips, zero failures. - Focused SET suite: all 102 tests passed; the new rejection test failed before the fix.
- PostgreSQL compatibility: 87 harness tests and 5,122 committed cases passed.
- MySQL compatibility: 545 curated cases, zero expectation mismatches; native oracle not run.
- Recompiled ProxySQL's current v3.0 adapter and SET tests (546abf5c): all 494 assertions passed. The exact malformed search_path test failed before this fix.
- ProxySQL digest smoke test: 51 assertions passed after correcting a pre-existing buffer-free error only in the temporary test copy. No ProxySQL production source was modified.
Independent review found no actionable issues after checking the native PostgreSQL value grammar and running 32 additional PostgreSQL/MySQL probes. CodeRabbit did not review this revision because its included-review quota was exhausted.
No benchmark artifacts are included.