mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Add GC_PERSISTENT_LOCAL flag for ODBC structures (#14094)
Fixes nightly builds where ZEND_RC_DEBUG is enabled
This commit is contained in:
parent
d3b38fa8de
commit
afa034df99
1 changed files with 4 additions and 0 deletions
|
@ -503,6 +503,7 @@ static PHP_GINIT_FUNCTION(odbc)
|
||||||
#endif
|
#endif
|
||||||
odbc_globals->num_persistent = 0;
|
odbc_globals->num_persistent = 0;
|
||||||
zend_hash_init(&odbc_globals->connections, 0, NULL, NULL, true);
|
zend_hash_init(&odbc_globals->connections, 0, NULL, NULL, true);
|
||||||
|
GC_MAKE_PERSISTENT_LOCAL(&odbc_globals->connections);
|
||||||
}
|
}
|
||||||
|
|
||||||
static PHP_GSHUTDOWN_FUNCTION(odbc)
|
static PHP_GSHUTDOWN_FUNCTION(odbc)
|
||||||
|
@ -2129,6 +2130,9 @@ bool odbc_sqlconnect(zval *zv, char *db, char *uid, char *pwd, int cur_opt, bool
|
||||||
zend_hash_init(&link->connection->results, 0, NULL, ZVAL_PTR_DTOR, true);
|
zend_hash_init(&link->connection->results, 0, NULL, ZVAL_PTR_DTOR, true);
|
||||||
link->persistent = persistent;
|
link->persistent = persistent;
|
||||||
link->hash = zend_string_init(hash, hash_len, persistent);
|
link->hash = zend_string_init(hash, hash_len, persistent);
|
||||||
|
if (persistent) {
|
||||||
|
GC_MAKE_PERSISTENT_LOCAL(link->hash);
|
||||||
|
}
|
||||||
ret = SQLAllocEnv(&link->connection->henv);
|
ret = SQLAllocEnv(&link->connection->henv);
|
||||||
if (ret != SQL_SUCCESS && ret != SQL_SUCCESS_WITH_INFO) {
|
if (ret != SQL_SUCCESS && ret != SQL_SUCCESS_WITH_INFO) {
|
||||||
odbc_sql_error(link->connection, SQL_NULL_HSTMT, "SQLAllocEnv");
|
odbc_sql_error(link->connection, SQL_NULL_HSTMT, "SQLAllocEnv");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue