Bug #56991 [Opn->Fbk]: Insertion of Large CLOB/BLOB Fails
| From: | heiglandreas@php.net | Date: | Fri, 20 Jan 2017 20:52:20 +0000 |
| Subject: | Bug #56991 [Opn->Fbk]: Insertion of Large CLOB/BLOB Fails | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-206794@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=56991&edit=1
ID: 56991
Updated by: heiglandreas@php.net
Reported by: kfbombar at us dot ibm dot com
Summary: Insertion of Large CLOB/BLOB Fails
-Status: Open
+Status: Feedback
Type: Bug
-Package: PDO_ODBC
+Package: *General Issues
Operating System: Linux
PHP Version: 5_1 CVS-2006-04-28
Block user comment: N
Private report: N
New Comment:
Is this still relevant?
Previous Comments:
------------------------------------------------------------------------
[2006-05-01 10:20:23] kfbombar at us dot ibm dot com
The file that is getting inserted is about 351 KB.
There is nothing different seen with adding:
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
The database still does not have all of the correct information from the file.
------------------------------------------------------------------------
[2006-04-29 21:45:31] wez@php.net
How much data gets inserted?
What information do you see if you add:
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
after you create the database connection?
------------------------------------------------------------------------
[2006-04-28 11:57:02] kfbombar at us dot ibm dot com
Description:
------------
The insertion of a large CLOB or BLOB file (>300K) into DB2 will not work correctly through
PDO_ODBC. The entire file is not uploaded to the database.
Reproduce code:
---------------
<?
$db = new PDO('odbc:db2node', 'db2inst1', 'db2pass');
$db->exec( "DROP TABLE odbctest" );
$db->exec( "CREATE TABLE odbctest (large clob)" );
$fp = fopen('/home/user/largefile.txt', 'r');
$stmt = $db->prepare('INSERT INTO odbctest (large) values (?)');
$stmt->bindParam( 1, $fp, PDO::PARAM_LOB );
$stmt->execute();
?>
Expected result:
----------------
The database should have the correct data inserted into it.
Actual result:
--------------
Only partial data is inserted into DB2.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=56991&edit=1