diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-11-06 13:01:34 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-11-06 13:01:34 +0200 |
commit | 90451a59811b415a443aab97230e694856392cb5 (patch) | |
tree | 8ea9fc387bf0241e6a3ecce79ae2d49871ce7634 /storage/innobase/include | |
parent | 8688ef22c21b810e7d5d4732a3f73035eb171879 (diff) | |
download | mariadb-git-90451a59811b415a443aab97230e694856392cb5.tar.gz |
Follow-up to 792c9f9a4977ea428537ca34435d39bd17cec5ffmariadb-10.2.29
dict_index_add_to_cache(): Make the 'index' a reference to a pointer,
so that the caller will avoid the expensive call to
dict_index_get_if_in_cache_low().
Diffstat (limited to 'storage/innobase/include')
-rw-r--r-- | storage/innobase/include/dict0dict.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/storage/innobase/include/dict0dict.h b/storage/innobase/include/dict0dict.h index 52ce261a521..bf4e4b9e289 100644 --- a/storage/innobase/include/dict0dict.h +++ b/storage/innobase/include/dict0dict.h @@ -1095,23 +1095,22 @@ dict_index_remove_from_v_col_list( /** Adds an index to the dictionary cache, with possible indexing newly added column. -@param[in] table table on which the index is -@param[in] index index; NOTE! The index memory +@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 +@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 +@param[in] add_v virtual columns being added along with ADD INDEX @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, + dict_index_t*& index, ulint page_no, - ibool strict, - const dict_add_v_col_t* add_v=NULL) + bool strict = false, + 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, |