Skip to content

Commit

Permalink
Revert "Fix GH-13519: PGSQL_CONNECT_FORCE_RENEW with persistent conne…
Browse files Browse the repository at this point in the history
…ctions."

This reverts commit b9a9790.
  • Loading branch information
bukka committed Feb 27, 2024
1 parent 8494058 commit 330b26e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 39 deletions.
2 changes: 0 additions & 2 deletions NEWS
Expand Up @@ -44,8 +44,6 @@ PHP NEWS
- PGSQL:
. Fixed bug GH-13354 (pg_execute/pg_send_query_params/pg_send_execute
with null value passed by reference). (George Barbarosie)
. Fixed bug GH-13519 (PGSQL_CONNECT_FORCE_RENEW not working with persistent
connections. (David Carlier)

- Standard:
. Fixed array key as hash to string (case insensitive) comparison typo
Expand Down
7 changes: 0 additions & 7 deletions ext/pgsql/pgsql.c
Expand Up @@ -562,7 +562,6 @@ static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)

/* try to find if we already have this link in our persistent list */
if ((le = zend_hash_find_ptr(&EG(persistent_list), str.s)) == NULL) { /* we don't */
newpconn:
if (PGG(max_links) != -1 && PGG(num_links) >= PGG(max_links)) {
php_error_docref(NULL, E_WARNING,
"Cannot create new link. Too many open links (" ZEND_LONG_FMT ")", PGG(num_links));
Expand Down Expand Up @@ -591,12 +590,6 @@ static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
PGG(num_links)++;
PGG(num_persistent)++;
} else { /* we do */
if ((connect_type & PGSQL_CONNECT_FORCE_NEW)) {
if (zend_hash_del(&EG(persistent_list), str.s) != SUCCESS) {
goto err;
}
goto newpconn;
}
if (le->type != le_plink) {
goto err;
}
Expand Down
30 changes: 0 additions & 30 deletions ext/pgsql/tests/gh13519.phpt

This file was deleted.

0 comments on commit 330b26e

Please sign in to comment.