Commit 4bb4eb80 authored by Marko Mäkelä's avatar Marko Mäkelä

Fix a debug assertion failure in the Bug#57802 fix.

thr_local_create(): Initialize local->slot_no to ULINT_UNDEFINED.
thr_local_validate(): Allow local->slot_no to be ULINT_UNDEFINED.
parent f9c2f7cd
......@@ -82,7 +82,8 @@ thr_local_validate(
const thr_local_t* local) /*!< in: data to validate */
{
ut_ad(local->magic_n == THR_LOCAL_MAGIC_N);
ut_ad(local->slot_no < OS_THREAD_MAX_N);
ut_ad(local->slot_no == ULINT_UNDEFINED
|| local->slot_no < OS_THREAD_MAX_N);
ut_ad(local->in_ibuf == FALSE || local->in_ibuf == TRUE);
return(TRUE);
}
......@@ -206,7 +207,7 @@ thr_local_create(void)
local->id = os_thread_get_curr_id();
local->handle = os_thread_get_curr();
local->magic_n = THR_LOCAL_MAGIC_N;
local->slot_no = ULINT_UNDEFINED;
local->in_ibuf = FALSE;
mutex_enter(&thr_local_mutex);
......
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