[Groonga-mysql-commit] mroonga/mroonga at 6c1ae7e [master] Support old MySQL that doesn't support inplace alter table

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Apr 30 06:25:45 JST 2018


Kouhei Sutou	2018-04-30 06:25:45 +0900 (Mon, 30 Apr 2018)

  New Revision: 6c1ae7e8cb9fea22142a0114855bc64ddca813c7
  https://github.com/mroonga/mroonga/commit/6c1ae7e8cb9fea22142a0114855bc64ddca813c7

  Message:
    Support old MySQL that doesn't support inplace alter table

  Modified files:
    ha_mroonga.hpp

  Modified: ha_mroonga.hpp (+16 -9)
===================================================================
--- ha_mroonga.hpp    2018-04-29 16:02:51 +0900 (28df2063)
+++ ha_mroonga.hpp    2018-04-30 06:25:45 +0900 (76e8485b)
@@ -233,21 +233,28 @@ extern "C" {
 #  define MRN_HANDLER_HAVE_RESET_AUTO_INCREMENT
 #endif
 
-#if defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 100306
+#ifdef MRN_HANDLER_HAVE_CHECK_IF_SUPPORTED_INPLACE_ALTER
+#  if defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 100306
 typedef alter_table_operations mrn_alter_flags;
 typedef alter_table_operations mrn_alter_table_flags;
-#  define MRN_ALTER_INPLACE_INFO_FLAG(alter_inplace_info_name, name)    \
+#    define MRN_ALTER_INPLACE_INFO_FLAG(alter_inplace_info_name, name)    \
   ALTER_ ## name
-#  define MRN_ALTER_INPLACE_INFO_ALTER_FLAG(name) ALTER_ ## name
-#  define MRN_ALTER_INFO_FLAG(name) ALTER_ ## name
-#else
+#    define MRN_ALTER_INPLACE_INFO_ALTER_FLAG(name) ALTER_ ## name
+#    define MRN_ALTER_INFO_FLAG(name) ALTER_ ## name
+#  else
 typedef Alter_inplace_info::HA_ALTER_FLAGS mrn_alter_flags;
-typedef uint mrn_alter_table_flags;
-#  define MRN_ALTER_INPLACE_INFO_FLAG(alter_inplace_info_name, name)    \
+#    define MRN_ALTER_INPLACE_INFO_FLAG(alter_inplace_info_name, name)    \
   alter_inplace_info_name
-#  define MRN_ALTER_INPLACE_INFO_ALTER_FLAG(name) \
+#    define MRN_ALTER_INPLACE_INFO_ALTER_FLAG(name) \
   Alter_inplace_info::ALTER_ ## name
-#  define MRN_ALTER_INFO_FLAG(name) Alter_info::ALTER_ ## name
+#    define MRN_ALTER_INFO_FLAG(name) Alter_info::ALTER_ ## name
+#  endif
+#endif
+
+#if defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 100306
+typedef alter_table_operations mrn_alter_flags;
+#else
+typedef uint mrn_alter_table_flags;
 #endif
 
 #if (!defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 50709) ||   \
-------------- next part --------------
HTML����������������������������...
URL: https://lists.osdn.me/mailman/archives/groonga-mysql-commit/attachments/20180430/2a6fbcb1/attachment-0001.htm 



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