mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
fix odbc resource handling, patch by Dave Lawson
This commit is contained in:
parent
81f99c721b
commit
c3e4a2854a
2 changed files with 3 additions and 7 deletions
|
@ -915,11 +915,10 @@ PHP_FUNCTION(odbc_prepare)
|
|||
} else {
|
||||
result->values = NULL;
|
||||
}
|
||||
result->id = zend_list_insert(result, le_result);
|
||||
zend_list_addref(conn->id);
|
||||
result->conn_ptr = conn;
|
||||
result->fetched = 0;
|
||||
RETURN_RESOURCE(result->id);
|
||||
ZEND_REGISTER_RESOURCE(return_value, result, le_result);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
@ -1335,12 +1334,10 @@ PHP_FUNCTION(odbc_exec)
|
|||
} else {
|
||||
result->values = NULL;
|
||||
}
|
||||
result->id = zend_list_insert(result, le_result);
|
||||
zend_list_addref(conn->id);
|
||||
result->conn_ptr = conn;
|
||||
result->fetched = 0;
|
||||
|
||||
RETURN_RESOURCE(result->id);
|
||||
ZEND_REGISTER_RESOURCE(return_value, result, le_result);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
@ -2044,7 +2041,7 @@ PHP_FUNCTION(odbc_free_result)
|
|||
result->values = NULL;
|
||||
}
|
||||
|
||||
zend_list_delete(result->id);
|
||||
zend_list_delete(Z_LVAL_PP(pv_res));
|
||||
|
||||
RETURN_TRUE;
|
||||
}
|
||||
|
|
|
@ -236,7 +236,6 @@ typedef struct odbc_result_value {
|
|||
|
||||
typedef struct odbc_result {
|
||||
ODBC_SQL_STMT_T stmt;
|
||||
int id;
|
||||
odbc_result_value *values;
|
||||
SWORD numcols;
|
||||
SWORD numparams;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue