Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ANNOUNCE: DBD::Oracle 1.15

53 views
Skip to first unread message

Tim Bunce

unread,
Jan 28, 2004, 11:09:16 AM1/28/04
to dbi-an...@perl.org, dbi-...@perl.org
After 10 months of, er, stability, I'm very happy to release a new
version of DBD::Oracle. This one should build more happily on more
systems with more recent versions of Oracle.

file: $CPAN/authors/id/T/TI/TIMB/DBD-Oracle-1.15.tar.gz
size: 214579 bytes
md5: a8f161fc7e0431bc24598c7f7167c6ea

=head1 Changes in DBD-Oracle 1.15 27th January 2004

NOTE: DBD::Oracle now requires DBI version 1.28 (June 2002) or later.

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

NOTE: This release will build for perl 5.5 only after some manual edits
which are detailed in README.help. Future releases may not build for 5.5.
Perl 5.5.3 is very old and and upgrading to at least 5.6.1 is recommended.
The DBI itself has required perl >= 5.6.0 since DBI 1.38, August 2003.

Fixed Makefile.PL for HPUX thanks to H.Merijn Brand & Sweth Chandramouli.
Fixed Makefile.PL for handling 32/64bit libs thanks to Lincoln Baxter,
Sean Kelly, Joel Van Boeckel and others. Oh the fun we've had.
Fixed Makefile.PL error typo thanks to Martijn Koster.
Fixed to build okay for Oracle 8.0.x and for older C compilers.
Fixed minor omission in t/ph_test.t thanks to Tom Malaher.
Fixed for extproc_perl (http://search.cpan.org/author/JHORWITZ/extproc_perl/)
Fixed Oraperl handling of ora_errno and ora_errstr thanks to Martin Busik.
Fixed PRECISION for "NUMBER" to be 126 not 0 thanks to Steffen Goeldner.
Fixed bind_param_inout() for placeholders not assigned to in PL/SQL.

Changed bind_param_inout for CHAR types to no longer use a minimum
length of 28 characters. Warning: this change may break code that
doesn't pass bind_param_inout() a length value large enough for the
returned string. (The minimum length was not documented and should
not have been relied upon. This change currently only applies to the
CHAR type but may extended to all string types in a later release.)
Changed type_info_all() to return the same type info as Oracle's own
ODBC driver does, thanks to Andy Hassall for the data.
The types include LOBs but not the new TIMESTAMP and INTERVAL types.

Added direct access to LOB Locators and major LOB Locator functions
such as $sth->ora_lob_read(...), $sth->ora_lob_write(...) etc.
This work was sponsored by Geospiza Inc.
Added LOB Locator example docs thanks to Mark Dilger at Geospiza.
Added TIMESTAMP [WITH [LOCAL] TIME ZONE]] support
thanks to Stephen Clouse and Robert Wyrick.
Added INTERVAL YEAR TO MONTH, INTERVAL DAY TO SECOND support.
Added warning for bad DSN string format thanks to Michael A Chase.
Added /*+RULE*/ hint to metadata method SQL thanks to Andy Hassall.
Added README.linux thanks to William Fishburne, Stephen Clouse and Brent LaVelle.
Added README.aix thanks to KC, Mike Paladino and Rafael Caceres.
Added connect example using OS authentication thanks to Bob Thomson.
Added prepare("...", { ora_placeholders => 0 }) to disable placeholders.
Added docs for returning a recordset (table/array) using Oracle >=9.0.1
via "FUNCTION foo RETURN type PIPELINED" thanks to Steve Baldwin.
Added docs on ora_check_sql=>0 in prepare() to avoid server-side parses.
Added support for sharing database connections with ProC/SQLLIB code
via ora_use_proc_connection attribute, thanks to Kristian Nielsen
needs build time option thanks to Steffen Goeldner
Added (restored) the error "possibly near <*> indicator" marker for
syntax errors thanks to Jason Hitt and Andy Hassall.
Added $dbh->{ora_parse_error_offset} attribute thanks to Andy Hassall.
Added auto setting of $dbh->{Username} if not given to connect
i.e. using Oracle OS authentication and connecting as "/"
by selecting SYS_CONTEXT('userenv','session_user') from the db
thanks to Eric Lenio and Andy Hassall.

