@@ -3243,35 +3243,26 @@ fts_fetch_doc_from_rec(
3243
3243
documents */
3244
3244
{
3245
3245
dict_index_t * index;
3246
- dict_table_t * table;
3247
3246
const rec_t * clust_rec;
3248
- ulint num_field;
3249
3247
const dict_field_t * ifield;
3250
- const dict_col_t * col;
3251
3248
ulint clust_pos;
3252
- ulint i;
3253
3249
ulint doc_len = 0 ;
3254
- ulint processed_doc = 0 ;
3255
3250
st_mysql_ftparser* parser;
3256
3251
3257
3252
if (!get_doc) {
3258
3253
return ;
3259
3254
}
3260
3255
3261
3256
index = get_doc->index_cache ->index ;
3262
- table = get_doc->index_cache ->index ->table ;
3263
3257
parser = get_doc->index_cache ->index ->parser ;
3264
3258
3265
3259
clust_rec = btr_pcur_get_rec (pcur);
3266
3260
ut_ad (!page_rec_is_comp (clust_rec)
3267
3261
|| rec_get_status (clust_rec) == REC_STATUS_ORDINARY);
3268
3262
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++) {
3272
3264
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);
3275
3266
3276
3267
if (!get_doc->index_cache ->charset ) {
3277
3268
get_doc->index_cache ->charset = fts_get_charset (
@@ -3300,13 +3291,12 @@ fts_fetch_doc_from_rec(
3300
3291
continue ;
3301
3292
}
3302
3293
3303
- if (processed_doc == 0 ) {
3294
+ if (!doc_len ) {
3304
3295
fts_tokenize_document (doc, NULL , parser);
3305
3296
} else {
3306
3297
fts_tokenize_document_next (doc, doc_len, NULL , parser);
3307
3298
}
3308
3299
3309
- processed_doc++;
3310
3300
doc_len += doc->text .f_len + 1 ;
3311
3301
}
3312
3302
}
0 commit comments