diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-12-28 09:45:35 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-12-28 09:45:35 +0200 |
commit | aa4e8dfdf9fb7b4cd516957c5171fa27bdd8d65f (patch) | |
tree | 8943eba0dbdc3860aa08b295563d66815018e31f | |
parent | c4ec6bb69ec2358d463b4b09c7c258e6c7ab47a0 (diff) | |
download | mariadb-git-aa4e8dfdf9fb7b4cd516957c5171fa27bdd8d65f.tar.gz |
fts_fetch_doc_from_rec(): Remove redundant variables
-rw-r--r-- | storage/innobase/fts/fts0fts.cc | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/storage/innobase/fts/fts0fts.cc b/storage/innobase/fts/fts0fts.cc index 598a4e4843e..d5ce2f30ab4 100644 --- a/storage/innobase/fts/fts0fts.cc +++ b/storage/innobase/fts/fts0fts.cc @@ -3243,15 +3243,10 @@ fts_fetch_doc_from_rec( documents */ { dict_index_t* index; - dict_table_t* table; const rec_t* clust_rec; - ulint num_field; const dict_field_t* ifield; - const dict_col_t* col; ulint clust_pos; - ulint i; ulint doc_len = 0; - ulint processed_doc = 0; st_mysql_ftparser* parser; if (!get_doc) { @@ -3259,19 +3254,15 @@ fts_fetch_doc_from_rec( } index = get_doc->index_cache->index; - table = get_doc->index_cache->index->table; parser = get_doc->index_cache->index->parser; clust_rec = btr_pcur_get_rec(pcur); ut_ad(!page_rec_is_comp(clust_rec) || rec_get_status(clust_rec) == REC_STATUS_ORDINARY); - num_field = dict_index_get_n_fields(index); - - for (i = 0; i < num_field; i++) { + for (ulint i = 0; i < index->n_fields; i++) { ifield = dict_index_get_nth_field(index, i); - col = dict_field_get_col(ifield); - clust_pos = dict_col_get_clust_pos(col, clust_index); + clust_pos = dict_col_get_clust_pos(ifield->col, clust_index); if (!get_doc->index_cache->charset) { get_doc->index_cache->charset = fts_get_charset( @@ -3300,13 +3291,12 @@ fts_fetch_doc_from_rec( continue; } - if (processed_doc == 0) { + if (!doc_len) { fts_tokenize_document(doc, NULL, parser); } else { fts_tokenize_document_next(doc, doc_len, NULL, parser); } - processed_doc++; doc_len += doc->text.f_len + 1; } } |