MDEV-12266: Remove a level of pointer indirection

Replace table->space->id with table->space_id.
This commit is contained in:
Marko Mäkelä 2018-11-22 17:07:35 +02:00
parent 0c69f2e1ee
commit 06e5f28f9f
24 changed files with 90 additions and 89 deletions

View file

@ -225,7 +225,7 @@ btr_root_block_get(
}
buf_block_t* block = btr_block_get(
page_id_t(index->table->space->id, index->page),
page_id_t(index->table->space_id, index->page),
page_size_t(index->table->space->flags), mode,
index, mtr);
@ -250,9 +250,9 @@ btr_root_block_get(
const page_t* root = buf_block_get_frame(block);
ut_a(btr_root_fseg_validate(FIL_PAGE_DATA + PAGE_BTR_SEG_LEAF
+ root, index->table->space->id));
+ root, index->table->space_id));
ut_a(btr_root_fseg_validate(FIL_PAGE_DATA + PAGE_BTR_SEG_TOP
+ root, index->table->space->id));
+ root, index->table->space_id));
}
#endif /* UNIV_BTR_DEBUG */
@ -363,7 +363,7 @@ btr_root_adjust_on_import(
buf_block_t* block;
page_zip_des_t* page_zip;
dict_table_t* table = index->table;
const page_id_t page_id(table->space->id, index->page);
const page_id_t page_id(table->space_id, index->page);
const page_size_t page_size(table->space->flags);
DBUG_EXECUTE_IF("ib_import_trigger_corruption_3",
@ -405,10 +405,10 @@ btr_root_adjust_on_import(
if (err == DB_SUCCESS
&& (!btr_root_fseg_adjust_on_import(
FIL_PAGE_DATA + PAGE_BTR_SEG_LEAF
+ page, page_zip, table->space->id, &mtr)
+ page, page_zip, table->space_id, &mtr)
|| !btr_root_fseg_adjust_on_import(
FIL_PAGE_DATA + PAGE_BTR_SEG_TOP
+ page, page_zip, table->space->id, &mtr))) {
+ page, page_zip, table->space_id, &mtr))) {
err = DB_CORRUPTION;
}
@ -474,7 +474,7 @@ btr_page_alloc_for_ibuf(
ut_a(node_addr.page != FIL_NULL);
new_block = buf_page_get(
page_id_t(index->table->space->id, node_addr.page),
page_id_t(index->table->space_id, node_addr.page),
page_size_t(index->table->space->flags),
RW_X_LATCH, mtr);
@ -923,11 +923,11 @@ btr_node_ptr_get_child(
mtr_t* mtr) /*!< in: mtr */
{
ut_ad(rec_offs_validate(node_ptr, index, offsets));
ut_ad(index->table->space->id
ut_ad(index->table->space_id
== page_get_space_id(page_align(node_ptr)));
return btr_block_get(
page_id_t(index->table->space->id,
page_id_t(index->table->space_id,
btr_node_ptr_get_child_page_no(node_ptr, offsets)),
page_size_t(index->table->space->flags),
RW_SX_LATCH, index, mtr);
@ -1472,7 +1472,7 @@ btr_read_autoinc(dict_index_t* index)
mtr.start();
ib_uint64_t autoinc;
if (buf_block_t* block = buf_page_get(
page_id_t(index->table->space->id, index->page),
page_id_t(index->table->space_id, index->page),
page_size_t(index->table->space->flags),
RW_S_LATCH, &mtr)) {
autoinc = page_get_autoinc(block->frame);
@ -1504,7 +1504,7 @@ btr_read_autoinc_with_fallback(const dict_table_t* table, unsigned col_no)
mtr_t mtr;
mtr.start();
buf_block_t* block = buf_page_get(
page_id_t(index->table->space->id, index->page),
page_id_t(index->table->space_id, index->page),
page_size_t(index->table->space->flags),
RW_S_LATCH, &mtr);
@ -1979,7 +1979,7 @@ btr_root_raise_and_insert(
#endif /* UNIV_ZIP_DEBUG */
#ifdef UNIV_BTR_DEBUG
if (!dict_index_is_ibuf(index)) {
ulint space = index->table->space->id;
ulint space = index->table->space_id;
ut_a(btr_root_fseg_validate(FIL_PAGE_DATA + PAGE_BTR_SEG_LEAF
+ root, space));
@ -3906,7 +3906,7 @@ retry:
btr_search_drop_page_hash_index(block);
/* Remove the page from the level list */
btr_level_list_remove(index->table->space->id,
btr_level_list_remove(index->table->space_id,
page_size, page, index, mtr);
if (dict_index_is_spatial(index)) {
@ -4036,7 +4036,7 @@ retry:
#endif /* UNIV_BTR_DEBUG */
/* Remove the page from the level list */
btr_level_list_remove(index->table->space->id,
btr_level_list_remove(index->table->space_id,
page_size, page, index, mtr);
ut_ad(btr_node_ptr_get_child_page_no(
@ -4276,7 +4276,7 @@ btr_discard_only_page_on_level(
#ifdef UNIV_BTR_DEBUG
if (!dict_index_is_ibuf(index)) {
const page_t* root = buf_block_get_frame(block);
const ulint space = index->table->space->id;
const ulint space = index->table->space_id;
ut_a(btr_root_fseg_validate(FIL_PAGE_DATA + PAGE_BTR_SEG_LEAF
+ root, space));
ut_a(btr_root_fseg_validate(FIL_PAGE_DATA + PAGE_BTR_SEG_TOP
@ -4357,7 +4357,7 @@ btr_discard_page(
if (left_page_no != FIL_NULL) {
merge_block = btr_block_get(
page_id_t(index->table->space->id, left_page_no),
page_id_t(index->table->space_id, left_page_no),
page_size, RW_X_LATCH, index, mtr);
merge_page = buf_block_get_frame(merge_block);
@ -4373,7 +4373,7 @@ btr_discard_page(
== btr_cur_get_rec(&parent_cursor)));
} else if (right_page_no != FIL_NULL) {
merge_block = btr_block_get(
page_id_t(index->table->space->id, right_page_no),
page_id_t(index->table->space_id, right_page_no),
page_size, RW_X_LATCH, index, mtr);
merge_page = buf_block_get_frame(merge_block);
@ -4422,7 +4422,7 @@ btr_discard_page(
}
/* Remove the page from the level list */
btr_level_list_remove(index->table->space->id, page_size,
btr_level_list_remove(index->table->space_id, page_size,
page, index, mtr);
#ifdef UNIV_ZIP_DEBUG
@ -4979,7 +4979,7 @@ btr_validate_level(
ret = false;
}
ut_a(index->table->space->id == block->page.id.space());
ut_a(index->table->space_id == block->page.id.space());
ut_a(block->page.id.space() == page_get_space_id(page));
#ifdef UNIV_ZIP_DEBUG
page_zip = buf_block_get_page_zip(block);
@ -5016,7 +5016,7 @@ btr_validate_level(
savepoint2 = mtr_set_savepoint(&mtr);
block = btr_block_get(
page_id_t(index->table->space->id,
page_id_t(index->table->space_id,
left_page_no),
table_page_size,
RW_SX_LATCH, index, &mtr);
@ -5045,7 +5045,7 @@ loop:
ut_a(!page_zip || page_zip_validate(page_zip, page, index));
#endif /* UNIV_ZIP_DEBUG */
ut_a(block->page.id.space() == index->table->space->id);
ut_a(block->page.id.space() == index->table->space_id);
if (fseg_page_is_free(space, block->page.id.page_no())) {
@ -5088,7 +5088,7 @@ loop:
savepoint = mtr_set_savepoint(&mtr);
right_block = btr_block_get(
page_id_t(index->table->space->id, right_page_no),
page_id_t(index->table->space_id, right_page_no),
table_page_size,
RW_SX_LATCH, index, &mtr);
@ -5265,13 +5265,13 @@ loop:
&mtr, savepoint, right_block);
btr_block_get(
page_id_t(index->table->space->id,
page_id_t(index->table->space_id,
parent_right_page_no),
table_page_size,
RW_SX_LATCH, index, &mtr);
right_block = btr_block_get(
page_id_t(index->table->space->id,
page_id_t(index->table->space_id,
right_page_no),
table_page_size,
RW_SX_LATCH, index, &mtr);
@ -5349,14 +5349,14 @@ node_ptr_fails:
if (parent_right_page_no != FIL_NULL) {
btr_block_get(
page_id_t(
index->table->space->id,
index->table->space_id,
parent_right_page_no),
table_page_size,
RW_SX_LATCH, index, &mtr);
}
} else if (parent_page_no != FIL_NULL) {
btr_block_get(
page_id_t(index->table->space->id,
page_id_t(index->table->space_id,
parent_page_no),
table_page_size,
RW_SX_LATCH, index, &mtr);
@ -5364,7 +5364,7 @@ node_ptr_fails:
}
block = btr_block_get(
page_id_t(index->table->space->id, right_page_no),
page_id_t(index->table->space_id, right_page_no),
table_page_size,
RW_SX_LATCH, index, &mtr);
@ -5510,7 +5510,7 @@ btr_can_merge_with_page(
index = btr_cur_get_index(cursor);
page = btr_cur_get_page(cursor);
const page_id_t page_id(index->table->space->id, page_no);
const page_id_t page_id(index->table->space_id, page_no);
const page_size_t page_size(index->table->space->flags);
mblock = btr_block_get(page_id, page_size, RW_X_LATCH, index, mtr);

View file

@ -120,7 +120,7 @@ PageBulk::init()
}
} else {
new_block = btr_block_get(
page_id_t(m_index->table->space->id, m_page_no),
page_id_t(m_index->table->space_id, m_page_no),
page_size_t(m_index->table->space->flags),
RW_X_LATCH, m_index, &m_mtr);
@ -663,7 +663,7 @@ PageBulk::latch()
if (!buf_page_optimistic_get(RW_X_LATCH, m_block, m_modify_clock,
__FILE__, __LINE__, &m_mtr)) {
m_block = buf_page_get_gen(
page_id_t(m_index->table->space->id, m_page_no),
page_id_t(m_index->table->space_id, m_page_no),
page_size_t(m_index->table->space->flags),
RW_X_LATCH, m_block, BUF_GET_IF_IN_POOL,
__FILE__, __LINE__, &m_mtr, &m_err);
@ -1015,7 +1015,7 @@ BtrBulk::finish(dberr_t err)
ut_ad(last_page_no != FIL_NULL);
last_block = btr_block_get(
page_id_t(m_index->table->space->id, last_page_no),
page_id_t(m_index->table->space_id, last_page_no),
page_size_t(m_index->table->space->flags),
RW_X_LATCH, m_index, &mtr);
first_rec = page_rec_get_next(

View file

@ -667,7 +667,7 @@ btr_cur_optimistic_latch_leaves(
if (left_page_no != FIL_NULL) {
cursor->left_block = btr_block_get(
page_id_t(cursor->index->table->space->id,
page_id_t(cursor->index->table->space_id,
left_page_no),
page_size_t(cursor->index->table->space
->flags),
@ -1346,7 +1346,7 @@ btr_cur_search_to_nth_level_func(
const page_size_t page_size(index->table->space->flags);
/* Start with the root page. */
page_id_t page_id(index->table->space->id, index->page);
page_id_t page_id(index->table->space_id, index->page);
if (root_leaf_rw_latch == RW_X_LATCH) {
node_ptr_max_size = btr_node_ptr_max_size(index);
@ -2453,7 +2453,7 @@ btr_cur_open_at_index_side_func(
page_cursor = btr_cur_get_page_cur(cursor);
cursor->index = index;
page_id_t page_id(index->table->space->id, index->page);
page_id_t page_id(index->table->space_id, index->page);
const page_size_t page_size(index->table->space->flags);
if (root_leaf_rw_latch == RW_X_LATCH) {
@ -2810,7 +2810,7 @@ btr_cur_open_at_rnd_pos_func(
page_cursor = btr_cur_get_page_cur(cursor);
cursor->index = index;
page_id_t page_id(index->table->space->id, index->page);
page_id_t page_id(index->table->space_id, index->page);
const page_size_t page_size(index->table->space->flags);
dberr_t err = DB_SUCCESS;
@ -7185,7 +7185,7 @@ struct btr_blob_log_check_t {
if (m_op == BTR_STORE_INSERT_BULK) {
mtr_x_lock(dict_index_get_lock(index), m_mtr);
m_pcur->btr_cur.page_cur.block = btr_block_get(
page_id_t(index->table->space->id, page_no),
page_id_t(index->table->space_id, page_no),
page_size_t(index->table->space->flags),
RW_X_LATCH, index, m_mtr);
m_pcur->btr_cur.page_cur.rec
@ -7789,6 +7789,7 @@ btr_free_externally_stored_field(
& ~((BTR_EXTERN_OWNER_FLAG
| BTR_EXTERN_INHERITED_FLAG) << 24)));
ut_ad(space_id == index->table->space->id);
ut_ad(space_id == index->table->space_id);
const page_size_t ext_page_size(dict_table_page_size(index->table));
const page_size_t& rec_page_size(rec == NULL

View file

@ -166,7 +166,7 @@ btr_defragment_add_index(
mtr_start(&mtr);
// Load index rood page.
buf_block_t* block = btr_block_get(
page_id_t(index->table->space->id, index->page),
page_id_t(index->table->space_id, index->page),
page_size_t(index->table->space->flags),
RW_NO_LATCH, index, &mtr);
page_t* page = NULL;
@ -314,7 +314,7 @@ btr_defragment_save_defrag_stats_if_needed(
dict_index_t* index) /*!< in: index */
{
if (srv_defragment_stats_accuracy != 0 // stats tracking disabled
&& index->table->space->id != 0 // do not track system tables
&& index->table->space_id != 0 // do not track system tables
&& index->stat_defrag_modified_counter
>= srv_defragment_stats_accuracy) {
dict_stats_defrag_pool_add(index);
@ -489,7 +489,7 @@ btr_defragment_merge_pages(
from_block);
btr_search_drop_page_hash_index(from_block);
btr_level_list_remove(
index->table->space->id,
index->table->space_id,
page_size, from_page, index, mtr);
btr_node_ptr_delete(index, from_block, mtr);
/* btr_blob_dbg_remove(from_page, index,
@ -564,7 +564,7 @@ btr_defragment_n_pages(
return NULL;
}
if (!index->table->space || !index->table->space->id) {
if (!index->table->space || !index->table->space_id) {
/* Ignore space 0. */
return NULL;
}
@ -589,7 +589,7 @@ btr_defragment_n_pages(
break;
}
blocks[i] = btr_block_get(page_id_t(index->table->space->id,
blocks[i] = btr_block_get(page_id_t(index->table->space_id,
page_no), page_size,
RW_X_LATCH, index, mtr);
}

View file

@ -450,14 +450,14 @@ btr_pessimistic_scrub(
mtr->release_block_at_savepoint(scrub_data->savepoint, block);
buf_block_t* get_block __attribute__((unused)) = btr_block_get(
page_id_t(index->table->space->id, left_page_no),
page_id_t(index->table->space_id, left_page_no),
page_size, RW_X_LATCH, index, mtr);
/**
* Refetch block and re-initialize page
*/
block = btr_block_get(
page_id_t(index->table->space->id, page_no),
page_id_t(index->table->space_id, page_no),
page_size, RW_X_LATCH, index, mtr);
page = buf_block_get_frame(block);
@ -471,7 +471,7 @@ btr_pessimistic_scrub(
if (right_page_no != FIL_NULL) {
buf_block_t* get_block __attribute__((unused))= btr_block_get(
page_id_t(index->table->space->id, right_page_no),
page_id_t(index->table->space_id, right_page_no),
page_size, RW_X_LATCH, index, mtr);
}
@ -787,7 +787,7 @@ btr_scrub_page(
/* check that table/index still match now that they are loaded */
if (!scrub_data->current_table->space
|| scrub_data->current_table->space->id != scrub_data->space) {
|| scrub_data->current_table->space_id != scrub_data->space) {
/* this is truncate table */
mtr_commit(mtr);
return BTR_SCRUB_SKIP_PAGE_AND_CLOSE_TABLE;

View file

@ -660,7 +660,7 @@ btr_search_update_hash_ref(
return;
}
ut_ad(block->page.id.space() == index->table->space->id);
ut_ad(block->page.id.space() == index->table->space_id);
ut_ad(index == cursor->index);
ut_ad(!dict_index_is_ibuf(index));
@ -1356,7 +1356,7 @@ btr_search_build_page_hash_index(
rec_offs_init(offsets_);
ut_ad(ahi_latch == btr_get_search_latch(index));
ut_ad(index);
ut_ad(block->page.id.space() == index->table->space->id);
ut_ad(block->page.id.space() == index->table->space_id);
ut_a(!dict_index_is_ibuf(index));
ut_ad(page_is_leaf(block->frame));
@ -1673,7 +1673,7 @@ void btr_search_update_hash_on_delete(btr_cur_t* cursor)
return;
}
ut_ad(block->page.id.space() == index->table->space->id);
ut_ad(block->page.id.space() == index->table->space_id);
ut_a(index == cursor->index);
ut_a(block->curr_n_fields > 0 || block->curr_n_bytes > 0);
ut_a(!dict_index_is_ibuf(index));
@ -1830,7 +1830,7 @@ btr_search_update_hash_on_insert(btr_cur_t* cursor, rw_lock_t* ahi_latch)
return;
}
ut_ad(block->page.id.space() == index->table->space->id);
ut_ad(block->page.id.space() == index->table->space_id);
btr_search_check_free_space_in_heap(index);
table = btr_get_search_table(index);

View file

@ -3007,7 +3007,7 @@ err_exit:
}
if (err == DB_SUCCESS && cached && table->is_readable()) {
if (table->space && !fil_space_get_size(table->space->id)) {
if (table->space && !fil_space_get_size(table->space_id)) {
table->corrupted = true;
table->file_unreadable = true;
} else if (table->supports_instant()) {

View file

@ -1503,7 +1503,7 @@ dict_stats_analyze_index_below_cur(
offsets_rec = rec_get_offsets(rec, index, offsets1, false,
ULINT_UNDEFINED, &heap);
page_id_t page_id(index->table->space->id,
page_id_t page_id(index->table->space_id,
btr_node_ptr_get_child_page_no(
rec, offsets_rec));
const page_size_t page_size(index->table->space->flags);

View file

@ -4878,8 +4878,8 @@ fil_mtr_rename_log(
{
ut_ad(old_table->space != fil_system.temp_space);
ut_ad(new_table->space != fil_system.temp_space);
ut_ad(old_table->space_id == old_table->space->id);
ut_ad(new_table->space_id == new_table->space->id);
ut_ad(old_table->space->id == old_table->space_id);
ut_ad(new_table->space->id == new_table->space_id);
/* If neither table is file-per-table,
there will be no renaming of files. */

View file

@ -1741,7 +1741,7 @@ fts_create_in_mem_aux_table(
{
dict_table_t* new_table = dict_mem_table_create(
aux_table_name, NULL, n_cols, 0, table->flags,
table->space->id == TRX_SYS_SPACE
table->space_id == TRX_SYS_SPACE
? 0 : table->space->purpose == FIL_TYPE_TEMPORARY
? DICT_TF2_TEMPORARY : DICT_TF2_USE_FILE_PER_TABLE);

View file

@ -737,7 +737,7 @@ rtr_adjust_upper_level(
new_prdt.op = 0;
lock_prdt_update_parent(block, new_block, &prdt, &new_prdt,
index->table->space->id,
index->table->space_id,
page_cursor->block->page.id.page_no());
mem_heap_free(heap);
@ -1258,7 +1258,7 @@ after_insert:
/* Check any predicate locks need to be moved/copied to the
new page */
lock_prdt_update_split(new_block, &prdt, &new_prdt,
cursor->index->table->space->id, page_no);
cursor->index->table->space_id, page_no);
/* Adjust the upper level. */
rtr_adjust_upper_level(cursor, flags, block, new_block,
@ -1872,7 +1872,7 @@ rtr_estimate_n_rows_in_range(
mtr_s_lock(&index->lock, &mtr);
buf_block_t* block = btr_block_get(
page_id_t(index->table->space->id, index->page),
page_id_t(index->table->space_id, index->page),
page_size_t(index->table->space->flags),
RW_S_LATCH, index, &mtr);
const page_t* page = buf_block_get_frame(block);

View file

@ -268,7 +268,7 @@ rtr_pcur_getnext_from_path(
dberr_t err = DB_SUCCESS;
block = buf_page_get_gen(
page_id_t(index->table->space->id,
page_id_t(index->table->space_id,
next_rec.page_no), page_size,
rw_latch, NULL, BUF_GET, __FILE__, __LINE__, mtr, &err);
@ -298,7 +298,7 @@ rtr_pcur_getnext_from_path(
&& mode != PAGE_CUR_RTREE_LOCATE) {
ut_ad(rtr_info->thr);
lock_place_prdt_page_lock(
index->table->space->id,
index->table->space_id,
next_page_no, index,
rtr_info->thr);
}
@ -422,7 +422,7 @@ rtr_pcur_getnext_from_path(
btr_cur_latch_leaves(
block,
page_id_t(index->table->space->id,
page_id_t(index->table->space_id,
block->page.id.page_no()),
page_size, BTR_MODIFY_TREE,
btr_cur, mtr);
@ -1360,7 +1360,7 @@ search_again:
dberr_t err = DB_SUCCESS;
block = buf_page_get_gen(
page_id_t(index->table->space->id, page_no),
page_id_t(index->table->space_id, page_no),
page_size, RW_X_LATCH, NULL,
BUF_GET, __FILE__, __LINE__, mtr, &err);

View file

@ -3372,7 +3372,7 @@ ibuf_insert_low(
ut_ad(!dict_index_is_spatial(index));
ut_ad(dtuple_check_typed(entry));
ut_ad(!no_counter || op == IBUF_OP_INSERT);
ut_ad(page_id.space() == index->table->space->id);
ut_ad(page_id.space() == index->table->space_id);
ut_a(op < IBUF_OP_COUNT);
do_merge = FALSE;

View file

@ -397,7 +397,7 @@ row_mtr_start(mtr_t* mtr, dict_index_t* index, bool pessimistic)
{
mtr->start();
switch (index->table->space->id) {
switch (index->table->space_id) {
case IBUF_SPACE_ID:
if (pessimistic
&& !(index->type & (DICT_UNIQUE | DICT_SPATIAL))) {

View file

@ -236,7 +236,7 @@ page_set_autoinc(
mtr, block, MTR_MEMO_PAGE_X_FIX | MTR_MEMO_PAGE_SX_FIX));
ut_ad(index->is_primary());
ut_ad(index->page == block->page.id.page_no());
ut_ad(index->table->space->id == block->page.id.space());
ut_ad(index->table->space_id == block->page.id.space());
byte* field = PAGE_HEADER + PAGE_ROOT_AUTO_INC
+ buf_block_get_frame(block);

View file

@ -900,7 +900,7 @@ loop:
merge_file[t_ctx.buf_used]->offset++,
block[t_ctx.buf_used],
crypt_block[t_ctx.buf_used],
table->space->id)) {
table->space_id)) {
error = DB_TEMP_FILE_WRITE_FAIL;
goto func_exit;
}
@ -994,7 +994,7 @@ exit:
merge_file[i]->offset++,
block[i],
crypt_block[i],
table->space->id)) {
table->space_id)) {
error = DB_TEMP_FILE_WRITE_FAIL;
goto func_exit;
}
@ -1032,7 +1032,7 @@ exit:
psort_info->psort_common->dup,
merge_file[i], block[i], &tmpfd[i],
false, 0.0/* pct_progress */, 0.0/* pct_cost */,
crypt_block[i], table->space->id);
crypt_block[i], table->space_id);
if (error != DB_SUCCESS) {
os_file_close(tmpfd[i]);
@ -1702,7 +1702,7 @@ row_fts_merge_insert(
#ifdef UNIV_DEBUG
ins_ctx.aux_index_id = id;
#endif
const ulint space = table->space->id;
const ulint space = table->space_id;
for (i = 0; i < fts_sort_pll_degree; i++) {
if (psort_info[i].merge_file[id]->n_rec == 0) {

View file

@ -2049,7 +2049,7 @@ row_import_discard_changes(
table->file_unreadable = true;
if (table->space) {
fil_close_tablespace(trx, table->space->id);
fil_close_tablespace(trx, table->space_id);
table->space = NULL;
}
}

View file

@ -435,7 +435,7 @@ row_log_online_op(
if (!log_tmp_block_encrypt(
buf, srv_sort_buf_size,
log->crypt_tail, byte_offset,
index->table->space->id)) {
index->table->space_id)) {
log->error = DB_DECRYPTION_FAILED;
goto write_failed;
}
@ -573,7 +573,7 @@ row_log_table_close_func(
if (!log_tmp_block_encrypt(
log->tail.block, srv_sort_buf_size,
log->crypt_tail, byte_offset,
index->table->space->id)) {
index->table->space_id)) {
log->error = DB_DECRYPTION_FAILED;
goto err_exit;
}
@ -2871,7 +2871,7 @@ all_done:
if (!log_tmp_block_decrypt(
buf, srv_sort_buf_size,
index->online_log->crypt_head,
ofs, index->table->space->id)) {
ofs, index->table->space_id)) {
error = DB_DECRYPTION_FAILED;
goto func_exit;
}
@ -3774,7 +3774,7 @@ all_done:
if (!log_tmp_block_decrypt(
buf, srv_sort_buf_size,
index->online_log->crypt_head,
ofs, index->table->space->id)) {
ofs, index->table->space_id)) {
error = DB_DECRYPTION_FAILED;
goto func_exit;
}

View file

@ -2538,7 +2538,7 @@ write_buffers:
curr_progress,
pct_cost,
crypt_block,
new_table->space->id);
new_table->space_id);
if (row == NULL) {
err = clust_btr_bulk->finish(
@ -2649,7 +2649,7 @@ write_buffers:
curr_progress,
pct_cost,
crypt_block,
new_table->space->id);
new_table->space_id);
err = btr_bulk.finish(err);
@ -2683,7 +2683,7 @@ write_buffers:
if (!row_merge_write(
file->fd, file->offset++,
block, crypt_block,
new_table->space->id)) {
new_table->space_id)) {
err = DB_TEMP_FILE_WRITE_FAIL;
trx->error_key_num = i;
break;
@ -4303,7 +4303,7 @@ row_make_new_pathname(
dict_table_t* table, /*!< in: table to be renamed */
const char* new_name) /*!< in: new name */
{
ut_ad(!is_system_tablespace(table->space->id));
ut_ad(!is_system_tablespace(table->space_id));
return os_file_make_new_pathname(table->space->chain.start->name,
new_name);
}
@ -4538,7 +4538,7 @@ row_merge_write_redo(
log_ptr = mlog_open(&mtr, 11 + 8);
log_ptr = mlog_write_initial_log_record_low(
MLOG_INDEX_LOAD,
index->table->space->id, index->page, log_ptr, &mtr);
index->table->space_id, index->page, log_ptr, &mtr);
mach_write_to_8(log_ptr, index->id);
mlog_close(&mtr, log_ptr + 8);
mtr.commit();
@ -4896,7 +4896,7 @@ wait_again:
trx, &dup, &merge_files[i],
block, &tmpfd, true,
pct_progress, pct_cost,
crypt_block, new_table->space->id,
crypt_block, new_table->space_id,
stage);
pct_progress += pct_cost;
@ -4939,7 +4939,7 @@ wait_again:
merge_files[i].fd, block, NULL,
&btr_bulk,
merge_files[i].n_rec, pct_progress, pct_cost,
crypt_block, new_table->space->id,
crypt_block, new_table->space_id,
stage);
error = btr_bulk.finish(error);

View file

@ -2462,7 +2462,7 @@ err_exit:
/* We already have .ibd file here. it should be deleted. */
if (dict_table_is_file_per_table(table)
&& fil_delete_tablespace(table->space->id) != DB_SUCCESS) {
&& fil_delete_tablespace(table->space_id) != DB_SUCCESS) {
ib::error() << "Cannot delete the file of table "
<< table->name;
}
@ -3805,7 +3805,7 @@ do_drop:
&& dict_table_get_low("SYS_DATAFILES")) {
info = pars_info_create();
pars_info_add_int4_literal(info, "id",
lint(table->space->id));
lint(table->space_id));
err = que_eval_sql(
info,
"PROCEDURE DROP_SPACE_PROC () IS\n"

View file

@ -142,7 +142,7 @@ row_quiesce_write_indexes(
mach_write_to_8(ptr, index->id);
ptr += sizeof(index_id_t);
mach_write_to_4(ptr, table->space->id);
mach_write_to_4(ptr, table->space_id);
ptr += sizeof(ib_uint32_t);
mach_write_to_4(ptr, index->page);
@ -526,7 +526,7 @@ row_quiesce_table_start(
}
for (ulint count = 0;
ibuf_merge_space(table->space->id) != 0
ibuf_merge_space(table->space_id) != 0
&& !trx_is_interrupted(trx);
++count) {
if (!(count % 20)) {
@ -538,7 +538,7 @@ row_quiesce_table_start(
if (!trx_is_interrupted(trx)) {
{
FlushObserver observer(table->space, trx, NULL);
buf_LRU_flush_or_remove_pages(table->space->id,
buf_LRU_flush_or_remove_pages(table->space_id,
&observer);
}
@ -638,7 +638,7 @@ row_quiesce_set_state(
ER_CANNOT_DISCARD_TEMPORARY_TABLE);
return(DB_UNSUPPORTED);
} else if (table->space->id == TRX_SYS_SPACE) {
} else if (table->space_id == TRX_SYS_SPACE) {
char table_name[MAX_FULL_NAME_LEN + 1];

View file

@ -1131,7 +1131,7 @@ re_scan:
btr_pcur_get_page(pcur));
cur_block = buf_page_get_gen(
page_id_t(index->table->space->id, page_no),
page_id_t(index->table->space_id, page_no),
page_size_t(index->table->space->flags),
RW_X_LATCH, NULL, BUF_GET,
__FILE__, __LINE__, mtr, &err);

View file

@ -429,7 +429,7 @@ row_undo_ins_parse_undo_rec(
dict_table_t* table = node->table;
ut_ad(!table->is_temporary());
ut_ad(dict_table_is_file_per_table(table)
== !is_system_tablespace(table->space->id));
== !is_system_tablespace(table->space_id));
size_t len = mach_read_from_2(node->undo_rec)
+ size_t(node->undo_rec - ptr) - 2;
ptr[len] = 0;

View file

@ -2320,7 +2320,7 @@ row_upd_sec_index_entry(
mtr.start();
switch (index->table->space->id) {
switch (index->table->space_id) {
case SRV_TMP_SPACE_ID:
mtr.set_log_mode(MTR_LOG_NO_REDO);
flags = BTR_NO_LOCKING_FLAG;