diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-07-02 21:38:34 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-07-02 21:40:34 +0300 |
commit | c1cb5c17beee1258c6390e132b817012a4572559 (patch) | |
tree | 396120a2b2a382ce3a6f4be6e85fba1ec71a11a4 | |
parent | 0c6514eece98d6817bdf11830244c068b17bd06b (diff) | |
download | mariadb-git-c1cb5c17beee1258c6390e132b817012a4572559.tar.gz |
MDEV-19869: Correct the logic, and avoid type mismatch
-rw-r--r-- | storage/innobase/handler/ha_innodb.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 33cf3e4e499..31601ae2930 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -9687,13 +9687,12 @@ ha_innobase::change_active_index( /* Initialization of search_tuple is not needed for FT index since FT search returns rank only. In addition engine should be able to retrieve FTS_DOC_ID column value if necessary. */ - if ((m_prebuilt->index->type & DICT_FTS)) { - - for (ulint i = 0; i < table->s->fields; i++) { + if (m_prebuilt->index->type & DICT_FTS) { + for (uint i = 0; i < table->s->fields; i++) { if (m_prebuilt->read_just_key - && bitmap_get_next_set(table->read_set, i) - && !strcmp(table->s->field[i]->field_name, - FTS_DOC_ID_COL_NAME)){ + && bitmap_is_set(table->read_set, i) + && !strcmp(table->s->field[i]->field_name.str, + FTS_DOC_ID_COL_NAME)) { m_prebuilt->fts_doc_id_in_read_set = true; break; } |