Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions storage/innobase/dict/dict0load.cc
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ dict_sys_tables_rec_read(
rec, DICT_FLD__SYS_TABLES__DB_TRX_ID, &len);
ut_ad(len == 6 || len == UNIV_SQL_NULL);
trx_id_t id = len == 6 ? trx_read_trx_id(field) : 0;
if (id && !uncommitted && trx_sys.find(nullptr, id, false)) {
if (id && !uncommitted && trx_sys.is_registered(nullptr, id)) {
const auto savepoint = mtr->get_savepoint();
heap = mem_heap_create(1024);
dict_index_t* index = UT_LIST_GET_FIRST(
Expand Down Expand Up @@ -1066,7 +1066,7 @@ static const char *dict_load_column_low(dict_table_t *table,
const trx_id_t trx_id = trx_read_trx_id(field);

if (trx_id && mtr && use_uncommitted < 2
&& trx_sys.find(nullptr, trx_id, false)) {
&& trx_sys.is_registered(nullptr, trx_id)) {
if (use_uncommitted) {
return dict_load_column_instant;
}
Expand Down Expand Up @@ -1275,7 +1275,7 @@ dict_load_virtual_low(
const trx_id_t trx_id = trx_read_trx_id(field);

if (trx_id && column && !uncommitted
&& trx_sys.find(nullptr, trx_id, false)) {
&& trx_sys.is_registered(nullptr, trx_id)) {
if (!rec_get_deleted_flag(rec, 0)) {
return dict_load_virtual_none;
}
Expand Down Expand Up @@ -1630,7 +1630,7 @@ dict_load_field_low(
if (!trx_id) {
ut_ad(!rec_get_deleted_flag(rec, 0));
} else if (!mtr || uncommitted) {
} else if (trx_sys.find(nullptr, trx_id, false)) {
} else if (trx_sys.is_registered(nullptr, trx_id)) {
const auto savepoint = mtr->get_savepoint();
dict_index_t* sys_field = UT_LIST_GET_FIRST(
dict_sys.sys_fields->indexes);
Expand Down Expand Up @@ -1846,7 +1846,7 @@ dict_load_index_low(
if (!trx_id) {
ut_ad(!rec_get_deleted_flag(rec, 0));
} else if (!mtr || uncommitted) {
} else if (trx_sys.find(nullptr, trx_id, false)) {
} else if (trx_sys.is_registered(nullptr, trx_id)) {
const auto savepoint = mtr->get_savepoint();
dict_index_t* sys_index = UT_LIST_GET_FIRST(
dict_sys.sys_indexes->indexes);
Expand Down Expand Up @@ -2716,7 +2716,7 @@ static dberr_t dict_load_foreign_cols(mtr_t &mtr, dict_foreign_t *foreign,

const trx_id_t id = trx_read_trx_id(field);
if (!id) {
} else if (id != trx_id && trx_sys.find(nullptr, id, false)) {
} else if (id != trx_id && trx_sys.is_registered(nullptr, id)) {
const auto savepoint = mtr.get_savepoint();
rec_offs* offsets = rec_get_offsets(
rec, sys_index, nullptr, true, ULINT_UNDEFINED,
Expand Down Expand Up @@ -2906,7 +2906,7 @@ dict_load_foreign(
const trx_id_t tid = trx_read_trx_id(field);

if (tid && tid != trx_id && !uncommitted
&& trx_sys.find(nullptr, tid, false)) {
&& trx_sys.is_registered(nullptr, tid)) {
const auto savepoint = mtr.get_savepoint();
rec_offs* offsets = rec_get_offsets(
rec, sys_index, nullptr, true, ULINT_UNDEFINED, &heap);
Expand Down
8 changes: 4 additions & 4 deletions storage/innobase/dict/dict0stats.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1140,7 +1140,7 @@ dict_stats_update_transient_for_index(trx_t *trx, dict_index_t* index) noexcept
}

const auto bulk_trx_id = index->table->bulk_trx_id;
if (bulk_trx_id && trx_sys.find(nullptr, bulk_trx_id, false)) {
if (trx_sys.is_registered(nullptr, bulk_trx_id)) {
err= DB_SUCCESS_LOCKED_REC;
goto invalid;
}
Expand Down Expand Up @@ -1206,7 +1206,7 @@ dberr_t dict_stats_update_transient(trx_t *trx, dict_table_t *table) noexcept
}

if (trx_id_t bulk_trx_id = table->bulk_trx_id) {
if (trx_sys.find(nullptr, bulk_trx_id, false)) {
if (trx_sys.is_registered(nullptr, bulk_trx_id)) {
dict_stats_empty_table(table);
return DB_SUCCESS_LOCKED_REC;
}
Expand Down Expand Up @@ -2330,7 +2330,7 @@ static index_stats_t dict_stats_analyze_index(trx_t *trx, dict_index_t* index)
result.n_leaf_pages = size ? size : 1;

const auto bulk_trx_id = index->table->bulk_trx_id;
if (bulk_trx_id && trx_sys.find(nullptr, bulk_trx_id, false)) {
if (trx_sys.is_registered(nullptr, bulk_trx_id)) {
result.set_bulk_operation();
goto empty_index;
}
Expand Down Expand Up @@ -2600,7 +2600,7 @@ dberr_t dict_stats_update_persistent(trx_t *trx, dict_table_t *table) noexcept
DEBUG_SYNC_C("dict_stats_update_persistent");

if (trx_id_t bulk_trx_id = table->bulk_trx_id) {
if (trx_sys.find(trx, bulk_trx_id, false)) {
if (trx_sys.is_registered(trx, bulk_trx_id)) {
dict_stats_empty_table(table);
return DB_SUCCESS_LOCKED_REC;
}
Expand Down
Loading