]> granicus.if.org Git - php/commitdiff
argh! we don't want to NULL the stmt here; freeing the results is not the same
authorWez Furlong <wez@php.net>
Sat, 29 Oct 2005 02:16:35 +0000 (02:16 +0000)
committerWez Furlong <wez@php.net>
Sat, 29 Oct 2005 02:16:35 +0000 (02:16 +0000)
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?

ext/pdo_mysql/mysql_statement.c

index db96a43ef34a041b4e498bf9bd0b6c5d7436ab0f..7dc70a42ec2d07cb3001fc892e97149478e8440e 100755 (executable)
@@ -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