WL#9530: InnoDB_New_DD: FTS index support for newDD

Affects: Server-8.0   —   Status: Complete   —   Priority: Medium

The unique aspect of supporting FTS index for newDD is related to the "hidden
aux index tables". These tables are created by "create fulltext index"
operation, and will be deleted along with "drop index".

While these aux tables are normally "hidden" from user, they will have their own
entries in DD system tables. And in the future, they could be "selectable" so
the index content can be dumped for diagnostic or other purposes (and also
replace the information_schema.innodb_ft_* tables).

1) Create fulltext index can be successfully performed, and all existing FTS
tests would pass.

2) Other DDLs, including drop index, alter table with fulltext index could be
performed successfully

3) Select for information_schema.innodb_ft_* would still be successfully performed.
The key work for this WL is to create the aux table during create fulltext index
time. It should use the same DD API methods which SQL-layer uses to create such
tables' DD objects, and reflect back to server layer.

Create DD table space object as needed. If the parent table uses shared table 
space, the aux tables should use the same shared table space; If it uses 
standalone table space, the aux tables should standalone table space.

Change fts aux table name to lower-case. e.g. FTS_00000000000000da_BEING_DELETED
 to fts_00000000000000da_being_deleted. Because when lower_case_table_names is 
set to 2, the key in server table cache is based on lower-case name.
1. Create fts index table object

Note: Acquire MDL lock on fts common table.

2. Create fts common table object

Note: Acquire MDL lock on fts common table.

3. Create table space object if needed.

4. Drop fts dd table object

Note: Acquire MDL lock on fts common table.

5. Rename fts dd table object

Note: only needed for database change.

6. Avoid re-enter dict_sys->mutex and re-acquire dict_operation_lock
Comment row_mysql_freeze_data_dictionary() and 
row_mysql_unfreeze_data_dictionary() in row_upd_index_is_referenced(), 
row_upd_check_references_constraints(), and