From b27b9e1e32fab40507607fb58217e482d89870d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Wed, 12 Oct 2016 12:57:30 +0000 Subject: [PATCH] Wrong thread_id in Admin --- lib/MySQL_Protocol.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/MySQL_Protocol.cpp b/lib/MySQL_Protocol.cpp index 8910ab63e..b373f66b1 100644 --- a/lib/MySQL_Protocol.cpp +++ b/lib/MySQL_Protocol.cpp @@ -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;