Folks, I had another issue now regarding to libmysqlclient-dev api
Here the story:
I created about 10 threads which will do SQL query in every 2 seconds, and loop, in math you could say 10 query in 2 seconds in the same time, and it ended itself with MySQL error message lost connection during SQL query
Questions:
- in these case, is my algorithm will always cause MySQL server lost co开发者_运维百科nnection ?
- if so, will these issue appear if I use another db (say Oracle, Postgre, etc), or result will same?
- What are you doing in the thread that loses the connection, and what are the other threads doing at the same time?
- It depends. Consider your question the equivalent of "my car makes a funny noise when I drive down Street X. Should I get a new car?". If the noise is due to you falling into a pothole, changing cars won't make any difference.
well everything is now run better once
- the
MYSQL*
is protected by posix-mutex https://computing.llnl.gov/tutorials/pthreads/#MutexLocking - the code compiiled with
mysql_config --libs_r
parameter
thats for now, any addition ?
精彩评论