[Groonga-mysql-commit] mroonga/mroonga at 28c0911 [master] mysql8: use ER_DEFAULT()

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Jul 9 17:09:58 JST 2018


Kouhei Sutou	2018-07-09 17:09:58 +0900 (Mon, 09 Jul 2018)

  New Revision: 28c09119736ba4a7bae0b78fec584abc420ebba7
  https://github.com/mroonga/mroonga/commit/28c09119736ba4a7bae0b78fec584abc420ebba7

  Message:
    mysql8: use ER_DEFAULT()

  Modified files:
    ha_mroonga.cpp
    mrn_mysql_compat.h
    mrn_table.cpp

  Modified: ha_mroonga.cpp (+0 -6)
===================================================================
--- ha_mroonga.cpp    2018-07-09 17:07:28 +0900 (6039571a)
+++ ha_mroonga.cpp    2018-07-09 17:09:58 +0900 (ed1b8295)
@@ -201,18 +201,12 @@ static mysql_mutex_t *mrn_LOCK_open;
 
 #if MYSQL_VERSION_ID >= 100007 && defined(MRN_MARIADB_P)
 #  define MRN_THD_GET_AUTOINC(thd, off, inc) thd_get_autoinc(thd, off, inc)
-#  define MRN_GET_ERR_MSG(code) my_get_err_msg(code)
 #else
 #  define MRN_THD_GET_AUTOINC(thd, off, inc) \
      { \
         *(off) = thd->variables.auto_increment_offset; \
         *(inc) = thd->variables.auto_increment_increment; \
      }
-#  if MYSQL_VERSION_ID >= 80011 && !defined(MRN_MARIADB_P)
-#    define MRN_GET_ERR_MSG(code) ER_DEFAULT(code)
-#  else
-#    define MRN_GET_ERR_MSG(code) ER(code)
-#  endif
 #endif
 
 #if MYSQL_VERSION_ID >= 50706 && !defined(MRN_MARIADB_P)

  Modified: mrn_mysql_compat.h (+10 -0)
===================================================================
--- mrn_mysql_compat.h    2018-07-09 17:07:28 +0900 (1808bce1)
+++ mrn_mysql_compat.h    2018-07-09 17:09:58 +0900 (f987336c)
@@ -708,3 +708,13 @@
 #if MYSQL_VERSION_ID >= 80011 && !defined(MARIADB_P)
 #  define MRN_OPEN_TABLE_DEF_USE_TABLE_DEFINITION
 #endif
+
+#if MYSQL_VERSION_ID >= 100007 && defined(MRN_MARIADB_P)
+#  define MRN_GET_ERR_MSG(code) my_get_err_msg(code)
+#else
+#  if MYSQL_VERSION_ID >= 80011 && !defined(MRN_MARIADB_P)
+#    define MRN_GET_ERR_MSG(code) ER_DEFAULT(code)
+#  else
+#    define MRN_GET_ERR_MSG(code) ER(code)
+#  endif
+#endif

  Modified: mrn_table.cpp (+1 -1)
===================================================================
--- mrn_table.cpp    2018-07-09 17:07:28 +0900 (6dcbcce1)
+++ mrn_table.cpp    2018-07-09 17:09:58 +0900 (1411b5c8)
@@ -615,7 +615,7 @@ int mrn_add_index_param(MRN_SHARE *share, KEY *key_info, int i)
       case 6:
         push_warning_printf(thd, MRN_SEVERITY_WARNING,
                             ER_WARN_DEPRECATED_SYNTAX,
-                            ER(ER_WARN_DEPRECATED_SYNTAX),
+                            MRN_GET_ERR_MSG(ER_WARN_DEPRECATED_SYNTAX),
                             "parser", "tokenizer");
         MRN_PARAM_STR_LIST("parser", key_tokenizer, i);
         break;
-------------- next part --------------
HTML����������������������������...
URL: https://lists.osdn.me/mailman/archives/groonga-mysql-commit/attachments/20180709/293da886/attachment-0001.htm 



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