Wrong thread_id in Admin

pull/738/head
René Cannaò 10 years ago
parent a804304c51
commit b27b9e1e32

@ -1004,7 +1004,7 @@ bool MySQL_Protocol::generate_pkt_initial_handshake(bool send, void **ptr, unsig
//srand(pthread_self());
//uint32_t thread_id=rand()%100000;
uint32_t thread_id=__sync_fetch_and_add(&glovars.thread_id,1);
if (_thread_id==0) {
if (thread_id==0) {
thread_id=__sync_fetch_and_add(&glovars.thread_id,1); // again!
}
*_thread_id=thread_id;

Loading…
Cancel
Save