I have encountered a problem with the 'extended' support for
objects in DBD::Oracle. Specifically, if $dbh->{ora_objects}
is true, any attempt to fetch a nested table of objects
causes perl to crash with a segmentation fault.
Versions:
OS: SLES10 SP2 (64bit)
Oracle: 10.2.0.4 (64bit)
Perl: 5.10.0 (64bit)
DBI: 1.609
DBD::Oracle: 1.23
The following SQL*Plus script to set up the demonstration table
is based on an example in the DBD::Oracle pod:
CREATE OR REPLACE TYPE GRADELIST AS TABLE OF NUMBER;
/
CREATE OR REPLACE TYPE STUDENT AS OBJECT(
NAME VARCHAR2(60),
SOME_GRADES GRADELIST);
/
CREATE OR REPLACE TYPE STUDENTS_T AS TABLE OF STUDENT;
/
CREATE TABLE GROUPS(
GRP_ID NUMBER(4),
GRP_NAME VARCHAR2(10),
STUDENTS STUDENTS_T)
NESTED TABLE STUDENTS STORE AS GROUP_STUDENTS_TAB
(NESTED TABLE SOME_GRADES STORE AS GROUP_STUDENT_GRADES_TAB);
INSERT INTO GROUPS (GRP_ID, GRP_NAME, STUDENTS) VALUES (
1234,
'ABCD',
STUDENTS_T(STUDENT('A.N. Other', GRADELIST(5,6,7)))
);
The following perl script segfaults on the call of fetch:
#!/usr/local/bin/perl -w
use strict;
use DBI;
my $dbh = DBI->connect('dbi:Oracle:', <credentials>, {RaiseError=>1});
$dbh->{ora_objects} = 1;
my $sth = $dbh->prepare("select * from groups"); $sth->execute;
print("about to fetch\n");
$sth->fetch;
print("fetched\n");
$sth->finish; $dbh->disconnect;
--
Charles Jardine - Computing Service, University of Cambridge
c...@cam.ac.uk Tel: +44 1223 334506, Fax: +44 1223 334679