[Groonga-mysql-commit] mroonga/mroonga at 7241426 [master] mysql8.0: follow table_def_cache type change

Back to archive index

Kouhei Sutou null+****@clear*****
Sun Apr 29 15:52:51 JST 2018


Kouhei Sutou	2018-04-29 15:52:51 +0900 (Sun, 29 Apr 2018)

  New Revision: 72414262ed98ef2a031364cee73cbcb06419d677
  https://github.com/mroonga/mroonga/commit/72414262ed98ef2a031364cee73cbcb06419d677

  Message:
    mysql8.0: follow table_def_cache type change
    
    TODO: We need more works for Windows.

  Modified files:
    ha_mroonga.cpp

  Modified: ha_mroonga.cpp (+17 -1)
===================================================================
--- ha_mroonga.cpp    2018-04-29 15:47:00 +0900 (ee0c57db)
+++ ha_mroonga.cpp    2018-04-29 15:52:51 +0900 (6058237f)
@@ -228,7 +228,19 @@ static mysql_mutex_t *mrn_LOCK_open;
 Rpl_filter *mrn_binlog_filter;
 Time_zone *mrn_my_tz_UTC;
 #ifdef MRN_HAVE_TABLE_DEF_CACHE
-HASH *mrn_table_def_cache;
+#  if MYSQL_VERSION_ID >= 80011 && !defined(MRN_MARIADB_P)
+#    define MRN_TABLE_DEF_CACHE_TYPE_IS_MAP
+#  endif
+
+#  ifdef MRN_TABLE_DEF_CACHE_TYPE_IS_MAP
+typedef
+  malloc_unordered_map<std::string,
+                       std::unique_ptr<TABLE_SHARE, Table_share_deleter>>
+  mrn_table_def_cache_type;
+#  else
+typedef HASH mrn_table_def_cache_type;
+#endif
+mrn_table_def_cache_type *mrn_table_def_cache;
 #endif
 
 #ifdef MRN_HAVE_PSI_MEMORY_KEY
@@ -2050,8 +2062,12 @@ static int mrn_init(void *p)
   mrn_my_tz_UTC =
     *((Time_zone **)GetProcAddress(current_module, MRN_MY_TZ_UTC_PROC));
 #  ifdef MRN_HAVE_TABLE_DEF_CACHE
+#    ifdef MRN_TABLE_DEF_CACHE_TYPE_IS_MAP
+#      error must confirm mangled name of mrn_table_def_cache
+#    else
   mrn_table_def_cache = (HASH *)GetProcAddress(current_module,
     "?table_def_cache@@3Ust_hash@@A");
+#    endif
 #  endif
 #  ifndef MRN_HAVE_TDC_LOCK_TABLE_SHARE
   mrn_LOCK_open =
-------------- next part --------------
HTML����������������������������...
URL: https://lists.osdn.me/mailman/archives/groonga-mysql-commit/attachments/20180429/a1c3ce5c/attachment-0001.htm 



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