mariadb/storage/innobase
Thirunarayanan Balathandayuthapani dfa7fe347f MDEV-28730 Remove internal parser usage from InnoDB fulltext
- Introduce a class FTSQueryRunner to handle queries for fulltext
internal tables. Basically it creates a query, prepares the
fulltext internal table for read or write process. Build a tuple
based on the given table and assign the FTS_CONFIG, FTS_COMMON_TABLES
and FTS_AUX_TABLE fields based on the given value. This class
also handles INSERT, DELETE, REPLACE, UPDATE and
execute the function for each record (record_executor).

FTSQueryRunner::create_query_thread(): Create a query thread to execute
the statement on internal FULLTEXT tables

FTSQueryRunner::build_tuple(): Build a tuple for the operation

FTSQueryRunner::build_clust_ref(): Build a clustered index reference
for clustered index lookup for the secondary index record

FTSQueryRunner::assign_config_fields(): Assign the tuple for the
FTS CONFIG internal table

FTSQueryRunner::assign_common_table_fields(): Assign the tuple for
FTS_DELETED, FTS_DELETED_CACHE, FTS_BEGIN_DELETED,
FTS_BEGIN_DELETED_CACHE common tables

FTSQueryRunner::assign_aux_table_fields(): Assign the tuple for
FTS_PREFIX_INDEX tables.

FTSQueryRunner::handle_error(): Handling error for DB_LOCK_WAIT,
retry the operation

FTSQueryRunner::open_table(): Open the table based on the fulltext
auxiliary table name and FTS common table name

FTSQueryRunner::prepare_for_write(): Lock the table for write
process by taking Intention Exclusive lock

FTSQueryRunner::prepare_for_read(): Lock the table for read
process by taking Intention Shared lock

FTSQueryRunner::write_record(): Insert the tuple into the given table

FTSQueryRunner::lock_or_sees_rec(): Lock the record in case of
DELETE, SELECT_UPDATE operation. Fetch the correct version of record in
case of READ operation. It also does clustered index lookup in case
of search is on secondary index

fts_cmp_rec_dtuple_prefix(): Compare the record with given tuple field
for tuple field length

FTSQueryRunner::record_executor(): Read the record of the given index and
do call the callback function for each record

FTSQueryRunner::build_update_config(): Build the update vector for
FULLTEXT CONFIG table

FTSQueryRunner::update_record(): Update the record with update vector
exist in FTSQueryRunner

Removed the fts_parse_sql(), fts_eval_sql(), fts_get_select_columns_str()
and fts_get_docs_clear().

Moved fts_get_table_id() & fts_get_table_name() from fts0sql.cc to
fts0fts.cc and deleted the file fts0sql.cc

Removed ins_graph, sel_graph from fts_index_cache_t

Changed the callback function default read function parameter for
each clustered index record to

bool fts_sql_callback(dict_index_t*, const rec_t *, const rec_offs*,
                      void *);

Following parameters are changed to default read function parameter:

fts_read_stopword()
fts_fetch_store_doc_id()
fts_query_expansion_fetch_doc()
fts_read_count()
fts_get_rows_count()
fts_init_doc_id()
fts_init_recover_doc()
read_fts_config()
fts_optimize_read_node()
fts_optimize_index_fetch_node()
fts_index_fetch_nodes()
fts_fetch_index_words()
fts_index_fetch_words()
fts_fetch_doc_ids()
fts_table_fetch_doc_ids()
fts_read_ulint()
fts_copy_doc_ids()
fts_optimize_create_deleted_doc_id_snapshot()
fts_query_index_fetch_nodes()
fts_query_fetch_document()
fts_query_index_fetch_nodes()

row_upd_clust_rec_low(): Function does updates a clustered
index record of a row when ordering fields don't change.
Function doesn't have dependency on row_prebuilt_t. This can be
used by fulltext internal table update operation

Row_sel_get_clust_rec_for_mysql::operator(): Removed the
parameter row_prebuilt_t and caller does pass the prebuilt
related variables

Removed the parser usage and execute the query directly on
fulltext internal tables in the following function:

