Browse Source

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?
PHP-5.1
Wez Furlong 21 years ago
parent
commit
b2424b2e08
  1. 2
      ext/pdo_mysql/mysql_statement.c

2
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

Loading…
Cancel
Save