Navigation Menu

Skip to content

Commit

Permalink
Fix build error on MySQL 5.6.36 and MySQL 5.7.18
Browse files Browse the repository at this point in the history
The member of Fileld::part_of_key_not_clustered is removed.

  .Tpo -c ha_mroonga.cpp  -fPIC -DPIC -o .libs/ha_mroonga_la-ha_mroonga.o
  ==> centos-6-x86_64: ha_mroonga.cpp: In member function 'void ha_mroonga::wrapper_overwrite_index_bits()':
  ==> centos-6-x86_64: ha_mroonga.cpp:4290: error: 'class Field' has no member named 'part_of_key_not_clustered'
  ==> centos-6-x86_64: ha_mroonga.cpp:4306: error: 'class Field' has no member named 'part_of_key_not_clustered'
  ==> centos-6-x86_64: make[2]: *** [ha_mroonga_la-ha_mroonga.lo] Error 1
  ==> centos-6-x86_64: make[2]: *** Waiting for unfinished jobs....
  ==> centos-6-x86_64: mv -f .deps/ha_mroonga_la-mrn_table.Tpo .
  • Loading branch information
kenhys committed Apr 13, 2017
1 parent a71b51d commit 4afbace
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ha_mroonga.cpp
Expand Up @@ -4287,7 +4287,9 @@ void ha_mroonga::wrapper_overwrite_index_bits()
{
Field *field = table_share->field[i];
field->part_of_key.clear_all();
#ifdef MRN_HAVE_MYSQL_FIELD_PART_OF_KEY_NOT_CLUSTERED
field->part_of_key_not_clustered.clear_all();
#endif
field->part_of_sortkey.clear_all();
}
for (i = 0; i < table_share->keys; i++) {
Expand All @@ -4303,7 +4305,9 @@ void ha_mroonga::wrapper_overwrite_index_bits()
{
table_share->keys_for_keyread.set_bit(i);
field->part_of_key.set_bit(i);
#ifdef MRN_HAVE_MYSQL_FIELD_PART_OF_KEY_NOT_CLUSTERED
field->part_of_key_not_clustered.set_bit(i);
#endif
}
if (index_flags(i, j, 1) & HA_READ_ORDER)
field->part_of_sortkey.set_bit(i);
Expand Down
5 changes: 5 additions & 0 deletions mrn_mysql_compat.h
Expand Up @@ -351,4 +351,9 @@
(c == FN_LIBCHAR || c == FN_LIBCHAR2)
#endif

#if ((MYSQL_VERSION_ID < 50636) || \
(MYSQL_VERSION_ID >= 50700 && MYSQL_VERSION_ID < 50718)) && !defined(MRN_MARIADB_P)
# define MRN_HAVE_MYSQL_FIELD_PART_OF_KEY_NOT_CLUSTERED
#endif

#endif /* MRN_MYSQL_COMPAT_H_ */

0 comments on commit 4afbace

Please sign in to comment.