Skip to content

pdo_dblib: Do not reuse dead connections#21681

Open
freddy77 wants to merge 1 commit intophp:masterfrom
freddy77:master
Open

pdo_dblib: Do not reuse dead connections#21681
freddy77 wants to merge 1 commit intophp:masterfrom
freddy77:master

Conversation

@freddy77
Copy link
Copy Markdown

@freddy77 freddy77 commented Apr 9, 2026

In case of persistent connection it was not checked if the connection was still alive always assuming it was. If the connection was broken this caused PHP to reuse the broken connection over and over.
dbdead function is supported by all dblib implementation (MS, Sybase, FreeTDS).
Change tested manually, see FreeTDS/freetds#711 (comment)

Feel free to update comment or code.
As the comment above I didn't test the change myself.
I don't see an easy way to write a test for this change.

In case of persistent connection it was not checked if the
connection was still alive always assuming it was.
If the connection was broken this caused PHP to reuse the
broken connection over and over.
dbdead function is supported by all dblib implementation
(MS, Sybase, FreeTDS).
Change tested manually, see
FreeTDS/freetds#711 (comment)

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant