From c1a7cfb7d5553ec9d1d2e993e29287b501284129 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 10 Aug 2005 18:32:17 -0700 Subject: Fix mysql_info() returning bad data in the results of a multi-statement query that mixed statements that do and do not return info. (Bug #11688) mysql-test/r/metadata.result: Add new results mysql-test/t/metadata.test: Add new regression test sql-common/client.c: Clear mysql->info in free_old_query() --- sql-common/client.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sql-common') diff --git a/sql-common/client.c b/sql-common/client.c index 860db63c531..73e136f7366 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -713,8 +713,9 @@ void free_old_query(MYSQL *mysql) if (mysql->fields) free_root(&mysql->field_alloc,MYF(0)); init_alloc_root(&mysql->field_alloc,8192,0); /* Assume rowlength < 8192 */ - mysql->fields=0; - mysql->field_count=0; /* For API */ + mysql->fields= 0; + mysql->field_count= 0; /* For API */ + mysql->info= 0; DBUG_VOID_RETURN; } -- cgit v1.2.1