List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:September 9 1999 7:02pm
Subject:Re: mysql_connect seg faults...
View as plain text  
>>>>> "Andrew" == Andrew Clark <andrew.clark@stripped>
> writes:

Andrew> Andrew Clark wrote:

>> I've having a problem with mysql_connect segfaulting.
>> I connect to the database once, which is fine, but the second time I try
>> to connect, mysql_connect segfaults (in in_init after sprintf).  The two
>> calls are in different functions and files, and each has a local MYSQL

>> *ptr.

Andrew> Well, I just tried gounding the pointers before calling connect, and it now
Andrew> makes it through the connect fine, but falls over on the select_db call,
Andrew> segfaulting in simple_command()...

Andrew> Just out of interest, why does it make any difference whether I pass
Andrew> mysql_connect a MYSQL *ptr; or MYSQL *ptr = NULL; ?


A NULL pointer will make your application more portable.

Please compile MySQL with full debugging and mail me a backtrace (+
all local variables and parameters on all stack levels) when this

mysql_connect seg faults...Andrew Clark9 Sep
  • Re: mysql_connect seg faults...Andrew Clark9 Sep
    • Re: mysql_connect seg faults...shier9 Sep
    • Re: mysql_connect seg faults...Michael Widenius9 Sep
  • Re: mysql_connect seg faults...sinisa9 Sep