Browse Source

Remove DICT_UNIVERSAL

The only universal index in InnoDB was the change buffer.
It suffices to keep the DICT_IBUF flag (which, like DICT_UNIVERSAL,
is not written to any persistent data structure).
pull/452/head
Marko Mäkelä 8 years ago
parent
commit
c53f57c390
  1. 4
      storage/innobase/dict/dict0defrag_bg.cc
  2. 2
      storage/innobase/ibuf/ibuf0ibuf.cc
  3. 14
      storage/innobase/include/dict0dict.ic
  4. 2
      storage/innobase/include/dict0mem.h
  5. 2
      storage/innobase/srv/srv0start.cc

4
storage/innobase/dict/dict0defrag_bg.cc

@ -290,7 +290,7 @@ dict_stats_save_defrag_summary(
dberr_t ret=DB_SUCCESS;
lint now = (lint) ut_time();
if (dict_index_is_univ(index)) {
if (dict_index_is_ibuf(index)) {
return DB_SUCCESS;
}
@ -320,7 +320,7 @@ dict_stats_save_defrag_stats(
{
dberr_t ret;
if (dict_index_is_univ(index)) {
if (dict_index_is_ibuf(index)) {
return DB_SUCCESS;
}

2
storage/innobase/ibuf/ibuf0ibuf.cc

@ -559,7 +559,7 @@ ibuf_init_at_db_start(void)
ibuf->index = dict_mem_index_create(
"innodb_change_buffer", "CLUST_IND",
IBUF_SPACE_ID, DICT_CLUSTERED | DICT_UNIVERSAL | DICT_IBUF, 1);
IBUF_SPACE_ID, DICT_CLUSTERED | DICT_IBUF, 1);
ibuf->index->id = DICT_IBUF_ID_MIN + IBUF_SPACE_ID;
ibuf->index->table = dict_mem_table_create(
"innodb_change_buffer", IBUF_SPACE_ID, 1, 0, 0, 0);

14
storage/innobase/include/dict0dict.ic

@ -326,20 +326,6 @@ dict_index_is_unique(
return(index->type & DICT_UNIQUE);
}
/********************************************************************//**
Check whether the index is an universal index tree.
@return nonzero for universal tree, zero for other indexes */
UNIV_INLINE
ulint
dict_index_is_univ(
/*===============*/
const dict_index_t* index) /*!< in: index */
{
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
return(index->type & DICT_UNIVERSAL);
}
/********************************************************************//**
Check whether the index is a Spatial Index.
@return nonzero for Spatial Index, zero for other indexes */

2
storage/innobase/include/dict0mem.h

@ -66,8 +66,6 @@ combination of types */
auto-generated clustered indexes,
also DICT_UNIQUE will be set */
#define DICT_UNIQUE 2 /*!< unique index */
#define DICT_UNIVERSAL 4 /*!< index which can contain records from any
other index */
#define DICT_IBUF 8 /*!< insert buffer tree */
#define DICT_CORRUPT 16 /*!< bit to store the corrupted flag
in SYS_INDEXES.TYPE */

2
storage/innobase/srv/srv0start.cc

@ -2139,7 +2139,7 @@ files_checked:
compile_time_assert(IBUF_SPACE_ID == 0);
ulint ibuf_root = btr_create(
DICT_CLUSTERED | DICT_UNIVERSAL | DICT_IBUF,
DICT_CLUSTERED | DICT_IBUF,
0, univ_page_size, DICT_IBUF_ID_MIN,
dict_ind_redundant, NULL, &mtr);

Loading…
Cancel
Save