Fixes primary fields name in CreateTableSQL for Abstract Platform
thank you for positing this Pull Request. I have automatically opened an issue on our Jira Bug Tracker for you with the details of this Pull-Request. See the Link:
What are you trying to fix ? I don't see any testcase showing that a bug has been fixed and no reference to an existing ticket
This fixe is for a bug that a see when i want to create a new table with MySQL Driver.
I define a primary key named 'key'. The column name was correctly escape, but not the primary key definition.
Without fix: PRIMARY KEY(key)
With fix: PRIMARY KEY(`key`)
This is a reserved keyword for MySQL.
I don't have the time for writting some unit tests about that.
Thanks a lot.
it should be escaped only when the column is marked as needing quotes IMO, as quoting column names introduces issues
The name is escape only if it's a reserved keyword.
You hope i listen this sentence and apply it instead of apply quoting ?
"Let me answer with another question: why on earth do you use a reserved keyword as identifier? ;-) "
So, why the columns name should be quoted and not the index ?
Verified, i am working on a fix thtas different than this one though.
Fixed in master and 2.3