From:             steil at zweitwerk dot com
Operating system: Linux
PHP version:      5.2.6
PHP Bug Type:     PDO related
Bug description:  PDO_OCI only fetches 512 bytes from a LONG column

Description:
------------
If you fetch from an Oracle column of datatype long, and the actual data
is more than 512 byte long it will be truncated and the following warning
will be issued
"Warning: PDOStatement::fetch(): column 0 data was too large for buffer
and was truncated to fit it in"

Reproduce code:
---------------
$db = new PDO('oci:dbname=...', 'user', 'pwd');
$res = $db->query("SELECT longcolumn FROM table WHERE length(longcolumn) >
512");
$row = $res->fetch();
print_r('data length: '. strlen($row[0]));

results in $row[0] being truncated and the output
data length: 512

Expected result:
----------------
$row[0] should contain all of the data and the output
data length: x   (where x > 512)


-- 
Edit bug report at http://bugs.php.net/?id=45021&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=45021&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=45021&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=45021&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=45021&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=45021&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=45021&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=45021&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=45021&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=45021&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=45021&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=45021&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=45021&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=45021&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=45021&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=45021&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=45021&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=45021&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=45021&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=45021&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=45021&r=mysqlcfg

Reply via email to