Bug #8198 mysql_list_dbcolumns() and inset_fields() fetch entire table
Submitted: 29 Jan 2005 22:04 Modified: 9 Mar 2005 3:08
Reporter: Dean Ellis Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / ODBC Severity:S3 (Non-critical)
Version:3.51.10 OS:
Assigned to: CPU Architecture:Any

[29 Jan 2005 22:04] Dean Ellis
Description:
The mysql_list_dbcolumns() and insert_fields() functions unnecessarily retrieve all rows from a table.

How to repeat:
Call SQLColumns(), or just look at catalog.c (mysql_list_dbcolumns) and cursor.c (insert_fields).

Suggested fix:
Add LIMIT 1 (or LIMIT 0) clauses to the statements these functions are generating.
[14 Feb 2005 17:09] Dean Ellis
Fixed in 3.51.11.
[9 Mar 2005 3:08] Paul DuBois
Noted in MyODBC 3.51.11 changelog.