Improve diagnostics in order to catch MDEV-18868 and similar bugs

parent c6d0531c
......@@ -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 @@ fts_cmp_set_sync_doc_id(
} 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. */
}
......
......@@ -326,6 +326,8 @@ class BtrBulk
/** 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
......
......@@ -924,7 +924,7 @@ fts_parallel_tokenization(
<< " 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;
}
......
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