Issues

ZF-7160: PDO_OCI fetchAll bug with LOBs

Description

just create this table on your DB


CREATE TABLE "XE"."TEMPLATES" ( "ID" NUMBER NOT NULL ENABLE, "NOME" VARCHAR2(30 BYTE) NOT NULL ENABLE, "CODICE" CLOB, CONSTRAINT "TEMPLATE_PK" PRIMARY KEY ("ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "USERS" ENABLE ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "USERS" LOB ("CODICE") STORE AS ( TABLESPACE "USERS" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10 NOCACHE LOGGING STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)) ;


then insert 2 records in the table, something like


Insert into TEMPLATES (ID,NOME,CODICE) values (13,'mktg_00','(CLOB) aa'); Insert into TEMPLATES (ID,NOME,CODICE) values (15,'tech_00','(CLOB) bb');


then connect to the db using Zend_Db_Adapter_Pdo_Oci then simply do:


$db->fetchAll("SELECT * FROM templates");


and PHP will directly crash. if you instead call a fetchRow all will work fine.

Comments

i encounter the same problem. when can this issue be fixed? 'd appreciate any feedback from the assignee...

best holger

I am not able to reproduce with provided code.

Windows PHP 5.2.8 and 5.3.0 ZF trunk r19719 Oracle 9i and 10g

I were on ubuntu linux 9.04 (jaunty), i think it depends on the php/pdo_oci version, the php version was 5.2.6 (http://packages.ubuntu.com/jaunty/php5), i can't remember the pdo_oci version :-(

Ok, I will try with Ubuntu. Can you check your versions of: PHP, Oracle Client and PDO_OCI?

i had - windows xp sp3 - php 5.2.11 with corresponding pdo_oci module - oracle 8i, latest client - latest zf release

Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".

Feel free to re-open and provide a patch if you want to fix this issue.