>>>>> "Derek" == Derek Callaway <super@stripped> writes:
<cut>
>> Hi!
>>
>> If you have already called my_init() then my_once_init() should only
>> call my_thread_init() which should NOT destroy any memory.
>>
>> Can you find out on which line your memory gets destroyed ?
Derek> The core dump is at mysql_init(&mysql);
Derek> The mysql variable is declared as:
Derek> MYSQL mysql;
Derek> I don't see anything wrong with that.. I have linked the mysqlclient
Derek> library with a shared library that gets linked with the main program.. the
Derek> main program isn't linked with mysqlclient. Would that have anything to do
Derek> with it? Also, mysql_init() isn't used until a significant amount of
Derek> progress is made in the program (this is a fairly large program).
The above may happen if you are using and include file that doesn't
match your current MySQL library.
You can check this by doing (in gdb) a print of 'sizeof(mysql)' in
your application and in mysql_init(). If the size differs then
you have a include file problem!
Try changing the call to:
MYSQL *mysql_con=mysql_init(NULL);
This should work even if your include file is not up to date!
>> Are you sure you are not using an old set of include files with a new
>> libmysqlclient library?
Derek> [super@aaron2 dev]$ grep MYSQL_SERVER_VERSION
Derek> /usr/include/mysql/mysql_version.h#define MYSQL_SERVER_VERSION
Derek> "3.23.2-alpha"
Derek> [super@aaron2 dev]$ strings /usr/lib/mysql/libmysqlclient.so | grep 3.23
Derek> 3.23.2-alpha
This looks right but I would still put my money on a include file problem...
Regards,
Monty