Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CHARACTER keyword as alias of CHAR type spoils parsing CHARACTER SET utf8 #365

Open
czoIg opened this issue Aug 23, 2022 · 0 comments
Open

Comments

@czoIg
Copy link
Contributor

czoIg commented Aug 23, 2022

Added in #355 support for CHARACTER as alias of CHAR data type spoils parsing of CHARACTER SET utf8:

CREATE TABLE IF NOT EXISTS example (`type` varchar (255) CHARACTER SET utf8 NOT NULL) DEFAULT CHARACTER SET utf8

which ends up with skipping the encoding in created query and breaks the Issue265Test:

-'CREATE TABLE IF NOT EXISTS example (`type` varchar (255) CHARACTER SET NOT NULL) DEFAULT CHARACTER SET utf8'
+'CREATE TABLE IF NOT EXISTS example (`type` varchar (255) CHARACTER SET utf8 NOT NULL) DEFAULT CHARACTER SET utf8'

I propose to remove the CHARACTER as it is very rare and undocumented.

czoIg pushed a commit to czoIg/PHP-SQL-Parser that referenced this issue Aug 24, 2022
czoIg pushed a commit to czoIg/PHP-SQL-Parser that referenced this issue Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant