From 4bb4eb800e11aa1cf27ce9b5773aefc923f7c67e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 11 Nov 2010 15:12:39 +0200 Subject: [PATCH] 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. --- storage/innodb_plugin/thr/thr0loc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/storage/innodb_plugin/thr/thr0loc.c b/storage/innodb_plugin/thr/thr0loc.c index 2bc6295dd70..94b84b11fbe 100644 --- a/storage/innodb_plugin/thr/thr0loc.c +++ b/storage/innodb_plugin/thr/thr0loc.c @@ -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);