MySQL Forums
Forum List  »  General

Re: Client library and threads
Posted by: Chris Slominski
Date: October 27, 2004 07:15AM

Sorry, but I have had no success. Do I understand correctly (see fragments below)? Should this work and I perhaps have some other obscure problem?

// I build with -lmysqlclient_r
// I forgot to say in initial post, I use MySQL 3.23.58

main thread
{
my_init(); // added this per advice
mysql_init(...);
mysql_real_connect(...);
mysql_query(...)
mysql_store_result(...);
// Results are fine here
}

// This thread only runs after the main thread has performed its
// MySQL operation, there is no interference. It uses the connection
// created in the main thread.
Other Thread
{
my_thread_init(); // Added this per advice (my_thread_ir ?)
mysql_query(...); // Bus error generated here
mysql_store_result(...); // Never gets here
my_thread_end();
}

Options: ReplyQuote


Subject
Written By
Posted
October 26, 2004 08:12AM
Re: Client library and threads
October 27, 2004 07:15AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.