Repository navigation
Conversation
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.
Two small fixes for syntax that MySQL accepts and that is also common in dumps from other databases (PostgreSQL's
pg_dumpwrites both).Support
CHARACTERas a synonym ofCHARCHARACTER[(length)]is a synonym ofCHARin MySQL, but the parser rejects it:It is now parsed like
CHAR(the reportedtypestaysCHARACTER, likeCHARACTER VARYING), so the length,NULLand the other options are read.Accept double-quoted identifiers
With the
ANSI_QUOTESSQL mode, and in standard SQL,"name"is a delimited identifier. The tokenizer already keeps"..."as one token, butdecode_identifier()only strips backticks, so the quotes end up in the names:decode_identifier()now strips the quotes and turns""back into". It is only used where an identifier is expected, so string literals are not affected.Tests
Added a
CHARACTER(36) NOT NULLcase totestCharsand atestDoubleQuotedIdentifierstest (schema-qualified table, plain and escaped field names). The suite otherwise behaves as before:FullTestreports "No tests found" on my PHPUnit 11 setup, with or without these changes.🤖 Generated with Claude Code