Updated README.macosx thanks to Danial Pearce and William Goedicke.
Updated README.help for UnixWare thanks to Earle Nietzel.
Updated PL/SQL cursor examples, plus Oracle.ex/README and curref.pl
examples thanks to Michael A Chase.
Updated PL/SQL example setup thanks to Bob Kline.

=cut

There are a lot of changes here. And there are a lot of changes
that are not here but which are lying in various states of undoneness
on my disks. As I'm very busy with DBI work at the moment, and will
be for some time, I'm not sure how soon I'll get round to those.

If you'd like to volunteer to tackle any particular topic, such as
character set handling (for which I have a patch from Oracle) or any
other itch you want to scratch, then do please get in touch with me.

Enjoy!

Tim.

Sean Kelly

unread,
Jan 29, 2004, 11:35:57 AM1/29/04
to dbi-...@perl.org
Quoting Tim Bunce <Tim....@pobox.com>:

> Fixed Makefile.PL for handling 32/64bit libs thanks to Lincoln Baxter,
> Sean Kelly, Joel Van Boeckel and others. Oh the fun we've had.

Straight out of the box, release 1.15 did not compile for me. Again :)
It's still picking up the 64bit Oracle libs when it needs to refer to the
32bit ones.

Providing a path to the lib32 dir using -l still works.

System:

Solaris 8 for SPARC (64bit)
Perl 5.8.2 sun4-solaris-thread-multi (32bit)
GCC 2.95.3 (32bit)
DBI 1.40

Thanks,

--
Sean Kelly <li...@shortestpath.org>

Tim Bunce

unread,
Jan 29, 2004, 1:07:11 PM1/29/04
to Sean Kelly, dbi-...@perl.org
On Thu, Jan 29, 2004 at 04:35:57PM +0000, Sean Kelly wrote:
> Quoting Tim Bunce <Tim....@pobox.com>:
>
> > Fixed Makefile.PL for handling 32/64bit libs thanks to Lincoln Baxter,
> > Sean Kelly, Joel Van Boeckel and others. Oh the fun we've had.
>
> Straight out of the box, release 1.15 did not compile for me. Again :)
> It's still picking up the 64bit Oracle libs when it needs to refer to the
> 32bit ones.

Please investigate and try to fix. Problems like this ain't gonna
get fixed without help from people like you who experience the problem.

It's not rocket science. A little digging should find the cause and
how to fix it. But it's digging I can't do myself as it "works for me"
(I don't have a 64 bit system here).

Please help.

Tim.

Honza Pazdziora

unread,
Jan 29, 2004, 6:46:49 AM1/29/04
to dbi-...@perl.org, Tim....@pobox.com
On Wed, Jan 28, 2004 at 04:09:16PM +0000, Tim Bunce wrote:
> After 10 months of, er, stability, I'm very happy to release a new
> version of DBD::Oracle. This one should build more happily on more
> systems with more recent versions of Oracle.

The following patch is needed to make DBD::Oracle 1.15 run
with NLS_LANG=AMERICAN_AMERICA.UTF8 on database with character set
EE8ISO8859P2. It's inspired by Frank Adler's post

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=utf-8&inlang=pl&selm=f3eafca5.0201300213.19e3914f%40posting.google.com

any by observing that other pieces of oci8.c multiply by 10, instead
of Frank's value of 2:

--- oci8.c.orig 2004-01-10 01:00:34.000000000 +0100
+++ oci8.c 2004-01-29 12:24:11.000000000 +0100
@@ -1067,7 +1067,7 @@
avg_width = fbh->dbsize / 2;
/* FALLTHRU */
case 96: /* CHAR */
- fbh->disize = fbh->dbsize;
+ fbh->disize = fbh->dbsize * 10;
fbh->prec = fbh->disize;
break;
case 23: /* RAW */


Without this patch, some of my selects fail with

ORA-24345: A Truncation or null fetch error occurred (DBD ERROR: ORA-01406 error on field 1 of 24, ora_type 1)

I believe that with more traditional setup with UTF-8 both database
and client charset the conversion doesn't take place and selects go
as expected.

My database is of version 8.0.5 and I tested with client libraries
from 9.2.0.0.0, perl 5.8.1. The DBD::Oracle was compiled with
-DUTF8_SUPPORT, the -D got there by default. The compile was clean.
It failed some tests in t/long.t but I believe we do not care about
those as the version of Oracle is too old and would probably use
a couple of Oracle patches in the first place (those I cannot apply
as the server is not under my (complete) control).

I'm adding output of $dbh->trace (column names were edited as I'm
not sure now sensitive the knowledge in the database schema is :-)
and perl -V. If a log of make / make test is needed, I can attach
it as well.

