From 434c9e6f0e6c6aa09953f2367ab4db42a1f26f53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Mon, 11 Dec 2017 13:55:05 +0200 Subject: [PATCH] MDEV-14614 InnoDB: Failing assertion in dict_stats_rename_table() dict_stats_rename_table(): After DB_LOCK_WAIT_TIMEOUT or DB_DUPLICATE_KEY, reset the trx->error_state before retrying. Also, properly treat DB_DEADLOCK as a hard error. --- storage/innobase/dict/dict0stats.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/storage/innobase/dict/dict0stats.cc b/storage/innobase/dict/dict0stats.cc index e4aca96da4b..662ea959b9e 100644 --- a/storage/innobase/dict/dict0stats.cc +++ b/storage/innobase/dict/dict0stats.cc @@ -3659,8 +3659,8 @@ dict_stats_rename_table( new_db_utf8, new_table_utf8, trx); mutex_exit(&dict_sys->mutex); /* fall through */ - case DB_DEADLOCK: case DB_LOCK_WAIT_TIMEOUT: + trx->error_state = DB_SUCCESS; os_thread_sleep(200000 /* 0.2 sec */); continue; case DB_STATS_DO_NOT_EXIST: @@ -3701,8 +3701,8 @@ dict_stats_rename_table( new_db_utf8, new_table_utf8, trx); mutex_exit(&dict_sys->mutex); /* fall through */ - case DB_DEADLOCK: case DB_LOCK_WAIT_TIMEOUT: + trx->error_state = DB_SUCCESS; os_thread_sleep(200000 /* 0.2 sec */); continue; case DB_STATS_DO_NOT_EXIST: