[Groonga-mysql-commit] mroonga/mroonga at e2962bb [master] mariadb10.2: buildable

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Dec 28 11:16:14 JST 2016


Kouhei Sutou	2016-12-28 11:16:14 +0900 (Wed, 28 Dec 2016)

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

  Message:
    mariadb10.2: buildable
    
    FOREGIN_KEY_INFO::update_method and ::delete_method uses enum instead of
    LEX_STRING.

  Modified files:
    ha_mroonga.cpp
    ha_mroonga.hpp

  Modified: ha_mroonga.cpp (+5 -0)
===================================================================
--- ha_mroonga.cpp    2016-12-28 11:11:52 +0900 (5f493ae)
+++ ha_mroonga.cpp    2016-12-28 11:16:14 +0900 (4ad1555)
@@ -16580,10 +16580,15 @@ int ha_mroonga::storage_get_foreign_key_list(THD *thd,
                                                        ref_table_buff,
                                                        ref_table_name_length,
                                                        TRUE);
+#ifdef MRN_FOREIGN_KEY_USE_METHOD_ENUM
+    f_key_info.update_method = FK_OPTION_RESTRICT;
+    f_key_info.delete_method = FK_OPTION_RESTRICT;
+#else
     f_key_info.update_method = thd_make_lex_string(thd, NULL, "RESTRICT",
                                                     8, TRUE);
     f_key_info.delete_method = thd_make_lex_string(thd, NULL, "RESTRICT",
                                                     8, TRUE);
+#endif
     f_key_info.referenced_key_name = thd_make_lex_string(thd, NULL, "PRIMARY",
                                                           7, TRUE);
     LEX_STRING *field_name = thd_make_lex_string(thd, NULL, column_name,

  Modified: ha_mroonga.hpp (+4 -0)
===================================================================
--- ha_mroonga.hpp    2016-12-28 11:11:52 +0900 (8556dc1)
+++ ha_mroonga.hpp    2016-12-28 11:16:14 +0900 (4f5ceaf)
@@ -198,6 +198,10 @@ extern "C" {
 #  define MRN_FOREIGN_KEY_USE_CONST_STRING
 #endif
 
+#if MYSQL_VERSION_ID >= 100203 && defined(MRN_MARIADB_P)
+#  define MRN_FOREIGN_KEY_USE_METHOD_ENUM
+#endif
+
 #if MYSQL_VERSION_ID < 50706 || defined(MRN_MARIADB_P)
 #  define MRN_HANDLER_IS_FATAL_ERROR_HAVE_FLAGS
 #endif
-------------- next part --------------
HTML����������������������������...
下載 



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