From: Adam Baratz Date: Fri, 8 May 2020 15:16:52 +0000 (-0400) Subject: Update FreeTDS version detection related to bug #72969 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e295266f8f80cb9001e35a6701d92dcad37a18a9;p=php Update FreeTDS version detection related to bug #72969 --- diff --git a/ext/pdo_dblib/tests/config.inc b/ext/pdo_dblib/tests/config.inc index 165f1d9330..0ea2abfef6 100644 --- a/ext/pdo_dblib/tests/config.inc +++ b/ext/pdo_dblib/tests/config.inc @@ -2,21 +2,11 @@ // bug #72969 reflects a bug with FreeTDS, not with pdo_dblib // this function will version detect so the relevant tests can XFAILIF +// assume this bug isn't present if not using FreeTDS +// otherwise require FreeTDS>=1.1 function driver_supports_batch_statements_without_select($db) { $version = $db->getAttribute(PDO::DBLIB_ATTR_VERSION); - - // assume driver doesn't have this bug if not using FreeTDS - if (!strstartswith($version, 'freetds ')) { - return true; - } - - // hasn't made it to numbered release yet - if (!strstartswith($version, 'freetds v1.1.dev.')) { - return false; - } - - // fc820490336c50d5c175d2a15327383256add4c9 was committed on the 5th - return intval(substr($version, -8)) >= 20161206; + return !strstartswith($version, 'freetds ') || !strstartswith($version, 'freetds v1.0'); } function strstartswith($haystack, $needle) {