Skip to content

Commit e295266

Browse files
committed
Update FreeTDS version detection related to bug #72969
1 parent 4a81658 commit e295266

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

ext/pdo_dblib/tests/config.inc

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,11 @@
22

33
// bug #72969 reflects a bug with FreeTDS, not with pdo_dblib
44
// this function will version detect so the relevant tests can XFAILIF
5+
// assume this bug isn't present if not using FreeTDS
6+
// otherwise require FreeTDS>=1.1
57
function driver_supports_batch_statements_without_select($db) {
68
$version = $db->getAttribute(PDO::DBLIB_ATTR_VERSION);
7-
8-
// assume driver doesn't have this bug if not using FreeTDS
9-
if (!strstartswith($version, 'freetds ')) {
10-
return true;
11-
}
12-
13-
// hasn't made it to numbered release yet
14-
if (!strstartswith($version, 'freetds v1.1.dev.')) {
15-
return false;
16-
}
17-
18-
// fc820490336c50d5c175d2a15327383256add4c9 was committed on the 5th
19-
return intval(substr($version, -8)) >= 20161206;
9+
return !strstartswith($version, 'freetds ') || !strstartswith($version, 'freetds v1.0');
2010
}
2111

2212
function strstartswith($haystack, $needle) {

0 commit comments

Comments
 (0)