[Groonga-mysql-commit] mroonga/mroonga at 263d229 [master] Check existence of key_TABLE_SHARE_LOCK_ha_data

Back to archive index

HAYASHI Kentaro null+****@clear*****
Wed Oct 23 11:01:52 JST 2013


HAYASHI Kentaro	2013-10-23 11:01:52 +0900 (Wed, 23 Oct 2013)

  New Revision: 263d229fd320b2379a4639d3d6fc9b5c6914acda
  https://github.com/mroonga/mroonga/commit/263d229fd320b2379a4639d3d6fc9b5c6914acda

  Message:
    Check existence of key_TABLE_SHARE_LOCK_ha_data
    
    It affects Debian squeeze/lucid and CentOS 6
    because MySQL 5.1.x series which lacks that variable are adopted.

  Modified files:
    mrn_mysql_compat.h
    mrn_table.cpp

  Modified: mrn_mysql_compat.h (+4 -0)
===================================================================
--- mrn_mysql_compat.h    2013-10-23 10:05:03 +0900 (620f9c2)
+++ mrn_mysql_compat.h    2013-10-23 11:01:52 +0900 (38ca308)
@@ -118,4 +118,8 @@
 #  define MRN_TABLE_SHARE_HAVE_LOCK_SHARE
 #endif
 
+#if MYSQL_VERSION_ID >= 50404
+#  define MRN_TABLE_SHARE_HAVE_LOCK_HA_DATA
+#endif
+
 #endif /* MRN_MYSQL_COMPAT_H_ */

  Modified: mrn_table.cpp (+4 -0)
===================================================================
--- mrn_table.cpp    2013-10-23 10:05:03 +0900 (867b560)
+++ mrn_table.cpp    2013-10-23 11:01:52 +0900 (751f77c)
@@ -868,8 +868,10 @@ MRN_SHARE *mrn_get_share(const char *table_name, TABLE *table, int *error)
       mysql_mutex_init(key_TABLE_SHARE_LOCK_share,
                        &(wrap_table_share->LOCK_share), MY_MUTEX_INIT_SLOW);
 #endif
+#ifdef MRN_TABLE_SHARE_HAVE_LOCK_HA_DATA
       mysql_mutex_init(key_TABLE_SHARE_LOCK_ha_data,
                        &(wrap_table_share->LOCK_ha_data), MY_MUTEX_INIT_FAST);
+#endif
       share->wrap_table_share = wrap_table_share;
     }
 
@@ -920,7 +922,9 @@ int mrn_free_share(MRN_SHARE *share)
 #ifdef MRN_TABLE_SHARE_HAVE_LOCK_SHARE
       mysql_mutex_destroy(&(share->wrap_table_share->LOCK_share));
 #endif
+#ifdef MRN_TABLE_SHARE_HAVE_LOCK_HA_DATA
       mysql_mutex_destroy(&(share->wrap_table_share->LOCK_ha_data));
+#endif
     }
     my_free(share, MYF(0));
   }
-------------- next part --------------
HTML����������������������������...
下載 



More information about the Groonga-mysql-commit mailing list
Back to archive index