Kentaro Hayashi
null+****@clear*****
Thu Apr 13 16:57:05 JST 2017
Kentaro Hayashi 2017-04-13 16:57:05 +0900 (Thu, 13 Apr 2017) New Revision: 4afbace5f741dc2cb5a966bf1108f8fe2317ea85 https://github.com/mroonga/mroonga/commit/4afbace5f741dc2cb5a966bf1108f8fe2317ea85 Message: Fix build error on MySQL 5.6.36 and MySQL 5.7.18 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 . Modified files: ha_mroonga.cpp mrn_mysql_compat.h Modified: ha_mroonga.cpp (+4 -0) =================================================================== --- ha_mroonga.cpp 2017-04-12 13:10:04 +0900 (6e7a9d3) +++ ha_mroonga.cpp 2017-04-13 16:57:05 +0900 (9cab427) @@ -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++) { @@ -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); Modified: mrn_mysql_compat.h (+5 -0) =================================================================== --- mrn_mysql_compat.h 2017-04-12 13:10:04 +0900 (4891b67) +++ mrn_mysql_compat.h 2017-04-13 16:57:05 +0900 (65122f2) @@ -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_ */ -------------- next part -------------- HTML����������������������������...Download