I've been playing around with the DBD::Oracle 1.20 RC4 embedded object
support and found that I get segfaults unless I apply the following patch:
--- oci8.c.old 2007-12-13 16:54:45.625233000 -0500
+++ oci8.c 2007-12-13 16:48:21.204639000 -0500
@@ -1544,7 +1544,7 @@
fld = &obj->fields[pos]; /*get the field */
if (fld->typecode == OCI_TYPECODE_OBJECT
|| fld->typecode == OCI_TYPECODE_VARRAY || fld->typecode ==
OCI_TYPECODE_TABLE || fld->typecode == OCI_TYPECODE_NAMEDCOLLEC\
TION){
empty_oci_object(fld);
- if (SvTYPE(fld->value) ==
SVt_PVAV){
+ if (fld->value &&
SvTYPE(fld->value) == SVt_PVAV){
av_clear(fld->value);
av_undef(fld->value);
}
@@ -1570,7 +1570,7 @@
default:
break;
}
- if (SvTYPE(fld->value) == SVt_PVAV){
+ if (fld->value && SvTYPE(fld->value) == SVt_PVAV){
av_clear(obj->value);
av_undef(obj->value);
}
I don't really know the code well enough to understand why fld->value is 0
in those cases, but it was. I hope someone who knows this code will look
at it.
-Paul