Re: [repost] DBD::CSV and csv_eol=anything
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Jeff Zucker) wrote: > "Scott R. Godin" wrote: > > > > unable to set ;csv_eol=\015, but saving the file via bbedit to DOS > > instead of Macintosh, the code works?!? what the hell? > > AFAIK, > > 1. If you are on a MAC and have all MAC-formatted files, don't set > csv_eol at all, DBD::CSV should do the right thing. unfortunately this is not the case, as in CSV.pm there is the following line: $opts{'eol'} = $meta->{'eol'} || $dbh->{'csv_eol'} || "\015\012"; so, for a Mac file I need to set it explicitly. > 2. If you are on a MAC and have all DOS formatted files, set csv_eol to > \015\012. Since this is the default (see above) it isn't necessary. As long as the file has DOS linefeeds, setting to \015\012 or not setting this at all results in usable data access. > 3. If you are on a MAC and have mixed files > >a. convert them all to one format before processing (recommended) > >or > >b. for the files that you know are DOS formatted, set csv_eol to > \015\012 and > do not set it all for the MAC formatted files > > > All well and good, except that the file is generated by a whole suite of > > perl scripts > > So use the scripts to put a MAC eol in the file and forget about csv_eol > in the report generating scripts. Well the issue here is one of independance between Mac and Unix -- if the file is generated on the Mac, I should be able to set csv_eol to \015 and have DBI 'do the right thing', likewise with unix setting csv_eol to \012 now, if DBI is creating the table, all is well and good -- the present setup creates files with \015\012 and as long as you DO NOT set csv_eol, everything is fine. It's when you are creating the "database files" with other applications and expect it (DBI and DBD::CSV) to do what it says it's supposed to, that things go flooey. -- Scott R. Godin| e-mail : [EMAIL PROTECTED] Laughing Dragon Services |web : http://www.webdragon.net/
Slightly OT: XML DTD for Chart/Plot description ?
(Apologies if this seems way OT, but I'm hoping there's an XML guru in the audience...) I've been toying with some mechanism to map the SQL used by DBD::Chart into an XML-based description (which may seem odd, though I think it has some value for defining templates for chart properties (ala CSS's), submitting requests to a "plot server" via SOAP, embedding chart descriptions in ASP's/JSP's that get filled with real-time data, etc.) Is anyone aware of an XML DTD for describing properties of charts/graphs ? I'm aware of the SVG DTD, but that's signifcant overkill and far too generalized for the applications I'm thinking of (esp.wrt DBD::Chart, or any of the other Perl graphing pkgs). I'm thinking along the lines of describing the chart properties like image format, X andY axis titles, size, etc. It could optionally include the the actual datapoint information, but its primary purpose is to describe a template from which I could generate a DBD::Chart SQL command. (Note that in some sense this is very similar to mapping any arbitrary DBMS table metadata into XML.) Any pointers would be much appreciated. TIA, Dean Arnold
Can't install DBD-Oracle-1.12 under SGI IRIX 6.5
Hi all, Tim, I am getting "undefined symbol" error messages when I run the make command when trying to build and install DBD-Oracle-1.12 under SGI IRIX 6.5 I have included in this email 1) the output of perl -V 2) the output of perl Makefile.PL -v 3) the output of make 4) the outputs of perl Makefile.PL -s for both undefined symbols Hope someone can shed some light Thanks Sean Harvey VA UNIX Administrator, (949)219-4567 mobile (949)678-0835 [EMAIL PROTECTED] # perl -V Summary of my perl5 (5.0 patchlevel 4 subversion 4) configuration: Platform: osname=irix, osvers=6.5, archname=irix-n32 uname='irix hoshi 6.5 11251326 ip22 ' hint=recommended, useposix=true, d_sigaction=define bincompat3=y useperlio=define d_sfio=undef Compiler: cc='cc -n32 -mips3', optimize='-O3 -mips3', gccversion= cppflags='-D_BSD_SIGNALS -D_BSD_TYPES -D_BSD_TIME -OPT:Olimit=0:space=ON -DLANGUAGE_C -DEMBEDMYMALLOC' ccflags ='-D_BSD_SIGNALS -D_BSD_TYPES -D_BSD_TIME -woff 1009,1110,1184 -OPT:Olimit=0:space=ON -DLANGUAGE_C -DEMBEDMYMALLOC' stdchar='unsigned char', d_stdstdio=define, usevfork=false voidflags=15, castflags=0, d_casti32=define, d_castneg=define intsize=4, alignbytes=8, usemymalloc=y, prototype=define Linker and Libraries: ld='cc', ldflags ='-n32' libpth=/usr/lib32 /lib32 libs=-lm libc=/usr/lib32/libc.so, so=so useshrplib=true, libperl=libperl.so.4.4 Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='' cccdlflags=' ', lddlflags='-n32 -mips3 -shared' Characteristics of this binary (from libperl): Built under irix Compiled at Apr 30 1998 00:54:41 @INC: /usr/share/lib/perl5/irix-n32/5.00404 /usr/share/lib/perl5 /usr/share/lib/perl5/site_perl/irix-n32 /usr/share/lib/perl5/site_perl /usr/share/lib/perl5/sgi_perl . ap-ods02:/usr/people/sharvey/DBD-Oracle-1.12 Script started on Fri Oct 5 17:13:47 2001 ap-ods02:/usr/people/sharvey/DBD-Oracle-1.12 # perl Makefile.PL -v Using DBI 1.20 installed in /usr/share/lib/perl5/site_perl/irix-n32/auto/DBI Configuring DBD::Oracle ... >>> Remember to actually *READ* the README file! Especially if you have any problems. Using Oracle in /oracle/product/8.0.5 4.0.3.0.0Oracle Unix Installer 1.0.1.0.0Oracle On-Line Text Viewer 8.0.5.0.0Silicon Graphics IRIX Documentation 8.0.5.0.0Ordts Common Libraries 8.0.5.0.0ORACLE NLS Libraries and Utilities 8.0.5.0.0ORACLE Core Libraries 8.0.5.0.0ORACLE Common RDBMS Libraries and Utilities 8.0.5.0.0ORACLE PL/SQL Libraries 8.0.5.0.0ORACLE Common Libraries 8.0.5.0.0ORACLE Common Precomp Libraries 8.0.5.0.0ORACLE Common Network Libraries and Utilities 8.0.5.0.0ORACLE Common Trace Libraries 8.0.5.0.0ORACLE Common Utilities 8.0.5.0.0ORACLE Common Agent Libraries 8.0.5.0.0ORACLE Common Libraries and Utilities 8.0.5.0.0Platform specific Libraries and Utilities 8.0.5.0.0Net8 8.0.5.0.0TCP/IP Protocol Adapter 3.0.2.0.0Remote Operations 8.0.5.0.0Oracle Names 8.0.5.1.0PL/SQL 8.0.5.0.0Oracle8 Partitioning Option 3.0.5.0.0Oracle Server Manager 8.0.5.1.0Oracle8 (RDBMS and PL/SQL) 1.0.0.0.1 Load Files 8.0.5.0.0Oracle Intelligent Agent 4.0.0Oracle Trace 8.0.5.1.0Precomp 8.0.5.1.0Pro*COBOL 8.0.5.0.0SQL*Plus Found rdbms/demo/ociapr.h Found rdbms/demo/ocidfn.h Found rdbms/demo/ocidem.h Found rdbms/demo/ocidef.h Found rdbms/demo/ocikpr.h Found rdbms/demo/oratypes.h Found header files in rdbms/demo. Found /oracle/product/8.0.5/rdbms/demo/demo_rdbms.mk Found /oracle/product/8.0.5/otrace/demo/atmoci.mk Using /oracle/product/8.0.5/rdbms/demo/demo_rdbms.mk Reading /oracle/product/8.0.5/rdbms/demo/demo_rdbms.mk. Reading /oracle/product/8.0.5/rdbms/lib/env_rdbms.mk. Read a total of 605 lines from /oracle/product/8.0.5/rdbms/lib/env_rdbms.mk (including inclusions) Read a total of 765 lines from /oracle/product/8.0.5/rdbms/demo/demo_rdbms.mk (including inclusions) Deleted SHELL definition: SHELL=/bin/sh Deleted LIB_EXT definition: LIB_EXT=a Deleted OBJ_EXT definition: OBJ_EXT=o Deleted AR definition: AR=ar Deleted AS definition: AS=as Deleted CC definition: CC=cc Dele
DBD-ODBC-0.28 - small bug??
Hi all, Sorry to disturb if this is out of place. I am using DBD-ODBC-0.28, which appears to be the latest version of this module from CPAN. I was running with trace level 4 and suffered a core dump. The problem seems to be fixed by the following change to dbdimp.c. Sorry for the formatting, it is my sorry attempt at cut and paste. *** /usr/tmp/DBD-ODBC-0.28/dbdimp.c Thu Mar 23 06:23:55 2000 --- dbdimp.c Fri Oct 5 19:43:22 2001 *** *** 195,205 rc=SQLError(imp_dbh->henv, imp_dbh->hdbc, 0, sqlstate, &NativeError, ErrorMsg, sizeof(ErrorMsg)-1, &ErrorMsgLen); if (rc == SQL_SUCCESS || rc == SQL_SUCCESS_WITH_INFO) ! fprintf(DBILOGFP, "SQLDriverConnect failed: %s %s\n", sqlstate, ErrorMsgLen); } #endif /* DriverConnect supported */ if (DBIS->debug >= 2) fprintf(DBILOGFP, "SQLConnect '%s', '%s', '%s'\n", dbname, uid, pwd); --- 195,205 rc=SQLError(imp_dbh->henv, imp_dbh->hdbc, 0, sqlstate, &NativeError, ErrorMsg, sizeof(ErrorMsg)-1, &ErrorMsgLen); if (rc == SQL_SUCCESS || rc == SQL_SUCCESS_WITH_INFO) ! fprintf(DBILOGFP, "SQLDriverConnect failed: %s %*s\n", sqlstate, ErrorMsgLen, ErrorMsg); } #endif /* DriverConnect supported */ if (DBIS->debug >= 2) fprintf(DBILOGFP, "SQLConnect '%s', '%s', '%s'\n", dbname, uid, pwd); It seems to work fine with the change. Hope this helps, Ian
Problems installing DBD::mysql
Hi, I am trying to install DBD::mysql on a FreeBSD system and cannot get it to install for the life of me. I've installed it with no problems on a ton of Linux systems with no problems. Any help would be greatly appreciated! Here's the output of all the commands I ran to install it: mysql3# gunzip Msql-Mysql-modules-1.2215.tar.gz mysql3# tar -xvf Msql-Mysql-modules-1.2215.tar Msql-Mysql-modules-1.2215/ Msql-Mysql-modules-1.2215/dbd/ Msql-Mysql-modules-1.2215/dbd/constants.h Msql-Mysql-modules-1.2215/dbd/dbd.xs.in Msql-Mysql-modules-1.2215/dbd/dbimon.in Msql-Mysql-modules-1.2215/dbd/Acknowledgements Msql-Mysql-modules-1.2215/dbd/myMsql.h Msql-Mysql-modules-1.2215/dbd/Changes Msql-Mysql-modules-1.2215/dbd/bindparam.h Msql-Mysql-modules-1.2215/dbd/dbd.pm.in Msql-Mysql-modules-1.2215/dbd/Makefile.PL.in Msql-Mysql-modules-1.2215/dbd/dbdimp.c Msql-Mysql-modules-1.2215/dbd/dbdimp.h Msql-Mysql-modules-1.2215/dbd/bundle.pm.in Msql-Mysql-modules-1.2215/lib/ Msql-Mysql-modules-1.2215/lib/ExtUtils/ Msql-Mysql-modules-1.2215/lib/ExtUtils/PerlPP.pm Msql-Mysql-modules-1.2215/lib/DBD/ Msql-Mysql-modules-1.2215/lib/DBD/mSQL/ Msql-Mysql-modules-1.2215/lib/DBD/mSQL/Install.pm Msql-Mysql-modules-1.2215/lib/DBD/mSQL1/ Msql-Mysql-modules-1.2215/lib/DBD/mSQL1/Install.pm Msql-Mysql-modules-1.2215/lib/DBD/mysql/ Msql-Mysql-modules-1.2215/lib/DBD/mysql/Install.pm Msql-Mysql-modules-1.2215/tests/ Msql-Mysql-modules-1.2215/tests/ak-dbd.t Msql-Mysql-modules-1.2215/tests/mSQL1.dbtest Msql-Mysql-modules-1.2215/tests/CSV.mtest Msql-Mysql-modules-1.2215/tests/CSV.dbtest Msql-Mysql-modules-1.2215/tests/20createdrop.t Msql-Mysql-modules-1.2215/tests/dbdadmin.t Msql-Mysql-modules-1.2215/tests/50commit.t Msql-Mysql-modules-1.2215/tests/msql2.t Msql-Mysql-modules-1.2215/tests/mysql.dbtest Msql-Mysql-modules-1.2215/tests/50chopblanks.t Msql-Mysql-modules-1.2215/tests/00base.t Msql-Mysql-modules-1.2215/tests/40nulls.t Msql-Mysql-modules-1.2215/tests/msql1.t Msql-Mysql-modules-1.2215/tests/pNET.dbtest Msql-Mysql-modules-1.2215/tests/mysql2.t Msql-Mysql-modules-1.2215/tests/40bindparam.t Msql-Mysql-modules-1.2215/tests/10dsnlist.t Msql-Mysql-modules-1.2215/tests/mSQL.mtest Msql-Mysql-modules-1.2215/tests/mysql.t Msql-Mysql-modules-1.2215/tests/README Msql-Mysql-modules-1.2215/tests/60leaks.t Msql-Mysql-modules-1.2215/tests/mSQL1.mtest Msql-Mysql-modules-1.2215/tests/30insertfetch.t Msql-Mysql-modules-1.2215/tests/Adabas.mtest Msql-Mysql-modules-1.2215/tests/40blobs.t Msql-Mysql-modules-1.2215/tests/40numrows.t Msql-Mysql-modules-1.2215/tests/lib.pl Msql-Mysql-modules-1.2215/tests/pNET.mtest Msql-Mysql-modules-1.2215/tests/40listfields.t Msql-Mysql-modules-1.2215/tests/skeleton.test Msql-Mysql-modules-1.2215/tests/mysql.mtest Msql-Mysql-modules-1.2215/tests/mSQL.dbtest Msql-Mysql-modules-1.2215/tests/Adabas.dbtest Msql-Mysql-modules-1.2215/tests/akmisc.t Msql-Mysql-modules-1.2215/mSQL/ Msql-Mysql-modules-1.2215/mSQL/lib/ Msql-Mysql-modules-1.2215/mSQL/lib/Bundle/ Msql-Mysql-modules-1.2215/mSQL/lib/Bundle/DBD/ Msql-Mysql-modules-1.2215/mSQL/lib/Bundle/DBD/mSQL.pm Msql-Mysql-modules-1.2215/mSQL/lib/DBD/ Msql-Mysql-modules-1.2215/mSQL/lib/DBD/mSQL.pm Msql-Mysql-modules-1.2215/mSQL/lib/Msql.pm Msql-Mysql-modules-1.2215/mSQL/lib/Msql/ Msql-Mysql-modules-1.2215/mSQL/lib/Msql/Statement.pm Msql-Mysql-modules-1.2215/nodbd/ Msql-Mysql-modules-1.2215/nodbd/nodbd.pm.in Msql-Mysql-modules-1.2215/nodbd/pmsql.in Msql-Mysql-modules-1.2215/nodbd/statement.pm.in Msql-Mysql-modules-1.2215/nodbd/typemap Msql-Mysql-modules-1.2215/mysql/ Msql-Mysql-modules-1.2215/mysql/lib/ Msql-Mysql-modules-1.2215/mysql/lib/Mysql.pm Msql-Mysql-modules-1.2215/mysql/lib/Mysql/ Msql-Mysql-modules-1.2215/mysql/lib/Mysql/Statement.pm Msql-Mysql-modules-1.2215/mysql/lib/DBD/ Msql-Mysql-modules-1.2215/mysql/lib/DBD/mysql.pm Msql-Mysql-modules-1.2215/mysql/lib/Bundle/ Msql-Mysql-modules-1.2215/mysql/lib/Bundle/DBD/ Msql-Mysql-modules-1.2215/mysql/lib/Bundle/DBD/mysql.pm Msql-Mysql-modules-1.2215/Makefile.PL Msql-Mysql-modules-1.2215/MANIFEST Msql-Mysql-modules-1.2215/MANIFEST.SKIP Msql-Mysql-modules-1.2215/README Msql-Mysql-modules-1.2215/ChangeLog mysql3# cd Msql-Mysql-modules-1.2215 mysql3# perl Makefile.PL Which drivers do you want to install? 1) MySQL only 2) mSQL only (either of mSQL 1 or mSQL 2) 3) MySQL and mSQL (either of mSQL 1 or mSQL 2) 4) mSQL 1 and mSQL 2 5) MySQL, mSQL 1 and mSQL 2 Enter the appropriate number: [3] 1 Do you want to install the MysqlPerl emulation? You might keep your old Mysql module (to be distinguished from DBD::mysql!) if you are concerned about compatibility to existing applications! [n] Where is your MySQL installed? Please tell me the directory that contains the subdir 'include'. [/usr/local/mysql] Which database should I use for testing the MySQL drivers? [test] On which host is database test running (hostname, ip address or host:port) [localhost] User name for connecting to database test? [undef] Password for connectin
LOBs and case sensitive field names
Hi Tim. I've found a bug in DBD::Oracle which is related to LOBs and case sensitive field names. I have to use 1.06 version but the bug still presents in 1.12. Example: table: create table test("Field1" clob,"Field2" clob); test script1: use strict; use DBI; use DBD::Oracle qw(:ora_types); my $dbh = DBI->connect("dbi:Oracle:","root","qwerty") or die $DBI::errstr; my $sth = $dbh->prepare('insert into test("Field1", "Field2") values(?,?)') or die $dbh->errstr; $sth->bind_param(1,'',{ ora_type=>ORA_CLOB, ora_field=>'"Field1"' }) or die $sth->errstr; $sth->bind_param(2,'',{ ora_type=>ORA_CLOB, ora_field=>'"Field2"' }) or die $sth->errstr; $sth->execute or die $sth->errstr; The script above fails with a message "DBD::Oracle::st execute failed: (DBD ERROR: Can't match some parameters to LOB fields in the table, check type and name) at q.pl line 13." Test script 2 in which ora_field=>'"Field*"' is replaced by ora_field=>'Field*' use strict; use DBI; use DBD::Oracle qw(:ora_types); my $dbh = DBI->connect("dbi:Oracle:","root","qwerty") or die $DBI::errstr; my $sth = $dbh->prepare('insert into test("Field1", "Field2") values(?,?)') or die $dbh->errstr; $sth->bind_param(1,'',{ ora_type=>ORA_CLOB, ora_field=>'Field1' }) or die $sth->errstr; $sth->bind_param(2,'',{ ora_type=>ORA_CLOB, ora_field=>'Field2' }) or die $sth->errstr; $sth->execute or die $sth->errstr; fails with DBD::Oracle::st execute failed: ORA-00904: invalid column name (DBD ERROR: OCIStmtExecute/LOB refetch) at q.pl line 13. I've made a quick hack which fixes it: C:\SW_ENV\sw_env_1.3\DBD-Oracle-1.06>diff oci8.c.orig oci8.c 1253,1254c1253,1262 < if (SvCUR(phs->ora_field) != SvCUR(sv) < || ibcmp( SvPV(phs->ora_field,na), SvPV(sv,na), SvCUR(sv) ) ) --- > char bfield[256]; > strcpy(bfield,SvPV(phs->ora_field,na)); > if (bfield[0] == '\"' && bfield[strlen(bfield) - 1] == '\"') { > strcpy(bfield, bfield + 1); > bfield[strlen(bfield) - 1] = 0; > } > /*if (SvCUR(phs->ora_field) != SvCUR(sv) > || ibcmp( SvPV(phs->ora_field,na), SvPV(sv,na), SvCUR(sv) ) )*/ > if (strlen(bfield) != SvCUR(sv) > || ibcmp( bfield, SvPV(sv,na), SvCUR(sv) ) ) 1277c1285,1287 < sprintf(sql_field, "%s%s \"%s\"", --- > > > sprintf(sql_field, "%s\"%s\" \"%s\"", Regards, Oleg
Compile problems with Solaris 8
On a Solaris 8 system using GNUcc version 2.95.2 and the pre-bundled Perl version 5.005_03, I recieve the follwing error while compiling: -- # perl Makefile.PL *** Note: The optional PlRPC-modules (RPC::PlServer etc) are not installed. If you want to use the DBD::Proxy driver and DBI::ProxyServer modules, then you'll need to install the RPC::PlServer, RPC::PlClient, Storable and Net::Daemon modules. The CPAN Bundle::DBI may help you. You can install them any time after installing the DBI. You do *not* need these modules for typical DBI usage. Optional modules are available from any CPAN mirror, in particular http://www.perl.com/CPAN/modules/by-module http://www.perl.org/CPAN/modules/by-module ftp://ftp.funet.fi/pub/languages/perl/CPAN/modules/by-module Checking if your kit is complete... Looks good Writing Makefile for DBI Remember to actually *read* the README file! Use 'make' to build the software (dmake or nmake on Windows). Then 'make test' to execute self tests. Then 'make install' to install the DBI and then delete this working directory before unpacking and building any DBD::* drivers. # make mkdir blib mkdir blib/lib mkdir blib/arch mkdir blib/arch/auto mkdir blib/arch/auto/DBI mkdir blib/lib/auto mkdir blib/lib/auto/DBI mkdir blib/man1 mkdir blib/man3 cp lib/DBI/W32ODBC.pm blib/lib/DBI/W32ODBC.pm cp lib/DBD/ExampleP.pm blib/lib/DBD/ExampleP.pm cp lib/DBI/FAQ.pm blib/lib/DBI/FAQ.pm cp lib/DBI/Shell.pm blib/lib/DBI/Shell.pm cp lib/DBI/ProxyServer.pm blib/lib/DBI/ProxyServer.pm cp lib/Bundle/DBI.pm blib/lib/Bundle/DBI.pm cp lib/DBD/Proxy.pm blib/lib/DBD/Proxy.pm cp DBIXS.h blib/arch/auto/DBI/DBIXS.h cp dbd_xsh.h blib/arch/auto/DBI/dbd_xsh.h cp dbi_sql.h blib/arch/auto/DBI/dbi_sql.h cp lib/DBD/NullP.pm blib/lib/DBD/NullP.pm cp lib/DBD/Sponge.pm blib/lib/DBD/Sponge.pm cp lib/DBI/Format.pm blib/lib/DBI/Format.pm cp lib/DBI/DBD.pm blib/lib/DBI/DBD.pm cp Driver.xst blib/arch/auto/DBI/Driver.xst cp dbipport.h blib/arch/auto/DBI/dbipport.h cp lib/Win32/DBIODBC.pm blib/lib/Win32/DBIODBC.pm cp DBI.pm blib/lib/DBI.pm /usr/bin/perl -p -e "s/~DRIVER~/Perl/g" < blib/arch/auto/DBI/Driver.xst > Perl.xsi /usr/bin/perl -I/usr/perl5/5.00503/sun4-solaris -I/usr/perl5/5.00503 /usr/perl5/5.00503/ExtUtils/xsubpp -typemap /usr/perl5/5.00503/ExtUtils/typemap Perl.xs >xstmp.c && mv xstmp.c Perl.c cc -c -xO3 -xdepend -DVERSION=\"1.20\" -DXS_VERSION=\"1.20\" -KPIC -I/usr/perl5/5.00503/sun4-solaris/CORE -DDBI_NO_THREADS Perl.c cc: unrecognized option `-KPIC' cc: language depend not recognized cc: Perl.c: linker input file unused since linking not done /usr/bin/perl -I/usr/perl5/5.00503/sun4-solaris -I/usr/perl5/5.00503 /usr/perl5/5.00503/ExtUtils/xsubpp -typemap /usr/perl5/5.00503/ExtUtils/typemap DBI.xs >xstmp.c && mv xstmp.c DBI.c cc -c -xO3 -xdepend -DVERSION=\"1.20\" -DXS_VERSION=\"1.20\" -KPIC -I/usr/perl5/5.00503/sun4-solaris/CORE -DDBI_NO_THREADS DBI.c cc: unrecognized option `-KPIC' cc: language depend not recognized cc: DBI.c: linker input file unused since linking not done Running Mkbootstrap for DBI () chmod 644 DBI.bs LD_RUN_PATH="" cc -o blib/arch/auto/DBI/DBI.so -G DBI.o cc: DBI.o: No such file or directory cc: No input files *** Error code 1 make: Fatal error: Command failed for target `blib/arch/auto/DBI/DBI.so' -- NOTE: My PATH is /usr/ccs/bin:/usr/local/bin:/usr/sbin:/usr/bin Thanks, Dave Nonno
DBD-Pg Segmentation Fault
I have come up with a small perl script which consistently causes a segmentation fault using DBD-Pg. I have included it below, along with collected version information. - Matt PS - The DBD-Pg README has an invalid email address for bug reports PPS - http://dbi.symbolstone.org/index.html has outdated links to the DBI mailing lists - #!/usr/bin/env perl require 5.6.0; use strict; use warnings; require DBI; my $dbname = "name"; my $dbuser = "user"; # CREATE TABLE test (name CHARACTER VARYING(16)); my $table = "test"; my $db = 0; $db = DBI->connect("dbi:Pg:dbname=$dbname", $dbuser, 0, { AutoCommit => 0 }); die "Cannot open database" if ($db == 0); my $name = "a"; while (1) { my $q = "INSERT INTO $table (name) VALUES ('" . $name++ . "')"; my $sf = $db->prepare_cached($q, undef, 1); die "cannot prepare query $q" if (!$sf); my $rv = $sf->execute(); die "cannot execute $q" if (!$rv); } __END__ $ perl -v This is perl, v5.6.0 built for i386-netbsd Copyright 1987-2000, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5.0 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using `man perl' or `perldoc perl'. If you have access to the Internet, point your browser at http://www.perl.com/, the Perl Home Page. $ perl -V Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration: Platform: osname=netbsd, osvers=1.5_alpha2, archname=i386-netbsd uname='netbsd build-00.gdib.nominum.com 1.5_alpha2 netbsd 1.5_alpha2 (from generic-1.354.2.8 $revision: 1.4 $) #0: tue oct 3 08:21:29 utc 2000 [EMAIL PROTECTED]:u0srcsysarchi386compileibm1g i386 ' config_args='-sde -Dprefix=/usr/pkg -Doptimize=-O2 -Darchname=i386-netbsd -Dcc=gcc -Dusemymalloc=false -Duseshrplib=true' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=undef d_sfio=undef uselargefiles=define use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef Compiler: cc='gcc', optimize='-O2', gccversion=egcs-2.91.66 19990314 (egcs-1.1.2 release) cppflags='-fno-strict-aliasing -I/usr/pkg/include' ccflags ='-fno-strict-aliasing -I/usr/pkg/include' stdchar='char', d_stdstdio=undef, usevfork=false intsize=4, longsize=4, ptrsize=4, doublesize=8 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, usemymalloc=n, prototype=define Linker and Libraries: ld='gcc', ldflags =' -L/usr/pkg/lib' libpth=/usr/pkg/lib /usr/lib libs=-lm -lcrypt libc=/usr/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-R/usr/pkg/lib -Wl,-R/usr/pkg/lib/perl5/5.6.0/i386-netbsd/CORE' cccdlflags='-DPIC -fPIC ', lddlflags='--whole-archive -shared -L/usr/pkg/lib' Characteristics of this binary (from libperl): Compile-time options: USE_LARGE_FILES Built under netbsd Compiled at Oct 10 2000 17:15:13 @INC: /usr/pkg/lib/perl5/5.6.0/i386-netbsd /usr/pkg/lib/perl5/5.6.0 /usr/pkg/lib/perl5/site_perl/5.6.0/i386-netbsd /usr/pkg/lib/perl5/site_perl/5.6.0 /usr/pkg/lib/perl5/site_perl . $ psql name user Welcome to psql, the PostgreSQL interactive terminal. Type: \copyright for distribution terms \h for help with SQL commands \? for help on internal slash commands \g or terminate with semicolon to execute query \q to quit gns=> select version(); version -- PostgreSQL 7.1.2 on i386--netbsd, compiled by GCC egcs-1.1.2 (1 row) gns=> \q $ perl -MDBD::Pg -le 'print $DBD::Pg::VERSION' 1.00 $ perl -MDBI -le 'print $DBI::VERSION' 1.18