From: magnus.blaudd Date: October 17 2012 4:00pm Subject: bzr push into mysql-5.1-telco-7.0 branch (magnus.blaudd:5001 to 5002) List-Archive: http://lists.mysql.com/commits/145062 Message-Id: <20121017160023.6519.61751.5002@wholphin> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 5002 magnus.blaudd@stripped 2012-10-17 Fix traditional windows compile failure caused by "variable after code" modified: storage/ndb/src/common/portlib/NdbThread.c 5001 magnus.blaudd@stripped 2012-10-17 Bug#14730537 NDB_MGMD --CONFIG-CACHE=FALSE OFTEN HANGS IN SHUTDOWN - Problem in mysys on certain MySQL versions where the thread id is used as the thread identifier. Since the thread id may be reused by another thread(when the current thread exits) one may end up waiting for the wrong thread. - Workaround by using a HANDLE which is opened by thread itself in 'ndb_thread_wrapper' and subsequently used to wait for the thread in 'NdbThread_WaitFor'. modified: storage/ndb/src/common/portlib/NdbThread.c === modified file 'storage/ndb/src/common/portlib/NdbThread.c' --- a/storage/ndb/src/common/portlib/NdbThread.c 2012-10-17 13:18:33 +0000 +++ b/storage/ndb/src/common/portlib/NdbThread.c 2012-10-17 15:58:59 +0000 @@ -340,12 +340,12 @@ void NdbThread_Destroy(struct NdbThread* { DBUG_ENTER("NdbThread_Destroy"); if (*p_thread != NULL){ - DBUG_PRINT("enter",("*p_thread: 0x%lx", (long) *p_thread)); #ifdef _WIN32 HANDLE thread_handle = (*p_thread)->thread_handle; if (thread_handle) CloseHandle(thread_handle); #endif + DBUG_PRINT("enter",("*p_thread: 0x%lx", (long) *p_thread)); free(* p_thread); * p_thread = 0; } No bundle (reason: useless for push emails).