changes to support Oracle 10 type BINARY_FLOAT




I was able to get DBD-Oracle-1.16 to read and write the new Oracle 10 types BINARY_FLOAT and BINARY_DOUBLE with just a few small changes. I also found a problem with Makefile.PL where it couldn't seem to recognize the client_version output from sqlplus for Oracle 10.2, it does now and still works with the earlier versions I tested against on RH Linux.


What follows are the diff files for Makefile.PL, dbdimp.c and oci8.c . I would attach the edited files but I'm not sure how this mailer handles attachments to usenet posts. The edited files are available for now at http://home.fnal.gov/~dbox/DBD-Oracle-1.16/

Cheers,
Dennis
=====================================================
% diff DBD-Oracle-1.16/Makefile.PL DBD-Oracle-1.16.changed/Makefile.PL
585a586
> $opts{DEFINE} .= ' -DORA_OCI_10' if $client_version >= 10.0;
1289c1290
< my $sqlplus_release = `$sqlplus_exe -S /nolog \@define.sql 2>&1`;
---
> my @sqlplus_release = `$sqlplus_exe -S /nolog \@define.sql 2>&1`;
1291,1293c1292,1297
< print $sqlplus_release;
< if ($sqlplus_release =~ /^DEFINE _SQLPLUS_RELEASE = "(\d?\d)(\d\d)(\d\d)(\d\d)(\d\d)"/) {
< $client_version_full = sprintf("%d.%d.%d.%d", $1, $2, $3, $4);
---
> my $sqlplus_output;
> foreach $sqlplus_output(@sqlplus_release){
>
> if ($sqlplus_output =~ /^DEFINE _SQLPLUS_RELEASE = "(\d?\d)(\d\d)(\d\d)(\d\d)(\d\d)"/) {
> $client_version_full = sprintf("%d.%d.%d.%d", $1, $2, $3, $4);
> }
========================================================
% diff DBD-Oracle-1.16/dbdimp.c DBD-Oracle-1.16.changed/dbdimp.c
172a173,176
> #if defined (ORA_OCI_10)
> case 21: /* BINARY FLOAT os-endian*/
> case 22: /* BINARY DOUBLE os-endian*/
> #endif
176a181,184
> #if defined (ORA_OCI_10)
> case 100: /* BINARY FLOAT oracle-endian*/
> case 101: /* BINARY DOUBLE oracle-endian*/
> #endif
2096a2105,2115
>
> #if defined (ORA_OCI_10)
> case SQLT_BDOUBLE:
> case SQLT_IBDOUBLE:
> case SQLT_BFLOAT: > case SQLT_IBFLOAT: > sql_fbh.dbtype = SQL_DOUBLE; > sql_fbh.prec = 126;
> break;
> #endif
>
============================================================
% diff DBD-Oracle-1.16/oci8.c DBD-Oracle-1.16.changed/oci8.c
1151a1152,1157
> #if defined (ORA_OCI_10)
> case 21: /* BINARY FLOAT os-endian*/
> case 22: /* BINARY DOUBLE os-endian*/
> case 100: /* BINARY FLOAT oracle-endian*/
> case 101: /* BINARY DOUBLE oracle-endian*/
> #endif



.