ID: 38805 Updated by: s...@php.net Reported By: gkrajci at arescorporation dot com Status: Assigned Bug Type: PDO related Operating System: Windows NT PBMA-WB2 5.2 build 37 PHP Version: 5.1.6 Assigned To: sfox New Comment:
Those changes are still in SVN. That means the TEXTLIMIT var is being set to its highest possible value, which in turn means that truncation shouldn't be an issue now. $pdo->query('SET TEXTSIZE 300000'); should work from PHP 5.2.11 up, it just needs doccing. Previous Comments: ------------------------------------------------------------------------ [2010-02-12 09:05:28] philipp at servicemail24 dot de This problem is actually fixed in cvs: http://www.mail-archive.com/php-...@lists.php.net/msg40731.html http://www.mail-archive.com/php-...@lists.php.net/msg40711.html Here is the working source code: http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_dblib/ I have no idea why these fixes aren't included in the 5.2 and 5.3 releases! @sfox can you ensure that pdo_dblib is updated with the release of 5.2.13 and 5.3.2? ------------------------------------------------------------------------ [2010-02-11 15:40:43] philipp at servicemail24 dot de php 5.3.2 dotdeb still suffers from this problem. does this fix help? "Possible fix: remove "case SQLTEXT" from ext/pdo_dblib/dblib_stmt.c:execute and let it fall though to default." ------------------------------------------------------------------------ [2010-01-22 22:51:02] ssufficool at gmail dot com I imagine the problem is that PDO DBLIB just mem-copies the first packet of TEXT without calling dbgettext() to retrieve the remainder. MSSQL handles TEXT fields using dbconvert() which may call dbgettext() downstream. Possible fix: remove "case SQLTEXT" from ext/pdo_dblib/dblib_stmt.c:execute and let it fall though to default. ------------------------------------------------------------------------ [2010-01-10 23:22:50] ka...@php.net Steph, does this need any additional changes to pdo_mssql/pdo_dblib? And what exactly should be documented? ------------------------------------------------------------------------ [2009-09-02 15:28:50] aballard at gmail dot com According to the SQL Server documenation, SET TEXTSIZE { number } by itself is not sufficient. That's why the original mssql library has two configuration directives: mssql.textlimit and mssql.textsize Since PDO is configured not to use configuration directives, it would be nice if the pdo_mssql driver added two driver_options to configure these values. A quote from SQL Server Books Online: Setting SET TEXTSIZE affects the @@TEXTSIZE function. The DB-Library variable DBTEXTLIMIT also limits the size of text data returned with a SELECT statement. If DBTEXTLIMIT is set to a smaller size than TEXTSIZE, only the amount specified by DBTEXTLIMIT is returned. For more information, see "Programming DB-Library for C" in SQL Server Books Online. The SQL Server ODBC driver and Microsoft OLE DB Provider for SQL Server automatically set TEXTSIZE to 2147483647 when connecting. The setting of set TEXTSIZE is set at execute or run time and not at parse time. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/38805 -- Edit this bug report at http://bugs.php.net/?id=38805&edit=1