From: Pierre Joye Date: Fri, 9 Oct 2009 18:56:19 +0000 (+0000) Subject: - Possible fix for bug #49344 on Windows (pdo_mssql fails to connect,throws PDOExcep... X-Git-Tag: php-5.3.1RC2~37 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1ed8a4d6d64b83843197a5cc433eff53084b67f2;p=php - Possible fix for bug #49344 on Windows (pdo_mssql fails to connect,throws PDOException SQLSTATE[] (null) (severity 0)) --- diff --git a/ext/pdo_dblib/dblib_driver.c b/ext/pdo_dblib/dblib_driver.c index cfd993b029..029f3e1128 100644 --- a/ext/pdo_dblib/dblib_driver.c +++ b/ext/pdo_dblib/dblib_driver.c @@ -230,11 +230,11 @@ static int pdo_dblib_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_ goto cleanup; } -#if PHP_DBLIB_IS_MSSQL - if (DBSETOPT(H->link, DBTEXTLIMIT, "2147483647") == FAIL) { - goto cleanup; - } -#endif + /* dblib do not return more than this length from text/image */ + DBSETOPT(H->link, DBTEXTLIMIT, "2147483647"); + + /* limit text/image from network */ + DBSETOPT(H->link, DBTEXTSIZE, "2147483647"); if (vars[3].optval && FAIL == dbuse(H->link, vars[3].optval)) { goto cleanup;