Skip to content

Commit 39dbe8c

Browse files
committed
Keep track of trans_res
1 parent 16896a5 commit 39dbe8c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

ibase_query.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ static int _php_ibase_alloc_array(ibase_array **ib_arrayp, XSQLDA *sqlda, /* {{{
248248

249249
/* allocate and prepare query */
250250
static int _php_ibase_prepare(ibase_query **new_query, ibase_db_link *link, /* {{{ */
251-
ibase_trans *trans, char *query)
251+
ibase_trans *trans, zend_resource *trans_res, char *query)
252252
{
253253
/* Return FAILURE, if querystring is empty */
254254
if (*query == '\0') {
@@ -261,6 +261,7 @@ static int _php_ibase_prepare(ibase_query **new_query, ibase_db_link *link, /* {
261261
ib_query->res = zend_register_resource(ib_query, le_query);
262262
ib_query->link = link;
263263
ib_query->trans = trans;
264+
ib_query->trans_res = trans_res;
264265
ib_query->dialect = link->dialect;
265266
ib_query->query = estrdup(query);
266267

@@ -1155,7 +1156,7 @@ PHP_FUNCTION(ibase_query)
11551156
}
11561157

11571158
ibase_query *ib_query;
1158-
if(FAILURE == _php_ibase_prepare(&ib_query, ib_link, trans, query)) {
1159+
if(FAILURE == _php_ibase_prepare(&ib_query, ib_link, trans, trans_res, query)) {
11591160
return;
11601161
}
11611162

@@ -1796,7 +1797,7 @@ PHP_FUNCTION(ibase_prepare)
17961797
RETURN_FALSE;
17971798
}
17981799

1799-
if(FAILURE == _php_ibase_prepare(&ib_query, ib_link, trans, query)){
1800+
if(FAILURE == _php_ibase_prepare(&ib_query, ib_link, trans, trans_res, query)){
18001801
RETURN_FALSE;
18011802
}
18021803

php_ibase_includes.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ typedef struct {
148148
typedef struct _ib_query {
149149
ibase_db_link *link;
150150
ibase_trans *trans;
151+
zend_resource *trans_res;
151152
zend_resource *res;
152153
isc_stmt_handle stmt;
153154
XSQLDA *in_sqlda, *out_sqlda;

0 commit comments

Comments
 (0)