diff options
Diffstat (limited to 'storage/innobase/os/os0thread.cc')
-rw-r--r-- | storage/innobase/os/os0thread.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/storage/innobase/os/os0thread.cc b/storage/innobase/os/os0thread.cc index 6736df46a87..a5b0f7de6ae 100644 --- a/storage/innobase/os/os0thread.cc +++ b/storage/innobase/os/os0thread.cc @@ -114,6 +114,9 @@ os_thread_create_func( os_thread_id_t* thread_id) /*!< out: id of the created thread, or NULL */ { + /* the new thread should look recent changes up here so far. */ + os_wmb; + #ifdef __WIN__ os_thread_t thread; DWORD win_thread_id; @@ -132,10 +135,8 @@ os_thread_create_func( if (thread_id) { *thread_id = win_thread_id; } - if (thread) { - CloseHandle(thread); - } - return((os_thread_t)win_thread_id); + + return((os_thread_t)thread); #else int ret; os_thread_t pthread; |