Repository navigation
Accept VALUE as a synonym of VALUES only in MySQL - #2662
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2662 +/- ##
=======================================
Coverage 81.54% 81.55%
=======================================
Files 42 42
Lines 34239 34249 +10
Branches 34239 34249 +10
=======================================
+ Hits 27920 27931 +11
Misses 2770 2770
+ Partials 3549 3548 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
LucaCappelletti94
force-pushed
the
upstream/sqlite-insert-value
branch
2 times, most recently
from
October 20, 2026 10:59
9674a9b to
efd518f
Compare
s5dsn-eqee
suggested changes
Oct 20, 2026
s5dsn-eqee
left a comment
Contributor
There was a problem hiding this comment.
Looks good, thanks. Two small asks before merging:
- Please add regression tests for a few more dialects rejecting
VALUE(e.g. PostgreSQL, SQLite, DuckDB), including the no-column-list formINSERT INTO t VALUE (1)which fails
with a different message on PostgreSQL. - Since the gate lives in
parse_query_body, MySQL/Generic acceptVALUEin any query body, not only INSERT/REPLACE. Please add tests that pin this (e.g.SELECT 1 UNION VALUE (2),WITH c AS (VALUE (1)) SELECT * FROM c)
Contributor
Author
|
Added the requested tests |
alamb
approved these changes
Oct 20, 2026
alamb
left a comment
Contributor
There was a problem hiding this comment.
Thank you @LucaCappelletti94 and @s5dsn-eqee
LucaCappelletti94
force-pushed
the
upstream/sqlite-insert-value
branch
from
October 21, 2026 07:45
245bf7a to
afa5f7a
Compare
LucaCappelletti94
force-pushed
the
upstream/sqlite-insert-value
branch
from
October 23, 2026 22:13
afa5f7a to
541d83f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every dialect accepted
VALUEin place ofVALUES, as inINSERT INTO t (a) VALUE (1). MySQL documents it ("VALUE is a synonym for VALUES in this context", https://dev.mysql.com/doc/refman/8.4/en/insert.html), but SQLite 3.51.1 and DuckDB 1.4.4 reject it with a syntax error, and theINSERTreferences of PostgreSQL, SQL Server, Snowflake, BigQuery, Redshift, Spark, ClickHouse and Oracle only listVALUES.A new dialect method,
supports_singular_value_keyword, defaults tofalseand is enabled for MySQL and the generic dialect. Every other dialect now rejectsVALUEwithExpected: SELECT, VALUES, or a subquery in the query body, found: VALUE. The existingparse_insert_valuestest runs itsVALUEcase on the dialects that keep it, and a new test checks both sides of the capability.