#35003 [NEW]: Warning: PDOStatement::fetch(): column 0 data was too large for buffer and was
| From: | derick@php.net | Date: | Thu, 27 Oct 2005 16:22:57 +0000 |
| Subject: | #35003 [NEW]: Warning: PDOStatement::fetch(): column 0 data was too large for buffer and was | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-87147@lists.php.net to get a copy of this message | ||
From: derick@php.net
Operating system: Linux - Fedora Core 1
PHP version: 5.1.0RC3
PHP Bug Type: Oracle related
Bug description: Warning: PDOStatement::fetch(): column 0 data was too large for buffer and was
Description:
------------
Strange warning when fetching data from an Oracle DB with PDO:
"column N data was too large for buffer and was truncated to fit it"
Reproduce code:
---------------
Environment:
============
PHP version: 5.1.0RC3
Server version: Oracle9i Enterprise Edition Release 9.2.0.4.0 -
Production
Client libraries: oracle-instantclient 10.1.0.4
OS: Fedora Core 1
How to reproduce:
=================
1. Execute the following query on your Oracle database:
CREATE TABLE pdotest (some_num INTEGER DEFAULT 0 NOT NULL);
2. Run the following script:
===============================================================================
<?
$query="SELECT data_default FROM user_tab_columns WHERE
table_name='PDOTEST'";
$db = new PDO('oci:dbname=orcl', 'trunk', 'tiger');
$sth = $db->query( $query );
for( $i=0; ( $row = $sth->fetch( PDO::FETCH_ASSOC ) ); $i++ )
var_dump( $row );
echo "$i rows fetched.\n";
?>
===============================================================================
Expected result:
----------------
No warnings.
Actual result:
--------------
Warning: PDOStatement::fetch(): column 0 data was too large for buffer and
was truncated to fit it in /path/to/test.php on
line 7
array(1) {
["DATA_DEFAULT"]=>
string(0) ""
}
1 rows fetched.
--
Edit bug report at http://bugs.php.net/?id=35003&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35003&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=35003&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=35003&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=35003&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=35003&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=35003&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=35003&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=35003&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=35003&r=support
Expected behavior: http://bugs.php.net/fix.php?id=35003&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=35003&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=35003&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=35003&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35003&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=35003&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=35003&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=35003&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=35003&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=35003&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=35003&r=mysqlcfg