Commit 6058edbe authored by konstantin@mysql.com's avatar konstantin@mysql.com

A fix for Bug#6761 "mysql_list_fields() does not work": test

case will be added to client_test in 4.1
parent e83f49bd
...@@ -1104,7 +1104,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, ...@@ -1104,7 +1104,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
thd->free_list=0; thd->free_list=0;
table_list.alias= table_list.real_name= thd->strdup(packet); table_list.alias= table_list.real_name= thd->strdup(packet);
packet=strend(packet)+1; packet=strend(packet)+1;
// command not cachable => no gap for data base name thd->query_length= strlen(packet); // for simplicity: don't optimize
if (!(thd->query=fields=thd->memdup(packet,thd->query_length+1))) if (!(thd->query=fields=thd->memdup(packet,thd->query_length+1)))
break; break;
mysql_log.write(thd,command,"%s %s",table_list.real_name,fields); mysql_log.write(thd,command,"%s %s",table_list.real_name,fields);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment