diff options
author | unknown <jimw@mysql.com> | 2005-12-06 15:50:03 -0800 |
---|---|---|
committer | unknown <jimw@mysql.com> | 2005-12-06 15:50:03 -0800 |
commit | 4ea36b7a17c05d8fce35c7594930559d8e9c2f7a (patch) | |
tree | 372274c153c285b5eaef5b85f3447d2e160bc7dc /sql-common | |
parent | 3d1e9eae43a2cd353278b18da37c0ab28d88357d (diff) | |
download | mariadb-git-4ea36b7a17c05d8fce35c7594930559d8e9c2f7a.tar.gz |
Fix value returned by mysql_warning_count() after fetching a prepared
statement that generated a warning. (Bug #15510)
sql-common/client.c:
Reset warning_count in free_old_query(), don't stomp old value for
it in cli_read_query_result().
tests/mysql_client_test.c:
Add new regression test
Diffstat (limited to 'sql-common')
-rw-r--r-- | sql-common/client.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql-common/client.c b/sql-common/client.c index 976d59d83a4..4c2debd41ff 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -715,6 +715,7 @@ void free_old_query(MYSQL *mysql) init_alloc_root(&mysql->field_alloc,8192,0); /* Assume rowlength < 8192 */ mysql->fields= 0; mysql->field_count= 0; /* For API */ + mysql->warning_count= 0; mysql->info= 0; DBUG_VOID_RETURN; } @@ -2484,7 +2485,6 @@ get_info: DBUG_RETURN(1); mysql->status= MYSQL_STATUS_GET_RESULT; mysql->field_count= (uint) field_count; - mysql->warning_count= 0; DBUG_PRINT("exit",("ok")); DBUG_RETURN(0); } |