php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56991 Insertion of Large CLOB/BLOB Fails
Submitted: 2006-04-28 11:57 UTC Modified: 2017-01-29 04:22 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: kfbombar at us dot ibm dot com Assigned:
Status: No Feedback Package: *General Issues
PHP Version: 5_1 CVS-2006-04-28 OS: Linux
Private report: No CVE-ID: None
 [2006-04-28 11:57 UTC] 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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-04-29 21:45 UTC] 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-05-01 10:20 UTC] 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.
 [2017-01-20 20:52 UTC] heiglandreas@php.net
-Status: Open +Status: Feedback -Package: PDO_ODBC +Package: *General Issues
 [2017-01-20 20:52 UTC] heiglandreas@php.net
Is this still relevant?
 [2017-01-29 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 09 01:01:27 2024 UTC