DBI::db=HASH(0x81c5284) trace level set to 2 in DBI 1.39-ithread (pid 13661) -> selectall_arrayref for DBD::Oracle::db (DBI::db=HASH(0x81c4ad4)~0x81c5284 '
select * from ccap.ccap_fak_load
') thr#804bd58
1 -> prepare for DBD::Oracle::db (DBI::db=HASH(0x81c5284)~INNER '
select * from ccap.ccap_fak_load
' undef) thr#804bd58
fbh 1: 'F1' NO null , otype 2-> 5, dbsize 22/134, p0.s0
fbh 2: 'F2' NULLable, otype 2-> 5, dbsize 22/134, p0.s0
fbh 3: 'F3' NO null , otype 1-> 5, dbsize 2/3, p2.s0
fbh 4: 'F4' NULLable, otype 2-> 5, dbsize 22/134, p0.s0
fbh 5: 'F5' NO null , otype 2-> 5, dbsize 22/134, p4.s0
fbh 6: 'F6' NULLable, otype 2-> 5, dbsize 22/134, p0.s0
fbh 7: 'F7' NO null , otype 1-> 5, dbsize 2/3, p2.s0
fbh 8: 'F8' NULLable, otype 2-> 5, dbsize 22/134, p0.s0
fbh 9: 'F9' NO null , otype 2-> 5, dbsize 22/134, p4.s0
fbh 10: 'F10' NULLable, otype 1-> 5, dbsize 20/21, p20.s0
fbh 11: 'F11' NO null , otype 12-> 5, dbsize 7/76, p75.s0
fbh 12: 'F12' NO null , otype 12-> 5, dbsize 7/76, p75.s0
fbh 13: 'F13' NULLable, otype 12-> 5, dbsize 7/76, p75.s0
fbh 14: 'F14' NO null , otype 1-> 5, dbsize 3/4, p3.s0
fbh 15: 'F15' NO null , otype 1-> 5, dbsize 20/21, p20.s0
fbh 16: 'F16' NULLable, otype 1-> 5, dbsize 255/256, p255.s0
fbh 17: 'F17' NULLable, otype 1-> 5, dbsize 255/256, p255.s0
fbh 18: 'F18' NULLable, otype 1-> 5, dbsize 20/21, p20.s0
fbh 19: 'F19' NULLable, otype 1-> 5, dbsize 6/7, p6.s0
fbh 20: 'F20' NO null , otype 1-> 5, dbsize 1/2, p1.s0
fbh 21: 'F21' NO null , otype 1-> 5, dbsize 1/2, p1.s0
fbh 22: 'F22' NULLable, otype 1-> 5, dbsize 2000/2001, p2000.s0
fbh 23: 'F23' NULLable, otype 2-> 5, dbsize 22/134, p0.s0
fbh 24: 'F24' NULLable, otype 2-> 5, dbsize 22/134, p0.s0
fbh 25: 'F25' NULLable, otype 1-> 5, dbsize 255/256, p255.s0
1 <- prepare= DBI::st=HASH(0x81c5380) at oracle_utf8_select line 14
dbd_st_execute SELECT (out0, lob0)...
dbd_st_execute SELECT returned (SUCCESS, rpc0, fn4, out0)
!! ERROR: 24345 'ORA-24345: A Truncation or null fetch error occurred (DBD ERROR: ORA-01406 error on field 15 of 25, ora_type 1)'
<- selectall_arrayref= [ ARRAY(0x8211c34) ] at oracle_utf8_select line 14
1 -> FETCH for DBD::Oracle::db (DBI::db=HASH(0x81c5284)~INNER 'ParamValues') thr#804bd58
error: 24345 'ORA-24345: A Truncation or null fetch error occurred (DBD ERROR: ORA-01406 error on field 15 of 25, ora_type 1)'
1 <- FETCH= undef at oracle_utf8_select line 14
DBD::Oracle::db selectall_arrayref failed: ORA-24345: A Truncation or null fetch error occurred (DBD ERROR: ORA-01406 error on field 15 of 25, ora_type 1) [for
Statement "
select * from ccap.ccap_fak_load
"] at ./oracle_utf8_select line 14.
DBD::Oracle::db selectall_arrayref failed: ORA-24345: A Truncation or null fetch error occurred (DBD ERROR: ORA-01406 error on field 15 of 25, ora_type 1) [for
Statement "
select * from ccap.ccap_fak_load
"] at ./oracle_utf8_select line 14.
-> DESTROY for DBD::Oracle::st (DBI::st=HASH(0x81c53f8)~INNER) thr#804bd58
error: 24345 'ORA-24345: A Truncation or null fetch error occurred (DBD ERROR: ORA-01406 error on field 15 of 25, ora_type 1)'
<- DESTROY= undef
-> DESTROY for DBD::Oracle::db (DBI::db=HASH(0x81c5284)~INNER) thr#804bd58
Issuing rollback() for database handle being DESTROY'd without explicit disconnect().
error: 24345 'ORA-24345: A Truncation or null fetch error occurred (DBD ERROR: ORA-01406 error on field 15 of 25, ora_type 1)'
<- DESTROY= undef


# perl -V
Summary of my perl5 (revision 5.0 version 8 subversion 1) configuration:
Platform:
osname=linux, osvers=2.4.21-2.elsmp, archname=i386-linux-thread-multi
uname='linux daffy.perf.redhat.com 2.4.21-2.elsmp #1 smp wed sep 17 15:00:55 edt 2003 i686 i686 i386 gnulinux '
config_args='-des -Doptimize=-O2 -g -pipe -march=i386 -mcpu=i686 -Dversion=5.8.1 -Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Red Hat, Inc. -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux -Dvendorprefix=/usr -Dsiteprefix=/usr -Dotherlibdirs=/usr/lib/perl5/5.8.1 -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl -Ubincompat5005 -Uversiononly -Dinc_version_list=5.8.0/i386-linux-thread-multi 5.8.0 -Dpager=/usr/bin/less -isr'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
optimize='-O2 -g -pipe -march=i386 -mcpu=i686',
cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing -I/usr/local/include -I/usr/include/gdbm'
ccversion='', gccversion='3.3.1 20030930 (Red Hat Linux 3.3.1-6)', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='gcc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
libc=/lib/libc-2.3.2.so, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version='2.3.2'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5/5.8.1/i386-linux-thread-multi/CORE'
cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl):
Compile-time options: DEBUGGING MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL_IMPLICIT_CONTEXT
Built under linux
Compiled at Oct 15 2003 10:52:47
@INC:
/usr/lib/perl5/5.8.1/i386-linux-thread-multi
/usr/lib/perl5/5.8.1
/usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.1
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.1
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.0
/usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.1/i386-linux-thread-multi
/usr/lib/perl5/5.8.1
.


--
------------------------------------------------------------------------
Honza Pazdziora | ade...@fi.muni.cz | http://www.fi.muni.cz/~adelton/
.project: Perl, mod_perl, DBI, Oracle, large Web systems, XML/XSL, ...
Only self-confident people can be simple.

Lincoln A. Baxter

unread,
Jan 29, 2004, 9:53:20 PM1/29/04
to Sean Kelly, Dbi-Users
Put a few prints in a sub called ora_libdir (defined around line 859).
What decisions is it making and why?
0 new messages