diff options
author | unknown <jimw@mysql.com> | 2005-08-10 18:32:17 -0700 |
---|---|---|
committer | unknown <jimw@mysql.com> | 2005-08-10 18:32:17 -0700 |
commit | c1a7cfb7d5553ec9d1d2e993e29287b501284129 (patch) | |
tree | 8f7e0b27237aaa9d4b903707652d1074c68247f1 /sql-common | |
parent | 888a931432cfe4f35744226563aafd5a1545650d (diff) | |
download | mariadb-git-c1a7cfb7d5553ec9d1d2e993e29287b501284129.tar.gz |
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()
Diffstat (limited to 'sql-common')
-rw-r--r-- | sql-common/client.c | 5 |
1 files changed, 3 insertions, 2 deletions
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; } |