MySQL: Sort doesn't work with odd-cased column names

Description

Root cause:

  • MySQL's metadata says the column is "ColumnName" if queried with SELECT columnname FROM table1, but MySQL says the column is "columnname" with SELECT * FROM (SELECT columnname FROM table1) WHERE ....

  • Column names can't be escaped properly because " is the same as ' in MySQL, which makes "ColumnName" a literal string.

Environment

None

Observations

None

Assignee

Adrien Ragot (Play SQL / Requirement Yogi)

Reporter

Adrien Ragot (Old account)

Labels

None

Participants

None

Components

Fix versions

Affects versions

Priority

Configure