Bug #94235 MySQL Connector 8 uses depreciated 'COM_FIELD_LIST’
Submitted: 7 Feb 2019 9:50 Modified: 17 Nov 2021 17:31
Reporter: Ross Beer Email Updates:
Status: Closed Impact on me:
Category:Connector / ODBC Severity:S5 (Performance)
Version:8 OS:Linux
Assigned to: CPU Architecture:Any

[7 Feb 2019 9:50] Ross Beer
MySQL Connector 8 uses the depreciated 'COM_FIELD_LIST' which leads to the following error on some servers:

      Statement = 0x2b96b40594c0
      Catalog Name = [NULL]
      Schema Name = [NULL]
      Table Name = [table1][length = 11 (SQL_NTS)]
      Column Name = [%][length = 1 (SQL_NTS)]
      DIAG [HY000] [MySQL][ODBC 5.3(w) Driver][mysqld-5.5.62]Command not supported

How to repeat:
When using ProxySQL to load balance MySQL Server instances an error is thrown due to the use of the depreciated 'COM_FIELD_LIST’ in the MySQL ODBC Connector

Suggested fix:
As per the following link, alternate methods of getting column data should be used:

[13 Mar 2019 0:24] MySQL Verification Team
Thank you for the bug report.

[10 Mar 2021 10:18] Bogdan Degtyariov
Posted by developer:
The C API documentation is suggesting using SHOW COLUMNS instead of mysql_list_fields():

NOTE: SHOW COLUMNS statement is not a fully functional replacement for mysql_list_fields() because it is not returning some data such as maximum octet length.

For this reason the fix should get column metadata from Information_Schema.
[15 Sep 2021 8:39] Bogdan Degtyariov
Posted by developer:
The COM_FIELD_LIST was only used by SQLColumns() function when it worked without using Information_Schema.
With this patch SQLColumns() will use Information_Schema implementation by default.
COM_FIELD_LIST implementation is used when NO_I_S option is set.
[17 Nov 2021 17:31] Philip Olson
Posted by developer:
Fixed as of the upcoming MySQL Connector/ODBC 8.0.28 release, and here's the proposed changelog entry from the documentation team:

SQLColumns() now uses INFORMATION_SCHEMA instead of the deprecated
COM_FIELD_LIST by default. COM_FIELD_LIST is only used when NO_I_S is set
by Connector/ODBC (which disables INFORMATION_SCHEMA usage).

Thank you for the bug report.