Hi,
Apologies in advance for the size of this...

I've installed DBD-Oracle-1.14 on Solaris 9 against Oracle 7.3.4 client libs
(Perl 5.8.3 + DBI-1.42) and there's a couple of issues I can't seem to fix

------------

I'm getting bizzare errors against previously working code (multiple
scripts). Basically, the   

        while (.... = $sth->fetch*...)  

loops all fail on the final iteration with:

"Use of uninitialized value in subroutine entry at <myscript>.pl line
<whatever>
DBD::Oracle::st fetchrow_array warning:  [for Statement <mySQL>] at
<myscript.pl> line <whatever>"

The actual line number varies inside the fetch loops, usually falling on an
innocent 'print' or 'if' somewhere in the loop. I always run against warn
and strict pragmas so checking against undef's is routine, has anyone seen
this before or have any suggestions?

Everything worked fine against Perl 5.6.1 and 5.7 on Sol8 but I don't recall
which versions of DBD/DBI I was running (machine crashed and burned) I've
tried sunfreeware packages for 5.8.3, compiling 5.8.4 from source (and
recompiling/installing the DBI/DBD mods against both) but nothing seems to
help. I'll go back to 5.6 if I have to, but it's a last resort at the moment
(beign as the installed 5.6 on this box is built with Sun CC ... and all the
related issues)

testing against combined prepare/exe/fetch methods gives the same result:

        my $dbh = DBI->connect('DBI:Oracle:$db', $user, $pass, {RaiseError
=> 0, PrintError => 0, AutoCommit => 0}) or die "connect: $DBI::errstr\n";
        my $row = $dbh->selectcol_arrayref("SELECT sysdate FROM dual") or
die "selectcol: $DBI::errstr\n";

<trace output>

    -> STORE for DBD::Oracle::db (DBI::db=HASH(0x2a2714)~INNER
'dbi_connect_closure' CODE(0x296210))
    <- STORE= 1 at DBI.pm line 648
    -> selectcol_arrayref in DBD::_::db for DBD::Oracle::db
