Henrik & Tim -- thank you for your help; my responses are inline below.
On Mon, 2003-06-30 at 17:39, Tim Bunce wrote: > On Mon, Jun 30, 2003 at 01:51:03PM +0200, Henrik Tougaard wrote: > > David Coulthart skrev: > > > > > We recently migrated our site from DBI-1.21 to 1.37 and have noticed > > > that our DBD::Ingres installation broke. We were running > > > DBD::Ingres-0.32, but I also attempted to upgrade to 0.36 and am > > > having the same problem during make test. The problem relates to > > > using do() to execute a statement. From the make test attempt with > > > 0.36: > > > > > > t/dbi......Modification of non-creatable hash value attempted, > > > subscript "Statement" at blib/lib/DBD/Ingres.pm line 116. > > > > > > A colleague of mine has put up a bug report at > > > http://rt.cpan.org/NoAuth/Bug.html?id=2738 > > > > > > IMHO, it looks like this problem has to do with some sort of interface > > > change to DBI b/w 1.21 and 1.37. Does anyone know what the details of > > > this change would be and what the proper fix for the DBD::Ingres > > > module would be? > > > > > This pussles me, as did the tr.cpan bug report. I have just tried to install > > Ingres2.6, perl 5.8.0, DBI 1.37 and DBD::Ingres 0.36 on a clean Linux box. > > No problems - at all. > > But looking at the DBI docs I can see that $dbh->{Statement} should be > > read-only, which rules out my setting a value on it. > > The 'read only' actually only relates to applications not drivers. > (Although in fact applications can also set Statement currently.) > > > Why doesn't it fail for me, but for you? I just don't get it! > > What OS, Ingres and perl versions do you use? - That might give a clue. Here is the info from perl -V: Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration: Platform: osname=solaris, osvers=2.8, archname=sun4-solaris uname='sunos gmoney 5.8 generic sun4u sparc ' config_args='' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef Compiler: cc='gcc', ccflags ='-fno-strict-aliasing -I/opt/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O', cppflags='-fno-strict-aliasing -I/opt/local/include' ccversion='', gccversion='2.95.2 19991024 (release)', gccosandvers='solaris2.8' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, usemymalloc=y, prototype=define Linker and Libraries: ld='gcc', ldflags =' -L/opt/local/lib ' libpth=/usr/lib /opt/local/lib libs=-lsocket -lnsl -lgdbm -ldb -ldl -lm -lc perllibs=-lsocket -lnsl -ldl -lm -lc libc=, so=so, useshrplib=false, libperl=libperl.a Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' ' cccdlflags='-fPIC', lddlflags='-G -L/opt/local/lib' Characteristics of this binary (from libperl): Compile-time options: USE_LARGE_FILES Built under solaris Compiled at Apr 23 2001 17:02:35 @INC: /opt/perl5.6.1/lib/5.6.1/sun4-solaris /opt/perl5.6.1/lib/5.6.1 /opt/perl5.6.1/lib/site_perl/5.6.1/sun4-solaris /opt/perl5.6.1/lib/site_perl/5.6.1 /opt/perl5.6.1/lib/site_perl . As for Ingres, this is the line of info I get when I connect: Ingres SPARC SOLARIS Version II 2.0/0001 (su4.us5/00) login > A DBI trace may help. And send me the code around Ingres.pm line 116. The code from Ingres.pm (for both 0.32 and 0.36) around line 116 is the do routine: { package DBD::Ingres::db; # ====== DATABASE ====== use strict; sub do { my($dbh, $statement, $attribs, @params) = @_; Carp::carp "DBD::Ingres::\$dbh->do() attribs unused\n" if $attribs; Carp::carp "DBD::Ingres::\$dbh->do() params unused\n" if @params; $dbh->{Statement} = $statement; my $numrows = DBD::Ingres::db::_do($dbh, $statement); undef $dbh->{Statement}; return $numrows; } Line 116 in particular is: $dbh->{Statement} = $statement; A simple test case & DBI trace are as follows: #!/usr/bin/perl -w use strict; use DBI; my $dbname = "dbi:Ingres:test"; my $dbh = DBI->connect($dbname, "", "", { AutoCommit => 0, RaiseError => 1, }); DBI->trace(9, "ingres-trace.log"); $dbh->do("CREATE TABLE test1(id INTEGER4 not null, name CHAR(64))"); DBI->trace(0); $dbh->disconnect(); Executing this script generated the following error messages on stderr bseides the trace log below: Modification of non-creatable hash value attempted, subscript "Statement" at /opt/perl5.6.1/lib/site_perl/5.6.1/sun4-solaris/DBD/Ingres.pm line 116. Issuing rollback() for database handle being DESTROY'd without explicit disconnect(). The trace from executing this test case is: DBI 1.37-nothread dispatch trace level set to 9 >> do DISPATCH (DBI::db=HASH(0x10ea14) rc1/1 @2 g0 ima201 pid#13895) at ./testing.pl line 14 -> do for DBD::Ingres::db (DBI::db=HASH(0x10ea14)~0x1f05ac 'CREATE TABLE test1(id INTEGER4 not null, name CHAR(64))') >> DESTROY DISPATCH (DBI::db=HASH(0x10ea14) rc1/1 @1 g0 ima4 pid#13895) <> DESTROY ignored for outer handle DBI::db=HASH(0x10ea14) (inner DBI::db=HASH(0x1f05ac)) >> DESTROY DISPATCH (DBI::db=HASH(0x1f05ac) rc1/1 @1 g0 ima4 pid#13895) -> DESTROY for DBD::Ingres::db (DBI::db=HASH(0x1f05ac)~INNER) DBD::Ingres::dbd_db_rollback DBD::Ingres::dbd_db_disconnect DBD::Ingres::dbd_db_destroy <- DESTROY= undef DESTROY (dbih_clearcom) (dbh 0x10ea14 0x186ce0, com 0xfbad8, imp DBD::Ingres::db): FLAGS 0x191: COMSET Warn RaiseError PrintError PARENT DBI::dr=HASH(0x10ea38) KIDS 0 (0 Active) IMP_DATA undef dbih_clearcom 0x10ea14 (com 0xfbad8, type 2) done. -- DBI::END >> disconnect_all DISPATCH (DBI::dr=HASH(0x1aea08) rc1/3 @1 g0 ima801 pid#13895) at /opt/perl5.6.1/lib/site_perl/5.6.1/sun4-solaris/DBI.pm line 649 via ./testing.pl line 0 -> disconnect_all for DBD::Ingres::dr (DBI::dr=HASH(0x1aea08)~0x10ea38) <- disconnect_all= '' at /opt/perl5.6.1/lib/site_perl/5.6.1/sun4-solaris/DBI.pm line 649 via ./testing.pl line 0 ! >> DESTROY DISPATCH (DBI::dr=HASH(0x10ea38) rc1/1 @1 g0 ima4 pid#13895) during global destruction ! -> DESTROY for DBD::Ingres::dr (DBI::dr=HASH(0x10ea38)~INNER) ! <- DESTROY= (not implemented) during global destruction DESTROY (dbih_clearcom) (drh 0x1aea08 0x181d40, com 0xfe878, imp DBD::Ingres::dr): FLAGS 0x215: COMSET Active Warn AutoCommit PARENT undef KIDS 0 (0 Active) IMP_DATA undef dbih_clearcom 0x1aea08 (com 0xfe878, type 1) done. ! >> DESTROY DISPATCH (DBI::dr=HASH(0x1aea08) rc1/1 @1 g0 ima4 pid#13895) during global destruction ! <> DESTROY for DBI::dr=HASH(0x1aea08) ignored (inner handle gone) I hope this is enough info to help try to resolve this problem. If not, please let me know what else I can provide. Thx, David Coulthart
