dolthub/doltgresql#1057 allow unquoted STATUS keyword in DESCRIBE statements#2136
Merged
fulghum merged 1 commit intodolthub:mainfrom Dec 22, 2025
Merged
Conversation
Add STATUS to the simple_ident grammar rule to fix syntax error when running DESCRIBE dolt.status without quoting the table name. The simple_ident rule only allowed IDENT tokens and PUBLIC keyword. Since STATUS is defined as an unreserved keyword in the grammar, it was rejected in DESCRIBE statements unless quoted. This follows the same pattern used when PUBLIC was added in PR dolthub#828. Enable the previously skipped test that validates this fix. Refs: dolthub#1057
codeaucafe
added a commit
to codeaucafe/doltgresql
that referenced
this pull request
Dec 20, 2025
Remove skip list entries for tests that were previously panicking due to a bug in go-mysql-server's index range building for OR conditions. The bug occurred when OR conditions mixed indexed and non-indexed columns (e.g., `SELECT * FROM t WHERE pk = 1 OR col = 1`). The upstream fix in go-mysql-server PR dolthub#2136 appears to have resolved this by properly handling OR conjunctions where non-indexed columns are present, falling back to table scan instead of attempting an invalid index lookup. Tests removed from skip list: - Complex Filter Index Scan dolthub#2 - Complex Filter Index Scan dolthub#3 - complicated range tree All three tests now pass with the current go-mysql-server dep. Refs: dolthub#1868
fulghum
approved these changes
Dec 22, 2025
Contributor
|
Thanks for the contribution @codeaucafe! 🙏 |
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.
IMPORTANT
Below is the summary of the cause of the bug in #1057 and the simple fix, but I want to clarify this is the desired fix.
Summary
DESCRIBE dolt.statusfailing with "at or near 'status': syntax error"STATUSto thesimple_identgrammar rule insql.y, following the pattern established forPUBLICin PR Support for DESCRIBE <table> with AS OF #828Background
The
simple_identrule is used for parsing table name components in DESCRIBE statements. It only allowedIDENTtokens and the explicitly addedPUBLICkeyword. SinceSTATUSis an unreserved keyword (not a regular identifier), the parser rejected it unless quoted.Before:
DESCRIBE dolt.statusfails,DESCRIBE dolt."status"worksAfter: Both work
Test Plan
DESCRIBE dolt.statustest now passes (TestUserSpaceDoltTables/dolt_status)Fixes #1057