summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-12-11 13:55:05 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2017-12-11 13:56:50 +0200
commit434c9e6f0e6c6aa09953f2367ab4db42a1f26f53 (patch)
treec541556194ffaddc933ce26fb34307c7e7b37869
parent1e6ac94451ff11c0a96843c26b55fecb9e30a57d (diff)
downloadmariadb-git-434c9e6f0e6c6aa09953f2367ab4db42a1f26f53.tar.gz
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.
-rw-r--r--storage/innobase/dict/dict0stats.cc4
1 files 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: