Commit 7ec26b03 authored by Nisha Gopalakrishnan's avatar Nisha Gopalakrishnan

No commit message

No commit message
parent 6fce90e5
/* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. /* Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
...@@ -3790,12 +3790,15 @@ static void mysql_close_free(MYSQL *mysql) ...@@ -3790,12 +3790,15 @@ static void mysql_close_free(MYSQL *mysql)
*/ */
static void mysql_prune_stmt_list(MYSQL *mysql) static void mysql_prune_stmt_list(MYSQL *mysql)
{ {
LIST *element= mysql->stmts;
LIST *pruned_list= 0; LIST *pruned_list= 0;
for (; element; element= element->next) while(mysql->stmts)
{ {
MYSQL_STMT *stmt= (MYSQL_STMT *) element->data; LIST *element= mysql->stmts;
MYSQL_STMT *stmt;
mysql->stmts= list_delete(element, element);
stmt= (MYSQL_STMT *) element->data;
if (stmt->state != MYSQL_STMT_INIT_DONE) if (stmt->state != MYSQL_STMT_INIT_DONE)
{ {
stmt->mysql= 0; stmt->mysql= 0;
......
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