This was not an issue with pdo_dblib, but rather with FreeTDS. FreeTDS has been
fixed as of the fc820490336c50d5c175d2a15327383256add4c9 on that repo. These
tests will be skipped if a version of FreeTDS with that issue is present.
I only cleaned up this commit for pushing. For fixing the FreeTDS issue and
writing corresponding pdo_dblib tests, thanks to:
Jeff Farr <jefarr@wayfair.com>
FreeTDS had a buggy behavior where it would pass invalid values:
https://sourceforge.net/p/freetds/bugs/59/
The fix for this issue -- bc22b2ef817fb5d102bd758111ff3634b39a1319 on their
repo -- was to always use SYBESMSG for dberr. This makes it so the existing
pdo_dblib code would work as is. But by ignoring the dberr value in this
function, it will behave correctly, even with older versions of FreeTDS.
* PHP-7.0:
Add special case for earlier versions of TDS
Adjust error formatting so ext/pdo/tests/bug_43130.phpt passes with pdo_dblib
Free error and message strings when cleaning up PDO instances that use pdo_dblib
Add common suite
This reverts a1a18fca6e which was intended to fix
bug #52885. That commit introduced a BC break which wasn't universally
desirable. The issue of quoting binary data (or NVARCHAR strings, or other
nonstandard types) will have to be addressed separately.
Keep old 5.6 behavior: return Uniqidentifier value as 36-byte hex string (not binary),
when PDO::ATTR_STRINGIFY_FETCHES is TRUE
pdo_dblib: Stringify uniqidentifier field
Keep old 5.6 behavior: return Uniqidentifier value as 36-byte hex string (not binary),
when PDO::ATTR_STRINGIFY_FETCHES is TRUE
Tests added.
pdo_dblib: Stringify uniqidentifier field
Keep old 5.6 behavior: return Uniqidentifier value as 36-byte hex string (not binary),
when PDO::ATTR_STRINGIFY_FETCHES is TRUE
Tests fix.
pdo_dblib: Stringify uniqueidentifier field Added separate PDO::DBLIB_ATTR_STRINGIFY_UNIQUEIDENTIFIER attribute instead of PDO::ATTR_STRINGIFY_FETCHES.
pdo_dblib: Stringify uniqueidentifier field Added `getAttribute` support for PDO::DBLIB_ATTR_STRINGIFY_UNIQUEIDENTIFIER.
Simplify storage of stringify_uniqueidentifier attribute