Commit 00182614 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

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.
parent 768bbae9
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment