diff options
Diffstat (limited to 'storage/innobase/include/dict0dict.ic')
-rw-r--r-- | storage/innobase/include/dict0dict.ic | 46 |
1 files changed, 26 insertions, 20 deletions
diff --git a/storage/innobase/include/dict0dict.ic b/storage/innobase/include/dict0dict.ic index 06cd2434942..26918251d8b 100644 --- a/storage/innobase/include/dict0dict.ic +++ b/storage/innobase/include/dict0dict.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2017, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2013, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under @@ -391,22 +391,6 @@ dict_table_get_n_user_cols( return(table->n_cols - DATA_N_SYS_COLS); } -/** Gets the number of user-defined virtual and non-virtual columns in a table -in the dictionary cache. -@param[in] table table -@return number of user-defined (e.g., not ROW_ID) columns of a table */ -UNIV_INLINE -ulint -dict_table_get_n_tot_u_cols( - const dict_table_t* table) -{ - ut_ad(table); - ut_ad(table->magic_n == DICT_TABLE_MAGIC_N); - - return(dict_table_get_n_user_cols(table) - + dict_table_get_n_v_cols(table)); -} - /********************************************************************//** Gets the number of all non-virtual columns (also system) in a table in the dictionary cache. @@ -930,6 +914,27 @@ dict_table_x_lock_indexes( } /*********************************************************************//** +Returns true if the particular FTS index in the table is still syncing +in the background, false otherwise. +@param [in] table Table containing FTS index +@return True if sync of fts index is still going in the background */ +UNIV_INLINE +bool +dict_fts_index_syncing( + dict_table_t* table) +{ + dict_index_t* index; + + for (index = dict_table_get_first_index(table); + index != NULL; + index = dict_table_get_next_index(index)) { + if (index->index_fts_syncing) { + return(true); + } + } + return(false); +} +/*********************************************************************//** Release the exclusive locks on all index tree. */ UNIV_INLINE void @@ -1536,14 +1541,15 @@ dict_table_t::acquire() ++n_ref_count; } -/** Release the table handle. */ +/** Release the table handle. +@return whether the last handle was released */ inline -void +bool dict_table_t::release() { ut_ad(mutex_own(&dict_sys->mutex)); ut_ad(n_ref_count > 0); - --n_ref_count; + return !--n_ref_count; } /** Encode the number of columns and number of virtual columns in a |