This completes the fix for PECL #5827; we need to gobble up result sets in the

stmt dtor too.
This commit is contained in:
Wez Furlong 2006-04-09 06:49:07 +00:00
parent 0f4137fbd9
commit bb5f3aa012

View File

@ -66,6 +66,16 @@ static int pdo_mysql_stmt_dtor(pdo_stmt_t *stmt TSRMLS_DC)
efree(S->out_null);
efree(S->out_length);
}
#endif
#if HAVE_MYSQL_NEXT_RESULT
while (mysql_more_results(S->H->server)) {
if (mysql_next_result(S->H->server) == 0) {
MYSQL_RES *res = mysql_store_result(S->H->server);
if (res) {
mysql_free_result(res);
}
}
}
#endif
efree(S);
return 1;