Bug #57490 [Opn->Dup]: CLOB insert failed due to ORA-00932 error

From: Date: Mon, 03 May 2021 11:49:39 +0000
Subject: Bug #57490 [Opn->Dup]: CLOB insert failed due to ORA-00932 error
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-233651@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=57490&edit=1 ID: 57490 Updated by: cmb@php.net Reported by: dv at allyoucanthink dot de Summary: CLOB insert failed due to ORA-00932 error -Status: Open +Status: Duplicate Type: Bug -Package: PDO_OCI +Package: PDO OCI Operating System: irrelevant PHP Version: 5.2.0 RC4 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: Duplicate of bug #57095. Previous Comments: ------------------------------------------------------------------------ [2007-06-18 15:20:44] christopher dot jones at oracle dot com Duplicate of http://pecl.php.net/bugs/bug.php?id=7943 ------------------------------------------------------------------------ [2007-02-06 06:35:15] jabarthes_no_spam at free dot fr Same problem with Version 5.1.4.4 ------------------------------------------------------------------------ [2007-01-23 11:58:08] dv at allyoucanthink dot de Description: ------------ it is unpossible insrt data into CLOB fields... BLOB inserts working fine Reproduce code: --------------- dl('pdo_oci.so'); $db = new PDO('oci:', 'scott', 'tiger'); /* CREATE TABLE CREDITS ( ID NUMBER, NAME VARCHAR(255), BLOBDATA BLOB, CLOBDATA CLOB ) */ $query = ' INSERT INTO CREDITS ( ID, NAME, BLOBDATA, CLOBDATA ) VALUES ( ?, ?, EMPTY_BLOB(), EMPTY_CLOB() ) RETURNING BLOBDATA, CLOBDATA INTO ?, ? '; $stmt = $db->prepare($query); if(!$stmt) { $r = $db->errorInfo(); print_r($r); exit; } $id = 555; $name = 'test'; $fp1 = fopen('PDO_OCI-1.0.tgz', 'rb'); $fp2 = fopen('file.txt', 'r'); $stmt->bindParam(1, $id); $stmt->bindParam(2, $name); $stmt->bindParam(3, $fp1, PDO::PARAM_LOB); $stmt->bindParam(4, $fp2, PDO::PARAM_LOB); $db->beginTransaction(); $r = $stmt->execute(); fclose($fp1); fclose($fp2); if(!$r) { print_r($stmt->errorInfo()); $db->rollback(); } else { $db->commit(); } Expected result: ---------------- values must be insterted in BLOB and CLOB fields as expected Actual result: -------------- execute failed due to following error - OCIStmtExecute: ORA-00932: inconsistent datatypes: expected BLOB got CLOB (/tmp/pear/cache/PDO_OCI-1.0.1/oci_statement.c:142) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=57490&edit=1

« previous php.bugs (#233651) next »