[Groonga-mysql-commit] mroonga/mroonga at eebf452 [master] Define MRN_HAVE_GET_TABLE_DEF_KEY and use it

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Aug 26 18:03:34 JST 2013


Kouhei Sutou	2013-08-26 18:03:34 +0900 (Mon, 26 Aug 2013)

  New Revision: eebf452e720c82ff8328f50827521e31e9596e56
  https://github.com/mroonga/mroonga/commit/eebf452e720c82ff8328f50827521e31e9596e56

  Message:
    Define MRN_HAVE_GET_TABLE_DEF_KEY and use it

  Modified files:
    mrn_mysql_compat.h
    mrn_table.cpp

  Modified: mrn_mysql_compat.h (+4 -0)
===================================================================
--- mrn_mysql_compat.h    2013-08-26 17:56:30 +0900 (b802aac)
+++ mrn_mysql_compat.h    2013-08-26 18:03:34 +0900 (d426f43)
@@ -110,4 +110,8 @@
 #  define MRN_HAVE_ALTER_INFO
 #endif
 
+#if MYSQL_VERSION_ID >= 50603
+#  define MRN_HAVE_GET_TABLE_DEF_KEY
+#endif
+
 #endif /* MRN_MYSQL_COMPAT_H_ */

  Modified: mrn_table.cpp (+4 -7)
===================================================================
--- mrn_table.cpp    2013-08-26 17:56:30 +0900 (1bd9e3a)
+++ mrn_table.cpp    2013-08-26 18:03:34 +0900 (a65dd05)
@@ -921,7 +921,7 @@ TABLE_SHARE *mrn_get_table_share(TABLE_LIST *table_list, int *error)
   TABLE_SHARE *share;
   THD *thd = current_thd;
   MRN_DBUG_ENTER_FUNCTION();
-#if MYSQL_VERSION_ID >= 50603
+#ifdef MRN_HAVE_GET_TABLE_DEF_KEY
   const char *key;
   key_length = get_table_def_key(table_list, &key);
 #else
@@ -948,16 +948,13 @@ TABLE_SHARE *mrn_create_tmp_table_share(TABLE_LIST *table_list, const char *path
   uint key_length;
   TABLE_SHARE *share;
   THD *thd = current_thd;
-#if MYSQL_VERSION_ID >= 50603
-  const char *key;
-#else
-  char key[MAX_DBKEY_LENGTH];
-#endif
 
   MRN_DBUG_ENTER_FUNCTION();
-#if MYSQL_VERSION_ID >= 50603
+#ifdef MRN_HAVE_GET_TABLE_DEF_KEY
+  const char *key;
   key_length = get_table_def_key(table_list, &key);
 #else
+  char key[MAX_DBKEY_LENGTH];
   key_length = create_table_def_key(thd, key, table_list, FALSE);
 #endif
 #if MYSQL_VERSION_ID >= 100002 && defined(MRN_MARIADB_P)
-------------- next part --------------
HTML����������������������������...
Download 



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