Re: segfault in error.c with unixodbc since MyODBC 3.51.03

Re: segfault in error.c with unixodbc since MyODBC 3.51.03

am 20.08.2002 14:44:31 von Nick Gorham

Ruf, Andreas wrote:
> Hello,
> I get a nasty segmentation fault as soon as a SQLconnect fails using
> unixodbc,
> e.g. the isql coming with! The ddd output is quoted below.
>
> Let me tell you how I build the Drivers etc., maybe the
> error is related to this.
>
> I used gcc version 2.95.3 20010315 (SuSE), to compile:
>
> unixODBC-2.2.2.tar.gz from www.unixodbc.com
> MyODBC-3.51.03.tar.gz from www.mysql.com
> !!!! HOWEVER, when building the driver from MyODBC 3.51.02 which came with
> unixodbc,
> this seg fault doesn't occur !!!!

Looking at the equivilant in 3.51.02, I would guess the problem is hstmt
is null, as it will be if the connect has failed.


else if (henv){
error = my_SQLGetDiagRec(SQL_HANDLE_ENV,henv,1,szSqlState,
pfNativeError, szErrorMsg,
cbErrorMsgMax,pcbErrorMsg);
if(error == SQL_SUCCESS)
((ENV FAR*)henv)->error.message[0]='\0';

--
Nick Gorham
Easysoft Limited http://www.easysoft.com


------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail bugs-thread12383@lists.mysql.com
To unsubscribe, e-mail