Bug #9194 [NEW]: "Cannot Determine LOB Size" from db2_fetch_array and db2_fetch_assoc

From: Date: Tue, 31 Oct 2006 02:58:46 +0000
Subject: Bug #9194 [NEW]: "Cannot Determine LOB Size" from db2_fetch_array and db2_fetch_assoc
Groups: php.pear.webmaster 
Request: Send a blank email to pear-webmaster+get-5358@lists.php.net to get a copy of this message
From: larry dot menard at rogers dot com Operating system: Windows XP, SP2 PHP version: 5.2.0 RC4 Package: Bug System Bug Type: Bug Bug description: "Cannot Determine LOB Size" from db2_fetch_array and db2_fetch_assoc Description: ------------ (Actually I'm using 5.2.0 RC6, but it's not in the drop-down list.) After doing a SELECT from a table that has a CLOB column that contains a NULL, a call to either db2_fetch_array() or db2_fetch_assoc() returns an error. Reproduce code: --------------- http://cpe0013102da23b-cm0f0079804905.cpe.net.cable.rogers.com/misc/gallery2/g2_cachemap/g2_cachemap.txt Run this script twice, first passing arg "odbc" (should run clean), then with arg "ibm_db2" (should fail). An additional symptom, I don't know if it's the same problem... Uncomment the line that inserts the 'x' then run it again. ODBC gets: array(1) { ["G_VALUE"]=> string(1) "x" } array(1) { ["G_VALUE"]=> NULL } ibm_db2 gets: array(1) { [0]=> string(1) "x" } array(1) { [0]=> string(1) "x" } The ibm_db2 output is again wrong. Expected result: ---------------- Processing statement "DROP TABLE g2_CacheMap"... Statement execution succesful. Processing statement "CREATE TABLE g2_CacheMap (g_value CLOB)"... Statement execution succesful. Processing statement "INSERT INTO g2_CacheMap (g_value) VALUES (NULL)"... Statement execution succesful. Processing statement "SELECT * FROM g2_CacheMap"... Statement execution succesful. array(1) { ["G_VALUE"]=> NULL } Actual result: -------------- Processing statement "DROP TABLE g2_CacheMap"... Statement execution succesful. Processing statement "CREATE TABLE g2_CacheMap (g_value CLOB)"... Statement execution succesful. Processing statement "INSERT INTO g2_CacheMap (g_value) VALUES (NULL)"... Statement execution succesful. Processing statement "SELECT * FROM g2_CacheMap"... Statement execution succesful. PHP Warning: db2_fetch_array(): Cannot Determine LOB Size in C:\MyServer\gallery2\g2_cachemap.php on line 69 Warning: db2_fetch_array(): Cannot Determine LOB Size in C:\MyServer\gallery2\g2_cachemap.php on line 69 -- Edit bug report at http://pecl.php.net/bugs/bug.php?id=9194&edit=1 --

« previous php.pear.webmaster (#5358) next »