summaryrefslogtreecommitdiff
path: root/storage/innobase/dict/dict0mem.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase/dict/dict0mem.cc')
-rw-r--r--storage/innobase/dict/dict0mem.cc57
1 files changed, 28 insertions, 29 deletions
diff --git a/storage/innobase/dict/dict0mem.cc b/storage/innobase/dict/dict0mem.cc
index 5b79406fb18..96f2d7b6e3b 100644
--- a/storage/innobase/dict/dict0mem.cc
+++ b/storage/innobase/dict/dict0mem.cc
@@ -124,25 +124,17 @@ bool dict_col_t::same_encoding(uint16_t a, uint16_t b)
return false;
}
-/** Creates a table memory object.
-@param[in] name table name
-@param[in] space tablespace
-@param[in] n_cols total number of columns including virtual and
- non-virtual columns
-@param[in] n_v_cols number of virtual columns
-@param[in] flags table flags
-@param[in] flags2 table flags2
-@param[in] init_stats_latch whether to init the stats latch
+/** Create a table memory object.
+@param name table name
+@param space tablespace
+@param n_cols total number of columns (both virtual and non-virtual)
+@param n_v_cols number of virtual columns
+@param flags table flags
+@param flags2 table flags2
@return own: table object */
-dict_table_t*
-dict_mem_table_create(
- const char* name,
- fil_space_t* space,
- ulint n_cols,
- ulint n_v_cols,
- ulint flags,
- ulint flags2,
- bool init_stats_latch)
+dict_table_t *dict_mem_table_create(const char *name, fil_space_t *space,
+ ulint n_cols, ulint n_v_cols, ulint flags,
+ ulint flags2)
{
dict_table_t* table;
mem_heap_t* heap;
@@ -210,12 +202,6 @@ dict_mem_table_create(
new(&table->foreign_set) dict_foreign_set();
new(&table->referenced_set) dict_foreign_set();
- if (init_stats_latch) {
- rw_lock_create(dict_table_stats_key, &table->stats_latch,
- SYNC_INDEX_TREE);
- table->stats_latch_inited = true;
- }
-
return(table);
}
@@ -258,10 +244,6 @@ dict_mem_table_free(
UT_DELETE(table->s_cols);
- if (table->stats_latch_inited) {
- rw_lock_free(&table->stats_latch);
- }
-
mem_heap_free(table->heap);
}
@@ -440,7 +422,6 @@ dict_mem_table_add_v_col(
/* Initialize the index list for virtual columns */
ut_ad(v_col->v_indexes.empty());
- v_col->n_v_indexes = 0;
return(v_col);
}
@@ -1211,6 +1192,24 @@ operator<< (std::ostream& out, const dict_foreign_set& fk_set)
return(out);
}
+/** Check whether fulltext index gets affected by foreign
+key constraint. */
+bool dict_foreign_t::affects_fulltext() const
+{
+ if (foreign_table == referenced_table || !foreign_table->fts)
+ return false;
+
+ for (ulint i= 0; i < n_fields; i++)
+ {
+ const dict_col_t *col= dict_index_get_nth_col(foreign_index, i);
+ if (dict_table_is_fts_column(foreign_table->fts->indexes, col->ind,
+ col->is_virtual()) != ULINT_UNDEFINED)
+ return true;
+ }
+
+ return false;
+}
+
/** Reconstruct the clustered index fields. */
inline void dict_index_t::reconstruct_fields()
{