php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2316 'Document contains no data' when fetching/loading empty lob values
Submitted: 1999-09-16 16:58 UTC Modified: 2006-07-17 08:52 UTC
From: robert dot everett at wcom dot com Assigned:
Status: Closed Package: OCI8 related
PHP Version: 3.0.12 OS: Solaris 2.6
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: robert dot everett at wcom dot com
New email:
PHP Version: OS:

 

 [1999-09-16 16:58 UTC] robert dot everett at wcom dot com
Calling the load() method on a lob locator or calling OCIFetchInto with the OCI_RETURN_LOBS flag set causes the error 'Document contains no data' if the value of the lob is empty (i.e., initialized with empty_clob() or empty_blob()). No error occurs if the value is null (i.e., uninitialized) or contains data.

Here are the details:

PHP 3.0.12
Apache 1.3.9
Oracle 8.0.4
Solaris 2.6

$stmt = OCIParse($conn, "insert into foobar (id, lob1, lob2) values (1, null, empty_clob())");
OCIExecute($stmt);
OCIFreeStatement($stmt);

$stmt = OCIParse($conn, "select lob1, lob2 from foobar where id = 1");
OCIExecute($stmt);
OCIFetch($stmt);
$lob1 = OCIResults($stmt, 0);
$contents1 = $lob1->load; //**OK
$lob2 = OCIResults($stmt, 1);
$contents2 = $lob2->load; //**error occurs
OCIFreeStatement($stmt);

-- OR --

$stmt = OCIParse($conn, "select lob2 from foobar");
OCIExecute($stmt);
OCIFetchInto($stmt, &$results, OCI_RETURN_LOBS); //**error occurs
OCIFreeStatement($stmt);

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-09-17 04:20 UTC] thies at cvs dot php dot net
fixed in CVS!	
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 10:01:26 2024 UTC