Re: DBD-Oracle 1.24a reports ORA-24334 in t/58object.t

[email protected] (Charles Jardine)
Newsgroups perl.dbi.users
Message-ID <[email protected]>
On 16/04/10 17:29, Everett, Timothy S wrote:
> This issue was previously reported by other people in thread "DBD-Oracle
> 1.23 reports ORA-24334 in t/58object.t" but I could not find any
> answers.   
> 
> I'm trying to install DBD-Oracle 1.24a with this environment:
> - perl 5.8.7 built for sun4-solaris-64
> - gcc 4.0.2
> - Solaris 10 update 6
> - Oracle 10.2.0.4
> 
> The build succeeds, but an ORA-24334 error is reported in the test
> script t/58object.t:

This problem does not occur on my platform
 - perl 5.10.1 64-bit
 - gcc 4.1.2
 - SLES 10 SP 3 x86-64
 - Oracle 10.2.0.4

I think your big-endian hardware has discovered a bug which my
little-endian hardware conceals.

 [snip]

> Rows per Fetch=60, Multiple Row Fetch=Off
> Field #2 is a  object or colection of some sort. Using OCIDefineObject
> and or OCIObjectPin
> At level=0 in description an embedded object
>         OCIErrorGet after OCIParamGet (er1:ok): -1, 24334: ORA-24334: no
> descriptor for this position
> 
>  level=0        type_name = TIM.DBD_TEST__TYPE_A
>         type_namel = 0
>         parmdp = 1008216f8
>         parmap = 0
>         tdo = 10093abf0
>         typecode = OBJECT
>         col_typecode = 0
>         element_typecode = (UNKNOWN OCI TYPECODE 0)
>         obj_ref = 100944e00
>         obj_value = 0
>         obj_type = 10093abf0
>         is_final_type = 0
>         field_count = 131072
>         fields = 10094d960

The field_count above should be 2. It is 2 * 2^16.

Could you please try the attached patch. I think it will fix the problem,
but I don't have any SPARC hardware to test it on.

-- 
Charles Jardine - Computing Service, University of Cambridge
[email protected]    Tel: +44 1223 334506, Fax: +44 1223 334679
sparc_patch (text/plain, 892 B)
diff -r -u DBD-Oracle-1.24/dbdimp.h DBD-Oracle-1.24.patched/dbdimp.h
--- DBD-Oracle-1.24/dbdimp.h	2010-01-18 13:32:54.000000000 +0000
+++ DBD-Oracle-1.24.patched/dbdimp.h	2010-04-19 15:17:18.871847234 +0100
@@ -158,7 +158,7 @@
 	OCIType			*obj_type;		 	/*if an embeded object this is the  OCIType returned by a OCIObjectPin*/
 	ub1				is_final_type;		/*object's OCI_ATTR_IS_FINAL_TYPE*/
 	fbh_obj_t		*fields;			/*one object for each field/property*/
-	int				field_count;		/*The number of fields Not really needed but nice to have*/
+	ub2				field_count;		/*The number of fields Not really needed but nice to have*/
 	fbh_obj_t		*next_subtype;		/*There is strored information about subtypes for inteherited objects*/
 	AV				*value;				/*The value to send back to Perl This way there are no memory leaks*/
 	SV				*full_type_name;	/*Perl value of full type name = schema_name "." type_name*/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.