For some JQL drivers Column Name and Column Label are different

Description

When you use AS to rename a column in SQL it creates a label for the column that is different than name. For PgSQL driver and some others, it is not important, getColumnLabel is delegated to getColumnLabel when getting column meta data from ResultsetMetadata. But for MariaDB this is not the case. And for MySQL when useOldAliasBehavior flag is false label and name are different.
For MariaDB, when we try to retrieve value of a column using rs.getBigInt(String), string is interpreted as column label, not name. So passing column name cause column not found error. It doesn't fallback to column name when it can resolve a label.
When processing metadata to retrieve columns we should get their labels, not names. Because we pass this to rs.getInt etc. methods which interpret them as label (for marinade).

Environment

None

Assignee

Deniz Oğuz

Reporter

Deniz Oğuz

Labels

None

Source

None

Jira Version

Database Type/Version

MySQL

Browser Type/Version

Chrome

Fix versions

Priority

Major
Configure