diff options
author | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2021-04-09 12:01:42 +0530 |
---|---|---|
committer | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2021-04-09 12:01:42 +0530 |
commit | 5a3151bcda2f279091a1e2f049a7d11cd91065d6 (patch) | |
tree | b299b007afe8537501c188fc18b7b0f3660c8dc8 | |
parent | c6d0531cad096e6b85ee34209f1b083e6f77a42a (diff) | |
download | mariadb-git-5a3151bcda2f279091a1e2f049a7d11cd91065d6.tar.gz |
Improve diagnostics in order to catch MDEV-18868 and similar bugs
-rw-r--r-- | storage/innobase/fts/fts0fts.cc | 18 | ||||
-rw-r--r-- | storage/innobase/include/btr0bulk.h | 2 | ||||
-rw-r--r-- | storage/innobase/row/row0ftsort.cc | 6 |
3 files changed, 18 insertions, 8 deletions
diff --git a/storage/innobase/fts/fts0fts.cc b/storage/innobase/fts/fts0fts.cc index 1bdfbddca04..a74b5083128 100644 --- a/storage/innobase/fts/fts0fts.cc +++ b/storage/innobase/fts/fts0fts.cc @@ -2546,7 +2546,8 @@ fts_get_max_cache_size( } } else { ib::error() << "(" << error << ") reading max" - " cache config value from config table"; + " cache config value from config table " + << fts_table->table->name; } ut_free(value.f_str); @@ -2719,7 +2720,8 @@ func_exit: } else { *doc_id = 0; - ib::error() << "(" << error << ") while getting next doc id."; + ib::error() << "(" << error << ") while getting next doc id " + "for table " << table->name; fts_sql_rollback(trx); if (error == DB_DEADLOCK) { @@ -2799,7 +2801,8 @@ fts_update_sync_doc_id( cache->synced_doc_id = doc_id; } else { ib::error() << "(" << error << ") while" - " updating last doc id."; + " updating last doc id for table" + << table->name; fts_sql_rollback(trx); } @@ -4044,7 +4047,8 @@ fts_sync_write_words( if (UNIV_UNLIKELY(error != DB_SUCCESS) && !print_error) { ib::error() << "(" << error << ") writing" - " word node to FTS auxiliary index table."; + " word node to FTS auxiliary index table " + << table->name; print_error = TRUE; } } @@ -4199,7 +4203,8 @@ fts_sync_commit( fts_sql_commit(trx); } else { fts_sql_rollback(trx); - ib::error() << "(" << error << ") during SYNC."; + ib::error() << "(" << error << ") during SYNC of " + "table " << sync->table->name; } if (UNIV_UNLIKELY(fts_enable_diag_print) && elapsed_time) { @@ -4970,7 +4975,8 @@ fts_get_rows_count( trx->error_state = DB_SUCCESS; } else { ib::error() << "(" << error - << ") while reading FTS table."; + << ") while reading FTS table " + << table_name; break; /* Exit the loop. */ } diff --git a/storage/innobase/include/btr0bulk.h b/storage/innobase/include/btr0bulk.h index 854414d504d..6687d29593a 100644 --- a/storage/innobase/include/btr0bulk.h +++ b/storage/innobase/include/btr0bulk.h @@ -326,6 +326,8 @@ public: /** Re-latch all latches */ void latch(); + dict_index_t* index() { return m_index; } + private: /** Insert a tuple to a page in a level @param[in] tuple tuple to insert diff --git a/storage/innobase/row/row0ftsort.cc b/storage/innobase/row/row0ftsort.cc index 4085ff17bd3..39b31c153ad 100644 --- a/storage/innobase/row/row0ftsort.cc +++ b/storage/innobase/row/row0ftsort.cc @@ -924,7 +924,7 @@ loop: << " records, the sort queue has " << UT_LIST_GET_LEN(psort_info->fts_doc_list) << " records. But sort cannot get the next" - " records"; + " records during alter table " << table->name; goto exit; } } else if (psort_info->state == FTS_PARENT_EXITING) { @@ -1220,7 +1220,9 @@ row_merge_write_fts_word( if (UNIV_UNLIKELY(error != DB_SUCCESS)) { ib::error() << "Failed to write word to FTS auxiliary" - " index table, error " << error; + " index table " + << ins_ctx->btr_bulk->index()->table->name + << ", error " << error; ret = error; } |