Martin,
I've decided to take a new tack, throwing out the suse DBD-ODBC and compiling DBD-ODBC 1.13 from scratch, starting with a clean slate.
Martin J. Evans wrote:
if (DBIc_DEBUGIV(imp_dbh) >= 8) PerlIO_printf(DBIc_LOGPIO(imp_dbh), "Driver connect '%s', '%s', '%s'\n", dbname, uid, pwd);
1.13 of course has that.
my program
---------------------------trivial-test---------------------------------
my $dbh = DBI->connect('dbi:ODBC:DSN=emanuel-sbart;UID=**;PWD=**;') ||
die "can't connect to $data_source: $DBI::errstr";
$rc = $dbh->disconnect;
exit();
-------------------------------------------------------------------------terminates with a segmentation fault despite of setting DontDLClose=1 (it segfaults with DontDLClose=0 as well).
I have the impression that the connection was made now, but then the program segfaulted.
sigh,
-walt
dbitrace.log----------------------------------------------------------------------------------
DBI 1.43-ithread default trace level set to 0x0/8 (pid 2486)
-> DBI->connect(dbi:ODBC:DSN=emanuel-sbart;UID=walter;PWD=**;, , ****)
-> DBI->install_driver(ODBC) for linux perl=5.008005 pid=2486 ruid=100 euid=100
install_driver: DBD::ODBC version 1.13 loaded from /usr/lib/perl5/site_perl/5.8.5/i586-linux-thread-multi/DBD/ODBC.pm
New DBI::dr (for DBD::ODBC::dr, parent=, id=)
dbih_setup_handle(DBI::dr=HASH(0x8251bf8)=>DBI::dr=HASH(0x82cec8c), DBD::ODBC::dr, 0, Null!)
dbih_make_com(Null!, 0, DBD::ODBC::dr, 92, 0) thr#8151008
dbih_setup_attrib(DBI::dr=HASH(0x82cec8c), Err, Null!) SCALAR(0x820c5ec) (already defined)
dbih_setup_attrib(DBI::dr=HASH(0x82cec8c), State, Null!) SCALAR(0x820c634) (already defined)
dbih_setup_attrib(DBI::dr=HASH(0x82cec8c), Errstr, Null!) SCALAR(0x820c610) (already defined)
dbih_setup_attrib(DBI::dr=HASH(0x82cec8c), TraceLevel, Null!) 0 (already defined)
dbih_setup_attrib(DBI::dr=HASH(0x82cec8c), FetchHashKeyName, Null!) 'NAME' (already defined)
<- install_driver= DBI::dr=HASH(0x8251bf8)
!! warn: 0 CLEARED by call to default_user method
-> default_user in DBD::_::dr for DBD::ODBC::dr (DBI::dr=HASH(0x8251bf8)~0x82cec8c undef undef HASH(0x821d75c)) thr#8151008
<- default_user= ( undef undef ) [2 items] at /usr/lib/perl5/vendor_perl/5.8.5/i586-linux-thread-multi/DBI.pm line 577 via odbc-emanuel-test.pl line 17
-> connect for DBD::ODBC::dr (DBI::dr=HASH(0x8251bf8)~0x82cec8c 'DSN=emanuel-sbart;UID=walter;PWD=**;' undef **** HASH(0x82cfd94)) thr#8151008
New DBI::db (for DBD::ODBC::db, parent=DBI::dr=HASH(0x82cec8c), id=)
dbih_setup_handle(DBI::db=HASH(0x82cec50)=>DBI::db=HASH(0x82cfd88), DBD::ODBC::db, 824ede0, Null!)
dbih_make_com(DBI::dr=HASH(0x82cec8c), 816efc8, DBD::ODBC::db, 224, 0) thr#8151008
dbih_setup_attrib(DBI::db=HASH(0x82cfd88), Err, DBI::dr=HASH(0x82cec8c)) SCALAR(0x825621c) (already defined)
dbih_setup_attrib(DBI::db=HASH(0x82cfd88), State, DBI::dr=HASH(0x82cec8c)) SCALAR(0x825627c) (already defined)
dbih_setup_attrib(DBI::db=HASH(0x82cfd88), Errstr, DBI::dr=HASH(0x82cec8c)) SCALAR(0x825624c) (already defined)
dbih_setup_attrib(DBI::db=HASH(0x82cfd88), TraceLevel, DBI::dr=HASH(0x82cec8c)) 0 (already defined)
dbih_setup_attrib(DBI::db=HASH(0x82cfd88), FetchHashKeyName, DBI::dr=HASH(0x82cec8c)) 'NAME' (already defined)
dbih_setup_attrib(DBI::db=HASH(0x82cfd88), HandleSetErr, DBI::dr=HASH(0x82cec8c)) undef (not defined)
dbih_setup_attrib(DBI::db=HASH(0x82cfd88), HandleError, DBI::dr=HASH(0x82cec8c)) undef (not defined)
Driver connect 'DSN=emanuel-sbart;UID=walter;PWD=**;', '', 'xxxx'
----------------------dbitrace.log-----------------------------------------------------------------------
--------------------------sql.log--------------------------
[ODBC][2564][__handles.c][421]
Exit:[SQL_SUCCESS]
Environment = 0x82d0a80
[ODBC][2564][SQLSetEnvAttr.c][182]
Entry:
Environment = 0x82d0a80
Attribute = SQL_ATTR_ODBC_VERSION
Value = 0x3
StrLen = -6
[ODBC][2564][SQLSetEnvAttr.c][349]
Exit:[SQL_SUCCESS]
[ODBC][2564][SQLAllocHandle.c][346]
Entry:
Handle Type = 2
Input Handle = 0x82d0a80
[ODBC][2564][SQLAllocHandle.c][464]
Exit:[SQL_SUCCESS]
Output Handle = 0x82d1010
[ODBC][2564][SQLDriverConnect.c][666]
Entry:
Connection = 0x82d1010
Window Hdl = (nil)
Str In = [DSN=emanuel-sbart;UID=walter;PWD=***;][length = 37]
Str Out = 0xbfffe000
Str Out Max = 2048
Str Out Ptr = 0xbfffdffe
Completion = 0
UNICODE Using encoding ASCII 'ISO8859-1' and UNICODE 'UCS-2LE'
[ODBC][2564][SQLDriverConnect.c][1409]
Exit:[SQL_SUCCESS]
Connection Out [DSN=emanuel-sbart;UID=walter;PWD=***;SERVERDB=sbart;SERVERNODE=e...]
--------------------------------------------------------------------------
