freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
[freetds] The latest odbc driver of freetds can't work on solaris SPARC
- From: "Ou Liu" <ou AT qbt.com>
- To: <freetds AT lists.ibiblio.org>
- Subject: [freetds] The latest odbc driver of freetds can't work on solaris SPARC
- Date: Thu, 5 Dec 2002 15:24:49 -0500
Hi, everyone
I compiled the freetds on solaris 8 SPARC, and it works fine. However
its
odbc driver doesn't work
I compiled the connect.c in the $FREETDSHOME/src/odbc/unittests by
"make connect"
then I run it and got :
SQLConnect connect...
odbctest
--------
connection parameters:
server:..
user:..
password:..
database:..
Bus Error (core dumped)
This bus error (memory misalignment) is caused by the code in the
"SQLConnect" function of "odbc.c" :
----------------------------------------------------------------------------
------
connect_info = tds_alloc_connect(dbc->henv->tds_ctx->locale);
----------------------------------------------------------------------------
------
In fact, even if I wrote following code, there still will be a bus
error at
the last line:
----------------------------------------------------------------------------
------
struct _henv *henv;
TDSCONTEXT *tdscontext;
henv = dbc->henv;
tdscontext = henv->tds_ctx;
----------------------------------------------------------------------------
------
however, if I wrote following code, there will be no bus error:
----------------------------------------------------------------------------
------
henv = (struct _henv*) malloc(sizeof(struct _henv));
tdscontext = henv->tds_ctx;
----------------------------------------------------------------------------
------
So I thought somehow the dbc (which is a paramter of the "SQLConnect"
function) is wrong when it is sent in,
however the only place this dbc is initialized is in the "_SQLAllocConnect",
but I can't find any problem in it.
Could anybody help me out of this?
Thank you
Ou
- [freetds] The latest odbc driver of freetds can't work on solaris SPARC, Ou Liu, 12/05/2002
Archive powered by MHonArc 2.6.24.