[Groonga-mysql-commit] mroonga/mroonga at 8dacdda [master] mysql 8.0.13: follow alloc_table_share() signature change

Back to archive index
Kouhei Sutou null+****@clear*****
Mon Nov 26 11:24:40 JST 2018


Kouhei Sutou	2018-11-26 11:24:40 +0900 (Mon, 26 Nov 2018)

  Revision: 8dacddac33e6054d245b40f7b9ef872f433e321a
  https://github.com/mroonga/mroonga/commit/8dacddac33e6054d245b40f7b9ef872f433e321a

  Message:
    mysql 8.0.13: follow alloc_table_share() signature change

  Modified files:
    mrn_mysql_compat.h
    mrn_table.cpp

  Modified: mrn_mysql_compat.h (+25 -0)
===================================================================
--- mrn_mysql_compat.h    2018-11-26 11:13:55 +0900 (6bcfcb21)
+++ mrn_mysql_compat.h    2018-11-26 11:24:40 +0900 (4b1e3261)
@@ -738,3 +738,28 @@ typedef HASH mrn_table_def_cache_type;
 #else
 #  define mrn_destroy(pointer) delete pointer
 #endif
+
+#if MYSQL_VERSION_ID >= 80013 && !defined(MRN_MARIADB_P)
+#  define mrn_alloc_table_share(table_list, key, key_length) \
+  alloc_table_share((table_list)->db,                        \
+                    (table_list)->table_name,                \
+                    (key),                                   \
+                    (key_length),                            \
+                    false)
+#elif MYSQL_VERSION_ID >= 100306 && defined(MRN_MARIADB_P)
+#  define mrn_alloc_table_share(table_list, key, key_length) \
+  alloc_table_share((table_list)->db.str,                    \
+                    (table_list)->table_name.str,            \
+                    (key),                                   \
+                    (key_length))
+#elif (MYSQL_VERSION_ID >= 100002 && defined(MRN_MARIADB_P)) || \
+  (MYSQL_VERSION_ID >= 80011 && !defined(MRN_MARIADB_P))
+#  define mrn_alloc_table_share(table_list, key, key_length)    \
+  alloc_table_share((table_list)->db,                           \
+                    (table_list)->table_name,                   \
+                    (key),                                      \
+                    (key_length))
+#else
+#  define mrn_alloc_table_share(table_list, key, key_length)    \
+  alloc_table_share((table_list), (key), (key_length))
+#endif

  Modified: mrn_table.cpp (+1 -14)
===================================================================
--- mrn_table.cpp    2018-11-26 11:13:55 +0900 (06e8bc64)
+++ mrn_table.cpp    2018-11-26 11:24:40 +0900 (c694b1d4)
@@ -1004,20 +1004,7 @@ TABLE_SHARE *mrn_create_tmp_table_share(TABLE_LIST *table_list,
   char key[MAX_DBKEY_LENGTH];
   key_length = create_table_def_key(thd, key, table_list, false);
 #endif
-#if MYSQL_VERSION_ID >= 100306 && defined(MRN_MARIADB_P)
-  share = alloc_table_share(table_list->db.str,
-                            table_list->table_name.str,
-                            key,
-                            key_length);
-#elif (MYSQL_VERSION_ID >= 100002 && defined(MRN_MARIADB_P)) || \
-  (MYSQL_VERSION_ID >= 80011 && !defined(MRN_MARIADB_P))
-  share = alloc_table_share(table_list->db,
-                            table_list->table_name,
-                            key,
-                            key_length);
-#else
-  share = alloc_table_share(table_list, key, key_length);
-#endif
+  share = mrn_alloc_table_share(table_list, key, key_length);
   if (!share)
   {
     *error = ER_CANT_OPEN_FILE;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.osdn.me/mailman/archives/groonga-mysql-commit/attachments/20181126/9e240e94/attachment-0001.html>


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