Let's consdier sample case. I have a simple program that starts numerous threads. In thread routine I create Connection object and try to connect to database. The problem is that in Connection objects MYSQL* are equal so I ve got errors.
Logged In: YES user_id=426241
(sorry for the late reply)
You haven't given enough information to know what's wrong.
If you share a Connection between threads you will have a problem (this includes taking copies of an existing Connection)
If you create a new Connection in each thread it should work.
You might want to look at mysql++ instead - recently it's more actively developed and supported than mysqlcppapi
Log in to post a comment.
Logged In: YES
user_id=426241
(sorry for the late reply)
You haven't given enough information to know what's wrong.
If you share a Connection between threads you will have a
problem (this includes taking copies of an existing Connection)
If you create a new Connection in each thread it should work.
You might want to look at mysql++ instead - recently it's
more actively developed and supported than mysqlcppapi