Commit aa4e8dfd authored by Marko Mäkelä's avatar Marko Mäkelä

fts_fetch_doc_from_rec(): Remove redundant variables

parent c4ec6bb6
...@@ -3243,15 +3243,10 @@ fts_fetch_doc_from_rec( ...@@ -3243,15 +3243,10 @@ fts_fetch_doc_from_rec(
documents */ documents */
{ {
dict_index_t* index; dict_index_t* index;
dict_table_t* table;
const rec_t* clust_rec; const rec_t* clust_rec;
ulint num_field;
const dict_field_t* ifield; const dict_field_t* ifield;
const dict_col_t* col;
ulint clust_pos; ulint clust_pos;
ulint i;
ulint doc_len = 0; ulint doc_len = 0;
ulint processed_doc = 0;
st_mysql_ftparser* parser; st_mysql_ftparser* parser;
if (!get_doc) { if (!get_doc) {
...@@ -3259,19 +3254,15 @@ fts_fetch_doc_from_rec( ...@@ -3259,19 +3254,15 @@ fts_fetch_doc_from_rec(
} }
index = get_doc->index_cache->index; index = get_doc->index_cache->index;
table = get_doc->index_cache->index->table;
parser = get_doc->index_cache->index->parser; parser = get_doc->index_cache->index->parser;
clust_rec = btr_pcur_get_rec(pcur); clust_rec = btr_pcur_get_rec(pcur);
ut_ad(!page_rec_is_comp(clust_rec) ut_ad(!page_rec_is_comp(clust_rec)
|| rec_get_status(clust_rec) == REC_STATUS_ORDINARY); || rec_get_status(clust_rec) == REC_STATUS_ORDINARY);
num_field = dict_index_get_n_fields(index); for (ulint i = 0; i < index->n_fields; i++) {
for (i = 0; i < num_field; i++) {
ifield = dict_index_get_nth_field(index, i); ifield = dict_index_get_nth_field(index, i);
col = dict_field_get_col(ifield); clust_pos = dict_col_get_clust_pos(ifield->col, clust_index);
clust_pos = dict_col_get_clust_pos(col, clust_index);
if (!get_doc->index_cache->charset) { if (!get_doc->index_cache->charset) {
get_doc->index_cache->charset = fts_get_charset( get_doc->index_cache->charset = fts_get_charset(
...@@ -3300,13 +3291,12 @@ fts_fetch_doc_from_rec( ...@@ -3300,13 +3291,12 @@ fts_fetch_doc_from_rec(
continue; continue;
} }
if (processed_doc == 0) { if (!doc_len) {
fts_tokenize_document(doc, NULL, parser); fts_tokenize_document(doc, NULL, parser);
} else { } else {
fts_tokenize_document_next(doc, doc_len, NULL, parser); fts_tokenize_document_next(doc, doc_len, NULL, parser);
} }
processed_doc++;
doc_len += doc->text.f_len + 1; doc_len += doc->text.f_len + 1;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment