Bug #112988 MySQL ODBC Connector 8.00.28 and above and openSchema()
Submitted: 7 Nov 2023 10:38 Modified: 18 Jun 12:32
Reporter: Emmanuel Duverney Email Updates:
Status: Can't repeat Impact on me:
None 
Category:Connector / ODBC Severity:S2 (Serious)
Version:8.2 OS:Windows (Windows 10 64 bits)
Assigned to: CPU Architecture:Any
Tags: 8, ODBC, openSchema

[7 Nov 2023 10:38] Emmanuel Duverney
Description:
The openSchema(adColumns, ...) function returns incoherent data since the version 8.0.28. Till the version 8.00.27, openSchema(...) returns the columns contained in the schema to which I am connected. From the version 8.00.28, I get all the columns of all the tables available on the server and the TABLE_CATALOG and TABLE_SCHEMA columns are empty. With the version 8.2, the situation is the same except that TABLE_CATALOG contains the name of the current schema while TABLE_SCHEMA is empty.

How to repeat:
Connect to the a specific schema of the DB, call openSchema(adColumns, ...) and display the result.
[7 Nov 2023 12:46] MySQL Verification Team
Hello Emmanuel,

Thank you for the bug report.
Could you please provide sample test case to reproduce this issue at our end?

Regards,
Ashwini Patil
[8 Nov 2023 7:44] Emmanuel Duverney
Steps to reproduce (Delphi application).
Precondition: the connection has already been established with the TADOConnection "connection" object.

procedure TdbSchema.ShowSchema();
var dts : TADODataSet;
begin
  connection.OpenSchema(siColumns,EmptyParam, EmptyParam, dts);
  OIH_DB_Manager.loadDBGrid(dts, columnsgrid); //display dts content into a TStringGrid
  columnsgrid.resize();
end;

The content of columnsGrid does vary depending of the version of the ODBC connector used. 
Another symptomatic change observed with the connector 8.2 is that the ORDINAL_POSITION contains values going from 1..n, where n is the total number of colums in the whole schema, while with the version 8.00.27 and earlier, these values were going from 1..c for each table, where c is the number of columns of the related table.
[22 Jul 2024 12:58] MySQL Verification Team
Hello Emmanuel,

Thank you for the bug report.
Please upgrade to latest version and report us back if issue persist even in latest version along with test case. Thank you.

Regards,
Ashwini Patil
[29 Jul 2024 12:54] Emmanuel Duverney
Dear Madame, dear Sir,
I just tested the latest version of the ODBC connector (9.0) regarding the issue described earlier. The issue with the ORDINAL_POSITION still remains: it gives an absolute value instead of the position of the column in the table as returned by the version 8.0.27 and earlier.
The steps to reproduce remain the same as in my previous post.

Our application still doesn't run correctly with the version 9.0, but I haven't identified the reason yet.

Many thanks in advance and best regards,
  Emmanuel Duverney
[18 Jun 12:32] MySQL Verification Team
Hello Emmanuel Duverney,

Thank you for the details. However this is not enough to reproduce the issue.
Please upgrade to latest version and report us back if issue persist even in latest version along with repeatable test case. Thank you.

Regards,
Ashwini Patil