Skip to content

Commit 330b26e

Browse files
committed
Revert "Fix GH-13519: PGSQL_CONNECT_FORCE_RENEW with persistent connections."
This reverts commit b9a9790.
1 parent 8494058 commit 330b26e

File tree

3 files changed

+0
-39
lines changed

3 files changed

+0
-39
lines changed

NEWS

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ PHP NEWS
4444
- PGSQL:
4545
. Fixed bug GH-13354 (pg_execute/pg_send_query_params/pg_send_execute
4646
with null value passed by reference). (George Barbarosie)
47-
. Fixed bug GH-13519 (PGSQL_CONNECT_FORCE_RENEW not working with persistent
48-
connections. (David Carlier)
4947

5048
- Standard:
5149
. Fixed array key as hash to string (case insensitive) comparison typo

ext/pgsql/pgsql.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,6 @@ static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
562562

563563
/* try to find if we already have this link in our persistent list */
564564
if ((le = zend_hash_find_ptr(&EG(persistent_list), str.s)) == NULL) { /* we don't */
565-
newpconn:
566565
if (PGG(max_links) != -1 && PGG(num_links) >= PGG(max_links)) {
567566
php_error_docref(NULL, E_WARNING,
568567
"Cannot create new link. Too many open links (" ZEND_LONG_FMT ")", PGG(num_links));
@@ -591,12 +590,6 @@ static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
591590
PGG(num_links)++;
592591
PGG(num_persistent)++;
593592
} else { /* we do */
594-
if ((connect_type & PGSQL_CONNECT_FORCE_NEW)) {
595-
if (zend_hash_del(&EG(persistent_list), str.s) != SUCCESS) {
596-
goto err;
597-
}
598-
goto newpconn;
599-
}
600593
if (le->type != le_plink) {
601594
goto err;
602595
}

ext/pgsql/tests/gh13519.phpt

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)