Edit report at https://bugs.php.net/bug.php?id=35003&edit=1

 ID:                 35003
 Comment by:         tomasz at trejderowski dot pl
 Reported by:        der...@php.net
 Summary:            Warning: PDOStatement::fetch(): column 0 data was
                     too large for buffer and was
 Status:             Closed
 Type:               Bug
 Package:            PDO related
 Operating System:   Linux - Fedora Core 1
 PHP Version:        5.1.0RC3
 Assigned To:        wez
 Block user comment: N
 Private report:     N

 New Comment:

Sorry, not true. As reported in many similar bug reports (in year 2005 and 
2007) and comments to them (in year 2007, 2010 and 2011) this issue is STILL 
NOT FIXED. Up until end of 2011. At least not for PHP + PDO + Oracle.


Previous Comments:
------------------------------------------------------------------------
[2005-10-28 17:02:53] tony2...@php.net

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.



------------------------------------------------------------------------
[2005-10-27 18:59:24] vs at ez dot no

Note that the query result is wrong. There actually should have been 0 instead 
of "". This is probably caused by the same problem.

------------------------------------------------------------------------
[2005-10-27 18:22:56] der...@php.net

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 this bug report at https://bugs.php.net/bug.php?id=35003&edit=1

Reply via email to