embedded server with ODBC and threads
I would like to use the embedded server with the MyODBC API and use threads at the same time. My reason for wanting to use threads is that I envision that my query will take a long time. I want to be able to "kill" the thread of execution of the query if I decide it is taking too long.
So, I know that there is the mysql_thread_init(), and mysql_thread_end calls that I can use with the embedded server. However, I don't think that I can use these while using the ODBC API. (or can I?) Are there any posted examples of using threads with the embedded server while using the ODBC API also?
What I want to do is something like the following:
<user clicks "start thread" button>
pthread_create()
mysql_thread_init() ->starts the embedded DB engine thread
do really big query
mysql_thread_end()
do other processing of data returned from query
pthread_end()
<user clicks "kill thread" button> (just part of my gui design)
pthread_exit()
Thanks
Philip Henderson
Subject
Written By
Posted
embedded server with ODBC and threads
September 16, 2004 05:28PM
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.