(DBI::db=HASH(0x1fa4d8)~0x2a2714 'SELECT sysdate FROM dual')
1   -> prepare for DBD::Oracle::db (DBI::db=HASH(0x2a2714)~INNER 'SELECT
sysdate FROM dual' undef)
    fbh 1: 'SYSDATE'    NULLable, otype  12->  5, dbsize 7/75, p0.s0
      out: ftype 5, bufl 76. indp 0, rlen 0, rcode 0
1   <- prepare= DBI::st=HASH(0x2a3480) at DBI.pm line 1464
    -> execute for DBD::Oracle::st (DBI::st=HASH(0x2a3480)~0x1fc6e8)
    dbd_st_execute (for sql f4 after oci f8, out0)...
    dbd_st_execute complete (rc1403, w00, rpc1, eod1403, out0)
    <- execute= 1 at DBI.pm line 1466
    -> bind_col in DBD::_::st for DBD::Oracle::st
(DBI::st=HASH(0x2a3480)~0x1fc6e8 1 SCALAR(0x2a26d8))
    <- bind_col= 1 at DBI.pm line 1471
    -> fetch for DBD::Oracle::st (DBI::st=HASH(0x2a3480)~0x1fc6e8)
    <- fetch= [ '07-JUN-2004' ] row1 at DBI.pm line 1478
    -> fetch for DBD::Oracle::st (DBI::st=HASH(0x2a3480)~0x1fc6e8)
    !! warn: 0 undef (err#0)
    <- fetch= undef row1 at DBI.pm line 1478
    -> DESTROY for DBD::Oracle::st (DBI::st=HASH(0x1fc6e8)~INNER)
       warn: 0 undef (err#0)
    <- DESTROY= undef at dbtest2.pl line 7
    !! warn: 0 undef (err#0)
    <- selectcol_arrayref= [ '07-JUN-2004' ] at dbtest2.pl line 7
Use of uninitialized value in subroutine entry at ./dbtest2.pl line 7.
1   -> FETCH for DBD::Oracle::db (DBI::db=HASH(0x2a2714)~INNER
'ParamValues')
       warn: 0 undef (err#0)
1   <- FETCH= undef at dbtest2.pl line 7
DBD::Oracle::db selectcol_arrayref warning:  [for Statement "SELECT sysdate
FROM dual"] at ./dbtest2.pl line 7.
    -> disconnect for DBD::Oracle::db (DBI::db=HASH(0x1fa4d8)~0x2a2714)
    <- disconnect= 1 at dbtest2.pl line 8
    -> DESTROY for DBD::Oracle::db (DBI::db=HASH(0x2a2714)~INNER)
    <- DESTROY= undef
    -- DBI::END
    -> disconnect_all for DBD::Oracle::dr (DBI::dr=HASH(0x231fe0)~0x2a16c4)
    <- disconnect_all= (not implemented) at DBI.pm line 657
!   -> DESTROY for DBD::Oracle::dr (DBI::dr=HASH(0x2a16c4)~INNER)
!   <- DESTROY= (not implemented) during global destruction

</trace output>

Any suggestions (or ridicule if I'm missing something obvious) welcomed.

-----------

Second issue is minor really, but DBD-Oracle-1.15 fails to build against
Oracle 7 libs. Is this a known issue? I only ask since the 'Changes' in the
1.15 release notes reckon:

  "  NOTE: This is probably the last release that will support being built
with the old Oracle 7 OCI interface."

  Compiling 1.15 against Oracle 7.3.4 libs fails

  <compiler output spam>

gcc -B/usr/ccs/bin/ -c
-I/export/home/oracle/app/oracle/product/7.3.4//rdbms/demo
-I/export/home/oracle/app/oracle/product/7.3.4//rdbms/public -I.
-I/export/home/oracle/app/oracle/product/7.3.4//rdbms/demo
-I/export/home/oracle/app/oracle/product/7.3.4//rdbms/public
-I/usr/local/lib/perl5/site_perl/5.8.3/sun4-solaris/auto/DBI
-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O    -DVERSION=\"1.15\"  -DXS_VERSION=\"1.15\" -fPIC
"-I/usr/local/lib/perl5/5.8.3/sun4-solaris/CORE"  -DUTF8_SUPPORT Oracle.c
Oracle.c: In function `XS_DBD__Oracle__db_ora_lob_write':
Oracle.c:1165: error: `OCILobLocator' undeclared (first use in this
function)
Oracle.c:1165: error: (Each undeclared identifier is reported only once
Oracle.c:1165: error: for each function it appears in.)
Oracle.c:1165: error: `locator' undeclared (first use in this function)
Oracle.c:1178: error: parse error before ')' token
Oracle.xs:137: error: `OCI_ERROR' undeclared (first use in this function)
Oracle.xs:139: error: `OCI_SUCCESS' undeclared (first use in this function)
Oracle.xs:140: error: structure has no member named `errhp'
Oracle.c: In function `XS_DBD__Oracle__db_ora_lob_append':
Oracle.c:1216: error: `OCILobLocator' undeclared (first use in this
function)
Oracle.c:1216: error: `locator' undeclared (first use in this function)
Oracle.c:1228: error: parse error before ')' token
Oracle.xs:169: error: `OCI_ERROR' undeclared (first use in this function)
Oracle.xs:171: error: `OCI_SUCCESS' undeclared (first use in this function)
Oracle.xs:172: error: structure has no member named `errhp'
Oracle.c: In function `XS_DBD__Oracle__db_ora_lob_read':
Oracle.c:1265: error: `OCILobLocator' undeclared (first use in this
function)
Oracle.c:1265: error: `locator' undeclared (first use in this function)
Oracle.c:1279: error: parse error before ')' token
Oracle.xs:207: error: `OCI_ERROR' undeclared (first use in this function)
Oracle.xs:209: error: `OCI_SUCCESS' undeclared (first use in this function)
Oracle.xs:210: error: structure has no member named `errhp'
Oracle.c: In function `XS_DBD__Oracle__db_ora_lob_trim':
Oracle.c:1322: error: `OCILobLocator' undeclared (first use in this
function)
Oracle.c:1322: error: `locator' undeclared (first use in this function)
Oracle.c:1331: error: parse error before ')' token
Oracle.xs:231: error: `OCI_ERROR' undeclared (first use in this function)
Oracle.xs:233: error: `OCI_SUCCESS' undeclared (first use in this function)
Oracle.xs:234: error: structure has no member named `errhp'
Oracle.c: In function `XS_DBD__Oracle__db_ora_lob_length':
Oracle.c:1361: error: `OCILobLocator' undeclared (first use in this
function)
Oracle.c:1361: error: `locator' undeclared (first use in this function)
Oracle.c:1370: error: parse error before ')' token
Oracle.xs:253: error: `OCI_ERROR' undeclared (first use in this function)
Oracle.xs:255: error: `OCI_SUCCESS' undeclared (first use in this function)
Oracle.xs:256: error: structure has no member named `errhp'
*** Error code 1
make: Fatal error: Command failed for target `Oracle.o'

</compiler output spam>

Thanks,

-- 
Dan

Reply via email to