From 00182614bd8de74a52d29acf25e7e66b25ddb49f Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Wed, 17 Jun 2009 16:14:08 +0200 Subject: [PATCH] Fixed type defintion for os_thread_id_t on 64 bit Windows. It used to be declared as ulint, which is 32/64 bit integer depending on OS bitness. However this declaration lead to problems with os_compare_and_swap_thread_id implementation which operated on 32 bit integers (InterlockedCompareExchange) Using 64 bit int lead to wrong result in os_compare_and_swap_thread_id and to crash/assertion in rw_lock_set_writer_id_and_recursion_flag() The fix is to use 4 byte integer to os_thread_id type definition. --- storage/innodb_plugin/include/os0thread.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/innodb_plugin/include/os0thread.h b/storage/innodb_plugin/include/os0thread.h index 14f10fd5427..def5853b189 100644 --- a/storage/innodb_plugin/include/os0thread.h +++ b/storage/innodb_plugin/include/os0thread.h @@ -44,7 +44,7 @@ can wait inside InnoDB */ #ifdef __WIN__ typedef void* os_thread_t; -typedef ulint os_thread_id_t; /*!< In Windows the thread id +typedef unsigned long os_thread_id_t; /*!< In Windows the thread id is an unsigned long int */ #else typedef pthread_t os_thread_t;