diff options
author | unknown <marko@hundin.mysql.fi> | 2005-01-14 13:54:23 +0200 |
---|---|---|
committer | unknown <marko@hundin.mysql.fi> | 2005-01-14 13:54:23 +0200 |
commit | 4db9aaeea7e8ffce21740913071d58793340af3d (patch) | |
tree | d120530f84497dffd33fe530b9a42f36fe657b37 /innobase/dict/dict0crea.c | |
parent | c277421d06a7442aa7e25bf85b5b918fec1c45c0 (diff) | |
download | mariadb-git-4db9aaeea7e8ffce21740913071d58793340af3d.tar.gz |
InnoDB: Remove redundant page_no field from dict_index_t.
This completes the patch for fast TRUNCATE TABLE.
innobase/dict/dict0boot.c:
dict_boot(): Add page_no parameter to dict_index_add_to_cache()
innobase/dict/dict0crea.c:
Remove dict_index_t:page_no; add ind_node_t:page_no
innobase/dict/dict0dict.c:
dict_index_add_to_cache(): Add parameter page_no
dict_tree_create(): Add parameter page_no
innobase/dict/dict0load.c:
dict_load_indexes(): Add page_no to dict_index_add_to_cache() call
innobase/ibuf/ibuf0ibuf.c:
ibuf_data_init_for_space(): Move page_no to dict_index_add_to_cache()
innobase/include/dict0crea.h:
ind_node_t: Add page_no field
innobase/include/dict0dict.h:
dict_index_add_to_cache(): Add page_no
dict_tree_create(): Add page_no
innobase/include/dict0mem.h:
dict_index_t: Remove page_no, as dict_tree_t has "page" field
innobase/row/row0mysql.c:
row_truncate_table_for_mysql(): Improve the comments
Diffstat (limited to 'innobase/dict/dict0crea.c')
-rw-r--r-- | innobase/dict/dict0crea.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/innobase/dict/dict0crea.c b/innobase/dict/dict0crea.c index e744ffda7a6..3c496bae5b4 100644 --- a/innobase/dict/dict0crea.c +++ b/innobase/dict/dict0crea.c @@ -544,9 +544,7 @@ dict_build_index_def_step( table in the same tablespace */ index->space = table->space; - - index->page_no = FIL_NULL; - + node->page_no = FIL_NULL; row = dict_create_sys_indexes_tuple(index, node->heap); node->ind_row = row; @@ -624,18 +622,18 @@ dict_create_index_tree_step( btr_pcur_move_to_next_user_rec(&pcur, &mtr); - index->page_no = btr_create(index->type, index->space, index->id, + node->page_no = btr_create(index->type, index->space, index->id, table->comp, &mtr); /* printf("Created a new index tree in space %lu root page %lu\n", index->space, index->page_no); */ page_rec_write_index_page_no(btr_pcur_get_rec(&pcur), DICT_SYS_INDEXES_PAGE_NO_FIELD, - index->page_no, &mtr); + node->page_no, &mtr); btr_pcur_close(&pcur); mtr_commit(&mtr); - if (index->page_no == FIL_NULL) { + if (node->page_no == FIL_NULL) { return(DB_OUT_OF_FILE_SPACE); } @@ -793,7 +791,7 @@ dict_truncate_index_tree( root_page_no = btr_create(type, space, index_id, comp, mtr); if (index) { - index->page_no = root_page_no; + index->tree->page = root_page_no; } page_rec_write_index_page_no(rec, @@ -857,6 +855,7 @@ ind_create_graph_create( node->index = index; node->state = INDEX_BUILD_INDEX_DEF; + node->page_no = FIL_NULL; node->heap = mem_heap_create(256); node->ind_def = ins_node_create(INS_DIRECT, @@ -1076,7 +1075,8 @@ dict_create_index_step( if (node->state == INDEX_ADD_TO_CACHE) { - success = dict_index_add_to_cache(node->table, node->index); + success = dict_index_add_to_cache(node->table, node->index, + node->page_no); ut_a(success); |