From:             crescentfreshpot at yahoo dot com
Operating system: Win XP
PHP version:      5CVS-2006-06-05 (snap)
PHP Bug Type:     OCI8 related
Bug description:  OCI-Lob read advances wrong internal pointer

Description:
------------
I think OCI-Lob::read() is reading from the wrong handle when called
multiple times on different lob descriptors.



Reproduce code:
---------------
sql:
create table lobtest (lobdata clob);
insert into lobtest (lobdata) values('data data data data data data data
data');
insert into lobtest (lobdata) values('data2 data2 data2 data2 data2 data2
data2 data2');
commit;

php:
$conn  = oci_connect('xxx','yyy','zzz');
$stmt = oci_parse($conn, "select lobdata from lobtest");
oci_execute($stmt);

$row1 = oci_fetch_array($stmt, OCI_NUM);
$row2 = oci_fetch_array($stmt, OCI_NUM);

var_dump($row1[0]->tell());
var_dump($row1[0]->read(8192));

var_dump($row2[0]->tell());
var_dump($row2[0]->read(8192));

Expected result:
----------------
int(0)
string(39) "data data data data data data data data"
int(0)
string(0) "data2 data2 data2 data2 data2 data2 data2 data2"

Actual result:
--------------
int(0)
string(39) "data data data data data data data data"
int(39)
string(0) ""

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

Reply via email to