From: Wez Furlong Date: Sat, 29 Oct 2005 02:16:35 +0000 (+0000) Subject: argh! we don't want to NULL the stmt here; freeing the results is not the same X-Git-Tag: RELEASE_1_0RC2~35 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b2424b2e0808807f52015235f7c9e1d3a7d459e4;p=php argh! we don't want to NULL the stmt here; freeing the results is not the same as destroying the prepared statement handler, so we're leaking and breaking, as can be seen by running the test suite. brown paper bag for PDO in PHP 5.1RC4? --- diff --git a/ext/pdo_mysql/mysql_statement.c b/ext/pdo_mysql/mysql_statement.c index db96a43ef3..7dc70a42ec 100755 --- a/ext/pdo_mysql/mysql_statement.c +++ b/ext/pdo_mysql/mysql_statement.c @@ -244,7 +244,6 @@ static int pdo_mysql_stmt_next_rowset(pdo_stmt_t *stmt TSRMLS_DC) #if HAVE_MYSQL_STMT_PREPARE if (S->stmt) { mysql_stmt_free_result(S->stmt); - S->stmt = NULL; } #endif if (S->result) { @@ -574,7 +573,6 @@ static int pdo_mysql_stmt_cursor_closer(pdo_stmt_t *stmt TSRMLS_DC) #if HAVE_MYSQL_STMT_PREPARE if (S->stmt) { int retval = mysql_stmt_free_result(S->stmt); - S->stmt = NULL; return retval ? 0 : 1; } #endif