fts_read_stopword()
fts_fetch_store_doc_id()
fts_query_expansion_fetch_doc()
fts_read_count()
fts_get_rows_count()
fts_init_doc_id()
fts_init_recover_doc()
read_fts_config()
fts_optimize_read_node()
fts_optimize_index_fetch_node()
fts_index_fetch_nodes()
fts_fetch_index_words()
fts_index_fetch_words()
fts_fetch_doc_ids()
fts_table_fetch_doc_ids()
fts_read_ulint()
fts_copy_doc_ids()
fts_optimize_create_deleted_doc_id_snapshot()
fts_query_index_fetch_nodes()
fts_query_fetch_document()
fts_query_index_fetch_nodes()
i_s_fts_deleted_generic_fill()
i_s_fts_index_table_fill_selected()
2025-05-26 16:35:18 +05:30
..
btr Merge 11.4 into 11.8 2025-04-02 14:07:01 +03:00
buf Merge 11.4 into 11.8 2025-04-02 14:07:01 +03:00
data MDEV-35049: Use CRC-32C and avoid allocating heap 2025-01-10 16:39:44 +02:00
dict Merge 11.4 into 11.8 2025-04-02 14:07:01 +03:00
eval MDEV-26938 Support descending indexes internally in InnoDB 2022-01-26 18:43:05 +01:00
fil Merge branch '11.7' into 11.8 2025-02-11 20:29:43 +01:00
fsp Merge 11.4 into 11.8 2025-03-05 20:39:47 +02:00
fts MDEV-28730 Remove internal parser usage from InnoDB fulltext 2025-05-26 16:35:18 +05:30
fut Merge 10.11 into 11.4 2024-12-02 11:35:34 +02:00
gis Merge 11.4 into 11.8 2025-04-02 14:07:01 +03:00
ha MDEV-35472 Server crash in ha_storage_put_memlim upon reading from INNODB_LOCKS 2024-11-25 10:31:57 +02:00
handler MDEV-28730 Remove internal parser usage from InnoDB fulltext 2025-05-26 16:35:18 +05:30
ibuf MDEV-29445: Reimplement SET GLOBAL innodb_buffer_pool_size 2025-03-26 17:05:44 +02:00
include MDEV-28730 Remove internal parser usage from InnoDB fulltext 2025-05-26 16:35:18 +05:30
lock Merge 10.11 into 11.4 2025-03-28 13:55:21 +02:00
log Merge 11.4 into 11.8 2025-04-02 14:07:01 +03:00
mem MDEV-35049: btr_search_check_free_space_in_heap() is a bottleneck 2025-01-10 16:30:42 +02:00
mtr Merge 11.4 into 11.8 2025-04-02 14:07:01 +03:00
mysql-test/storage_engine Remove dates from all rdiff files 2025-01-05 16:40:11 +02:00
os Merge 11.4 into 11.8 2025-04-02 14:07:01 +03:00
page MDEV-35849: index records in a wrong order 2025-01-15 07:31:33 +02:00
pars Merge 11.4 into 11.8 2025-03-05 20:39:47 +02:00
que MDEV-24035 Failing assertion: UT_LIST_GET_LEN(lock.trx_locks) == 0 causing disruption and replication failure 2024-12-12 18:02:00 +02:00
read MDEV-34515: Contention between purge and workload 2024-08-26 12:23:06 +03:00
rem MDEV-35049: Use CRC-32C and avoid allocating heap 2025-01-10 16:39:44 +02:00
row MDEV-28730 Remove internal parser usage from InnoDB fulltext 2025-05-26 16:35:18 +05:30
srv Merge 11.4 into 11.8 2025-04-02 14:07:01 +03:00
sync Merge 10.6 into 10.11 2024-10-03 10:55:08 +03:00
trx Merge 11.4 into 11.8 2025-04-02 14:07:01 +03:00
unittest Merge 11.4 into 11.8 2025-04-02 14:07:01 +03:00
ut Merge 10.6 into 10.11 2024-12-19 15:38:53 +02:00
.clang-format-old switch off storage/innobase/.clang-format: InnoDB uses a common formatting style for all new code 2021-03-17 11:01:15 +03:00
CMakeLists.txt MDEV-28730 Remove internal parser usage from InnoDB fulltext 2025-05-26 16:35:18 +05:30
COPYING.Google
COPYING.Percona