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

Missing comma on ALTER TABLE with COLLATE and COLLATION #229

Closed
pszalko opened this issue Mar 7, 2019 · 4 comments
Closed

Missing comma on ALTER TABLE with COLLATE and COLLATION #229

pszalko opened this issue Mar 7, 2019 · 4 comments
Labels

Comments

@pszalko
Copy link
Contributor

pszalko commented Mar 7, 2019

Hi,

The following statement:

ALTER TABLE `place` CHANGE COLUMN `plc_location_type` `gplc_location_type` ENUM('LOCATION') CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL;

throws an exeception: "Missing comma before start of a new alter operation."

Looks like similar issue to #218

@pszalko
Copy link
Contributor Author

pszalko commented Mar 7, 2019

When removed both CHARACTER and COLLATE part from SQL, parser works fine.
The following SQL does not throw an exception:

ALTER TABLE `place` CHANGE COLUMN `plc_location_type` `gplc_location_type` ENUM('LOCATION') NOT NULL;

@williamdes williamdes added the bug label Mar 7, 2019
@williamdes
Copy link
Member

@devenbansod Can you please have a look ?

@arorakanav
Copy link

arorakanav commented Dec 15, 2020

I am still facing this issue in v4.9.4 for the statement with TO
ALTER table "tableName" CHANGE COLUMN "old_column_name" TO "new_column_name"

@williamdes
Copy link
Member

This is because you are using the SQL mode ANSI_QUOTES
https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_ansi_quotes

I think you should refer to #284 to follow any progress on this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants