@ -1,7 +1,7 @@
/*****************************************************************************
Copyright ( c ) 2007 , 2018 , Oracle and / or its affiliates . All Rights Reserved .
Copyright ( c ) 2016 , 2020 , MariaDB Corporation .
Copyright ( c ) 2016 , 2021 , MariaDB Corporation .
This program is free software ; you can redistribute it and / or modify it under
the terms of the GNU General Public License as published by the Free Software
@ -492,7 +492,7 @@ fts_index_fetch_nodes(
fts_get_table_name ( fts_table , table_name ) ;
pars_info_bind_id ( info , true , " table_name " , table_name ) ;
pars_info_bind_id ( info , " table_name " , table_name ) ;
}
pars_info_bind_function ( info , " my_func " , fetch - > read_record , fetch ) ;
@ -821,7 +821,7 @@ fts_index_fetch_words(
info , " word " , word - > f_str , word - > f_len ) ;
fts_get_table_name ( & optim - > fts_index_table , table_name ) ;
pars_info_bind_id ( info , true , " table_name " , table_name ) ;
pars_info_bind_id ( info , " table_name " , table_name ) ;
graph = fts_parse_sql (
& optim - > fts_index_table ,
@ -977,7 +977,7 @@ fts_table_fetch_doc_ids(
pars_info_bind_function ( info , " my_func " , fts_fetch_doc_ids , doc_ids ) ;
fts_get_table_name ( fts_table , table_name ) ;
pars_info_bind_id ( info , true , " table_name " , table_name ) ;
pars_info_bind_id ( info , " table_name " , table_name ) ;
graph = fts_parse_sql (
fts_table ,
@ -1441,7 +1441,7 @@ fts_optimize_write_word(
fts_table - > suffix = fts_get_suffix ( selected ) ;
fts_get_table_name ( fts_table , table_name ) ;
pars_info_bind_id ( info , true , " table_name " , table_name ) ;
pars_info_bind_id ( info , " table_name " , table_name ) ;
graph = fts_parse_sql (
fts_table ,
@ -2032,11 +2032,11 @@ fts_optimize_purge_deleted_doc_ids(
used in the fts_delete_doc_ids_sql */
optim - > fts_common_table . suffix = fts_common_tables [ 3 ] ;
fts_get_table_name ( & optim - > fts_common_table , deleted ) ;
pars_info_bind_id ( info , true , fts_common_tables [ 3 ] , deleted ) ;
pars_info_bind_id ( info , fts_common_tables [ 3 ] , deleted ) ;
optim - > fts_common_table . suffix = fts_common_tables [ 4 ] ;
fts_get_table_name ( & optim - > fts_common_table , deleted_cache ) ;
pars_info_bind_id ( info , true , fts_common_tables [ 4 ] , deleted_cache ) ;
pars_info_bind_id ( info , fts_common_tables [ 4 ] , deleted_cache ) ;
graph = fts_parse_sql ( NULL , info , fts_delete_doc_ids_sql ) ;
@ -2089,12 +2089,11 @@ fts_optimize_purge_deleted_doc_id_snapshot(
used in the fts_end_delete_sql */
optim - > fts_common_table . suffix = fts_common_tables [ 0 ] ;
fts_get_table_name ( & optim - > fts_common_table , being_deleted ) ;
pars_info_bind_id ( info , true , fts_common_tables [ 0 ] , being_deleted ) ;
pars_info_bind_id ( info , fts_common_tables [ 0 ] , being_deleted ) ;
optim - > fts_common_table . suffix = fts_common_tables [ 1 ] ;
fts_get_table_name ( & optim - > fts_common_table , being_deleted_cache ) ;
pars_info_bind_id ( info , true , fts_common_tables [ 1 ] ,
being_deleted_cache ) ;
pars_info_bind_id ( info , fts_common_tables [ 1 ] , being_deleted_cache ) ;
/* Delete the doc ids that were copied to delete pending state at
the start of optimize . */
@ -2150,20 +2149,19 @@ fts_optimize_create_deleted_doc_id_snapshot(
used in the fts_init_delete_sql */
optim - > fts_common_table . suffix = fts_common_tables [ 0 ] ;
fts_get_table_name ( & optim - > fts_common_table , being_deleted ) ;
pars_info_bind_id ( info , true , fts_common_tables [ 0 ] , being_deleted ) ;
pars_info_bind_id ( info , fts_common_tables [ 0 ] , being_deleted ) ;
optim - > fts_common_table . suffix = fts_common_tables [ 3 ] ;
fts_get_table_name ( & optim - > fts_common_table , deleted ) ;
pars_info_bind_id ( info , true , fts_common_tables [ 3 ] , deleted ) ;
pars_info_bind_id ( info , fts_common_tables [ 3 ] , deleted ) ;
optim - > fts_common_table . suffix = fts_common_tables [ 1 ] ;
fts_get_table_name ( & optim - > fts_common_table , being_deleted_cache ) ;
pars_info_bind_id ( info , true , fts_common_tables [ 1 ] ,
being_deleted_cache ) ;
pars_info_bind_id ( info , fts_common_tables [ 1 ] , being_deleted_cache ) ;
optim - > fts_common_table . suffix = fts_common_tables [ 4 ] ;
fts_get_table_name ( & optim - > fts_common_table , deleted_cache ) ;
pars_info_bind_id ( info , true , fts_common_tables [ 4 ] , deleted_cache ) ;
pars_info_bind_id ( info , fts_common_tables [ 4 ] , deleted_cache ) ;
/* Move doc_ids that are to be deleted to state being deleted. */
graph = fts_parse_sql ( NULL , info , fts_init_delete_sql ) ;