summaryrefslogtreecommitdiff
path: root/ext/pdo_dblib/dblib_stmt.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2007-01-14 16:57:50 (GMT)
committerIlia Alshanetsky <iliaa@php.net>2007-01-14 16:57:50 (GMT)
commitc5588fae3aa3cc6f494810325f8a76e64e245cec (patch)
treedf625119933f552cb066fdb7aba5b5b191f7d9a7 /ext/pdo_dblib/dblib_stmt.c
parenta6ff74de282a381b8b71bceb9e87ac1cd29978e4 (diff)
downloadphp-c5588fae3aa3cc6f494810325f8a76e64e245cec.tar.gz
Fixed bug #40121 (PDO_DBLIB driver wont free statements).
Diffstat (limited to 'ext/pdo_dblib/dblib_stmt.c')
-rw-r--r--ext/pdo_dblib/dblib_stmt.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/ext/pdo_dblib/dblib_stmt.c b/ext/pdo_dblib/dblib_stmt.c
index 4f985e9..3be4876 100644
--- a/ext/pdo_dblib/dblib_stmt.c
+++ b/ext/pdo_dblib/dblib_stmt.c
@@ -250,6 +250,17 @@ static int pdo_dblib_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_da
return 1;
}
+static int dblib_mysql_stmt_cursor_closer(pdo_stmt_t *stmt TSRMLS_DC)
+{
+ pdo_dblib_stmt *S = (pdo_mysql_stmt*)stmt->driver_data;
+
+ if (S->rows) {
+ free_rows(S TSRMLS_CC);
+ S->rows = NULL;
+ }
+
+ return 1;
+}
struct pdo_stmt_methods dblib_stmt_methods = {
pdo_dblib_stmt_dtor,
@@ -261,5 +272,7 @@ struct pdo_stmt_methods dblib_stmt_methods = {
NULL, /* set attr */
NULL, /* get attr */
NULL, /* meta */
+ NULL, /* nextrow */
+ dblib_mysql_stmt_cursor_closer
};