summaryrefslogtreecommitdiff
path: root/storage/innobase/os/os0thread.cc
diff options
context:
space:
mode:
authorJan Lindström <jplindst@mariadb.org>2015-01-06 16:08:42 +0200
committerJan Lindström <jplindst@mariadb.org>2015-01-06 16:08:42 +0200
commit4a3251595cc697bfdb15b67c07514bd3c4779e37 (patch)
tree795adcbd0e965756b2f93d2e4ce3cd3264f01d4a /storage/innobase/os/os0thread.cc
parent6e0a00ed7534eee7afce8f1cfa168d77d0832d5d (diff)
downloadmariadb-git-4a3251595cc697bfdb15b67c07514bd3c4779e37.tar.gz
MDEV-7403: should not pass recv_writer_thread_handle to CloseHandle()
Analysis: For some reason actual thread handle is not returned on Windows instead lpThreadId was returned and thread handle was closed after thread create. Later CloseHandle was called for recv_writer_thread_handle and psort_info->thread_hdl. Fix: Return thread handle from os_thread_create() also on Windows and store these thread handles also in srv0start.cc so that they can be later closed.
Diffstat (limited to 'storage/innobase/os/os0thread.cc')
-rw-r--r--storage/innobase/os/os0thread.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/storage/innobase/os/os0thread.cc b/storage/innobase/os/os0thread.cc
index 6736df46a87..c855ac2c3b9 100644
--- a/storage/innobase/os/os0thread.cc
+++ b/storage/innobase/os/os0thread.cc
@@ -132,10 +132,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;