Commit 792c9f9a authored by Eugene Kosov's avatar Eugene Kosov

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()
parent 1552b254
...@@ -1476,9 +1476,9 @@ dict_create_index_step( ...@@ -1476,9 +1476,9 @@ dict_create_index_step(
index_id_t index_id = node->index->id; index_id_t index_id = node->index->id;
err = dict_index_add_to_cache_w_vcol( err = dict_index_add_to_cache(
node->table, node->index, node->add_v, FIL_NULL, node->table, node->index, FIL_NULL,
trx_is_strict(trx)); trx_is_strict(trx), node->add_v);
node->index = dict_index_get_if_in_cache_low(index_id); node->index = dict_index_get_if_in_cache_low(index_id);
ut_a((node->index == NULL) == (err != DB_SUCCESS)); ut_a((node->index == NULL) == (err != DB_SUCCESS));
......
...@@ -2306,26 +2306,6 @@ dict_index_t::rec_potentially_too_big(const dict_table_t* candidate_table, ...@@ -2306,26 +2306,6 @@ dict_index_t::rec_potentially_too_big(const dict_table_t* candidate_table,
return false; 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 /** Clears the virtual column's index list before index is
being freed. being freed.
@param[in] index Index being freed */ @param[in] index Index being freed */
...@@ -2369,20 +2349,20 @@ added column. ...@@ -2369,20 +2349,20 @@ added column.
@param[in,out] table table on which the index is @param[in,out] table table on which the index is
@param[in,out] index index; NOTE! The index memory @param[in,out] index index; NOTE! The index memory
object is freed in this function! 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] page_no root page number of the index
@param[in] strict TRUE=refuse to create the index @param[in] strict TRUE=refuse to create the index
if records could be too big to fit in if records could be too big to fit in
an B-tree page 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 */ @return DB_SUCCESS, DB_TOO_BIG_RECORD, or DB_CORRUPTION */
dberr_t dberr_t
dict_index_add_to_cache_w_vcol( dict_index_add_to_cache(
dict_table_t* table, dict_table_t* table,
dict_index_t* index, dict_index_t* index,
const dict_add_v_col_t* add_v,
ulint page_no, ulint page_no,
ibool strict) ibool strict,
const dict_add_v_col_t* add_v)
{ {
dict_index_t* new_index; dict_index_t* new_index;
ulint n_ord; ulint n_ord;
......
...@@ -1087,23 +1087,6 @@ dict_make_room_in_cache( ...@@ -1087,23 +1087,6 @@ dict_make_room_in_cache(
#define BIG_ROW_SIZE 1024 #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. /** Clears the virtual column's index list before index is being freed.
@param[in] index Index being freed */ @param[in] index Index being freed */
void void
...@@ -1115,20 +1098,20 @@ added column. ...@@ -1115,20 +1098,20 @@ added column.
@param[in] table table on which the index is @param[in] table table on which the index is
@param[in] index index; NOTE! The index memory @param[in] index index; NOTE! The index memory
object is freed in this function! 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] page_no root page number of the index
@param[in] strict TRUE=refuse to create the index @param[in] strict TRUE=refuse to create the index
if records could be too big to fit in if records could be too big to fit in
an B-tree page 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 */ @return DB_SUCCESS, DB_TOO_BIG_RECORD, or DB_CORRUPTION */
dberr_t dberr_t
dict_index_add_to_cache_w_vcol( dict_index_add_to_cache(
dict_table_t* table, dict_table_t* table,
dict_index_t* index, dict_index_t* index,
const dict_add_v_col_t* add_v,
ulint page_no, ulint page_no,
ibool strict) ibool strict,
const dict_add_v_col_t* add_v=NULL)
MY_ATTRIBUTE((warn_unused_result)); MY_ATTRIBUTE((warn_unused_result));
/********************************************************************//** /********************************************************************//**
Gets the number of fields in the internal representation of an index, Gets the number of fields in the internal representation of an index,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment