Skip to content

Commit aa4e8df

Browse files
committed
fts_fetch_doc_from_rec(): Remove redundant variables
1 parent c4ec6bb commit aa4e8df

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

storage/innobase/fts/fts0fts.cc

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3243,35 +3243,26 @@ fts_fetch_doc_from_rec(
32433243
documents */
32443244
{
32453245
dict_index_t* index;
3246-
dict_table_t* table;
32473246
const rec_t* clust_rec;
3248-
ulint num_field;
32493247
const dict_field_t* ifield;
3250-
const dict_col_t* col;
32513248
ulint clust_pos;
3252-
ulint i;
32533249
ulint doc_len = 0;
3254-
ulint processed_doc = 0;
32553250
st_mysql_ftparser* parser;
32563251

32573252
if (!get_doc) {
32583253
return;
32593254
}
32603255

32613256
index = get_doc->index_cache->index;
3262-
table = get_doc->index_cache->index->table;
32633257
parser = get_doc->index_cache->index->parser;
32643258

32653259
clust_rec = btr_pcur_get_rec(pcur);
32663260
ut_ad(!page_rec_is_comp(clust_rec)
32673261
|| rec_get_status(clust_rec) == REC_STATUS_ORDINARY);
32683262

3269-
num_field = dict_index_get_n_fields(index);
3270-
3271-
for (i = 0; i < num_field; i++) {
3263+
for (ulint i = 0; i < index->n_fields; i++) {
32723264
ifield = dict_index_get_nth_field(index, i);
3273-
col = dict_field_get_col(ifield);
3274-
clust_pos = dict_col_get_clust_pos(col, clust_index);
3265+
clust_pos = dict_col_get_clust_pos(ifield->col, clust_index);
32753266

32763267
if (!get_doc->index_cache->charset) {
32773268
get_doc->index_cache->charset = fts_get_charset(
@@ -3300,13 +3291,12 @@ fts_fetch_doc_from_rec(
33003291
continue;
33013292
}
33023293

3303-
if (processed_doc == 0) {
3294+
if (!doc_len) {
33043295
fts_tokenize_document(doc, NULL, parser);
33053296
} else {
33063297
fts_tokenize_document_next(doc, doc_len, NULL, parser);
33073298
}
33083299

3309-
processed_doc++;
33103300
doc_len += doc->text.f_len + 1;
33113301
}
33123302
}

0 commit comments

Comments
 (0)