From 4198e8f72770e35bc9e9878d7d82fd65e2aac3a7 Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Thu, 10 Sep 2009 01:20:42 +0000 Subject: [PATCH] - Possible fix for bug #49344 on Windows (pdo_mssql fails to connect,throws PDOException SQLSTATE[] (null) (severity 0)) --- ext/pdo_dblib/dblib_driver.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ext/pdo_dblib/dblib_driver.c b/ext/pdo_dblib/dblib_driver.c index 73201fc405..1d1d20ca97 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; -- 2.50.1