Re: mysql_fetch_field_direct() bug?
Posted by: Konstantin Osipov
Date: December 27, 2005 05:49AM

What client library version do you use? Perhaps you're looking at the headers from 4.1, and using the server or the client of an earlier release.
This is the code that unpacks fields in 4.1 and later, and I also checked the server part, it saves the original table name in the metadata packet:

if (server_capabilities & CLIENT_PROTOCOL_41)
{
/* server is 4.1, and returns the new field result format */
for (row=data->data; row ; row = row->next,field++)
{
uchar *pos;
cli_fetch_lengths(&lengths[0], row->data, default_value ? 8 : 7);
field->catalog = strdup_root(alloc,(char*) row->data[0]);
field->db = strdup_root(alloc,(char*) row->data[1]);
field->table = strdup_root(alloc,(char*) row->data[2]);
field->org_table= strdup_root(alloc,(char*) row->data[3]);
field->name = strdup_root(alloc,(char*) row->data[4]);
field->org_name = strdup_root(alloc,(char*) row->data[5]);


You can see, that the original table name is unpacked all right. If you are able to repeat the problem against 4.1 (and later) client and server, please file a bug report.

Options: ReplyQuote


Subject
Views
Written By
Posted
935
December 19, 2005 01:04PM
418
December 24, 2005 04:17PM
441
December 26, 2005 04:39PM
Re: mysql_fetch_field_direct() bug?
413
December 27, 2005 05:49AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.