Bug #34032 MYSQL_FIELD size is different than the size returned from the server
Submitted: 24 Jan 2008 12:49 Modified: 24 Jan 2008 14:33
Reporter: Eyal N Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: C API (client library) Severity:S1 (Critical)
Version:5.1.22-rc OS:Any
Assigned to: CPU Architecture:Any
Tags: MYSQL_FIELD extension

[24 Jan 2008 12:49] Eyal N
Description:
Getting a pointer mysql_fetch_row and traversing the fields' member using MYSQL_FIELD, I'm getting wrong data for the fields' information. When I remove the "extension" field from the MYSQL_FIELD in the mysql.h file - everything works fine. It seems like the server doesn't allocate space for the "extension" pointer ( part of the MYSQL_FIELD struct members ).

How to repeat:
use mysql_fetch_row and get a pointer to "fields" member which is an array of char* and then go to the second/third etc. columns. what you will get is a bugus information in each of the MYSQL_FIELD's members.
[24 Jan 2008 14:33] Eyal N
Sorry, my mistake, it is not a bug - my bad !!