summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Kosov <claprix@yandex.ru>2019-11-01 14:21:29 +0300
committerEugene Kosov <claprix@yandex.ru>2019-11-01 14:21:29 +0300
commit792c9f9a4977ea428537ca34435d39bd17cec5ff (patch)
tree79ddc5c15840903ea694af1808c0dcd53c5c663b
parent1552b254a0140e91c54394af5d06d25ae88d5a28 (diff)
downloadmariadb-git-792c9f9a4977ea428537ca34435d39bd17cec5ff.tar.gz
cleanup: get rid of dict_index_add_to_cache_w_vcol()
dict_index_add_to_cache_w_vcol(): merge with dict_index_add_to_cache()
-rw-r--r--storage/innobase/dict/dict0crea.cc6
-rw-r--r--storage/innobase/dict/dict0dict.cc30
-rw-r--r--storage/innobase/include/dict0dict.h27
3 files changed, 13 insertions, 50 deletions
diff --git a/storage/innobase/dict/dict0crea.cc b/storage/innobase/dict/dict0crea.cc
index 86038a3710a..d277b593a9c 100644
--- a/storage/innobase/dict/dict0crea.cc
+++ b/storage/innobase/dict/dict0crea.cc
@@ -1476,9 +1476,9 @@ dict_create_index_step(
index_id_t index_id = node->index->id;
- err = dict_index_add_to_cache_w_vcol(
- node->table, node->index, node->add_v, FIL_NULL,
- trx_is_strict(trx));
+ err = dict_index_add_to_cache(
+ node->table, node->index, FIL_NULL,
+ trx_is_strict(trx), node->add_v);
node->index = dict_index_get_if_in_cache_low(index_id);
ut_a((node->index == NULL) == (err != DB_SUCCESS));
diff --git a/storage/innobase/dict/dict0dict.cc b/storage/innobase/dict/dict0dict.cc
index 58c9cfb3178..08afaddcf8b 100644
--- a/storage/innobase/dict/dict0dict.cc
+++ b/storage/innobase/dict/dict0dict.cc
@@ -2306,26 +2306,6 @@ add_field_size:
return false;
}
-/** Adds an index to the dictionary cache.
-@param[in,out] table table on which the index is
-@param[in,out] index index; NOTE! The index memory
- object is freed in this function!
-@param[in] page_no root page number of the index
-@param[in] strict TRUE=refuse to create the index
- if records could be too big to fit in
- an B-tree page
-@return DB_SUCCESS, DB_TOO_BIG_RECORD, or DB_CORRUPTION */
-dberr_t
-dict_index_add_to_cache(
- dict_table_t* table,
- dict_index_t* index,
- ulint page_no,
- ibool strict)
-{
- return(dict_index_add_to_cache_w_vcol(
- table, index, NULL, page_no, strict));
-}
-
/** Clears the virtual column's index list before index is
being freed.
@param[in] index Index being freed */
@@ -2369,20 +2349,20 @@ added column.
@param[in,out] table table on which the index is
@param[in,out] index index; NOTE! The index memory
object is freed in this function!
-@param[in] add_v new virtual column that being added along with
- an add index call
@param[in] page_no root page number of the index
@param[in] strict TRUE=refuse to create the index
if records could be too big to fit in
an B-tree page
+@param[in] add_v new virtual column that being added along with
+ an add index call
@return DB_SUCCESS, DB_TOO_BIG_RECORD, or DB_CORRUPTION */
dberr_t
-dict_index_add_to_cache_w_vcol(
+dict_index_add_to_cache(
dict_table_t* table,
dict_index_t* index,
- const dict_add_v_col_t* add_v,
ulint page_no,
- ibool strict)
+ ibool strict,
+ const dict_add_v_col_t* add_v)
{
dict_index_t* new_index;
ulint n_ord;
diff --git a/storage/innobase/include/dict0dict.h b/storage/innobase/include/dict0dict.h
index cddbb0033e8..52ce261a521 100644
--- a/storage/innobase/include/dict0dict.h
+++ b/storage/innobase/include/dict0dict.h
@@ -1087,23 +1087,6 @@ dict_make_room_in_cache(
#define BIG_ROW_SIZE 1024
-/** Adds an index to the dictionary cache.
-@param[in] table table on which the index is
-@param[in] index index; NOTE! The index memory
- object is freed in this function!
-@param[in] page_no root page number of the index
-@param[in] strict TRUE=refuse to create the index
- if records could be too big to fit in
- an B-tree page
-@return DB_SUCCESS, DB_TOO_BIG_RECORD, or DB_CORRUPTION */
-dberr_t
-dict_index_add_to_cache(
- dict_table_t* table,
- dict_index_t* index,
- ulint page_no,
- ibool strict)
- MY_ATTRIBUTE((warn_unused_result));
-
/** Clears the virtual column's index list before index is being freed.
@param[in] index Index being freed */
void
@@ -1115,20 +1098,20 @@ added column.
@param[in] table table on which the index is
@param[in] index index; NOTE! The index memory
object is freed in this function!
-@param[in] add_v new virtual column that being added along with
- an add index call
@param[in] page_no root page number of the index
@param[in] strict TRUE=refuse to create the index
if records could be too big to fit in
an B-tree page
+@param[in] add_v new virtual column that being added along with
+ an add index call
@return DB_SUCCESS, DB_TOO_BIG_RECORD, or DB_CORRUPTION */
dberr_t
-dict_index_add_to_cache_w_vcol(
+dict_index_add_to_cache(
dict_table_t* table,
dict_index_t* index,
- const dict_add_v_col_t* add_v,
ulint page_no,
- ibool strict)
+ ibool strict,
+ const dict_add_v_col_t* add_v=NULL)
MY_ATTRIBUTE((warn_unused_result));
/********************************************************************//**
Gets the number of fields in the internal representation of an index,