Kouhei Sutou
null+****@clear*****
Tue Oct 8 17:21:44 JST 2013
Kouhei Sutou 2013-10-08 17:21:44 +0900 (Tue, 08 Oct 2013) New Revision: 5ef5c1d585b0f69adb7c1e0523083ab86fcbd9fe https://github.com/mroonga/mroonga/commit/5ef5c1d585b0f69adb7c1e0523083ab86fcbd9fe Message: Fix build error on MySQL TABLE_SHARE.LOCK_share is defined in only MariaDB. Modified files: mrn_mysql_compat.h mrn_table.cpp Modified: mrn_mysql_compat.h (+4 -0) =================================================================== --- mrn_mysql_compat.h 2013-10-08 17:04:15 +0900 (23321ce) +++ mrn_mysql_compat.h 2013-10-08 17:21:44 +0900 (620f9c2) @@ -114,4 +114,8 @@ # define MRN_HAVE_GET_TABLE_DEF_KEY #endif +#if defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 100004 +# define MRN_TABLE_SHARE_HAVE_LOCK_SHARE +#endif + #endif /* MRN_MYSQL_COMPAT_H_ */ Modified: mrn_table.cpp (+4 -0) =================================================================== --- mrn_table.cpp 2013-10-08 17:04:15 +0900 (c1b5f14) +++ mrn_table.cpp 2013-10-08 17:21:44 +0900 (867b560) @@ -864,8 +864,10 @@ MRN_SHARE *mrn_get_share(const char *table_name, TABLE *table, int *error) wrap_table_share->primary_key = share->wrap_primary_key; wrap_table_share->keys_in_use.init(share->wrap_keys); wrap_table_share->keys_for_keyread.init(share->wrap_keys); +#ifdef MRN_TABLE_SHARE_HAVE_LOCK_SHARE mysql_mutex_init(key_TABLE_SHARE_LOCK_share, &(wrap_table_share->LOCK_share), MY_MUTEX_INIT_SLOW); +#endif mysql_mutex_init(key_TABLE_SHARE_LOCK_ha_data, &(wrap_table_share->LOCK_ha_data), MY_MUTEX_INIT_FAST); share->wrap_table_share = wrap_table_share; @@ -915,7 +917,9 @@ int mrn_free_share(MRN_SHARE *share) thr_lock_delete(&share->lock); pthread_mutex_destroy(&share->mutex); if (share->wrapper_mode) { +#ifdef MRN_TABLE_SHARE_HAVE_LOCK_SHARE mysql_mutex_destroy(&(share->wrap_table_share->LOCK_share)); +#endif mysql_mutex_destroy(&(share->wrap_table_share->LOCK_ha_data)); } my_free(share, MYF(0)); -------------- next part -------------- HTML����������������������������... Descargar