[php-src] PR #21681: pdo_dblib: Do not reuse dead connections
| From: | freddy77 | Date: | Thu, 09 Apr 2026 09:49:48 +0000 |
| Subject: | [php-src] PR #21681: pdo_dblib: Do not reuse dead connections | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-35630@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/21681
Author: freddy77
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 https://github.com/FreeTDS/freetds/issues/711#issuecomment-4211772091
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.