Kouhei Sutou
null+****@clear*****
Mon Jul 9 16:21:59 JST 2018
Kouhei Sutou 2018-07-09 16:21:59 +0900 (Mon, 09 Jul 2018) New Revision: 2a2cbfd6b5a2fc8f211053c138b148fdb72dad7d https://github.com/mroonga/mroonga/commit/2a2cbfd6b5a2fc8f211053c138b148fdb72dad7d Message: mysql8: use thd_{get,set}_ha_data() Modified files: mrn_table.cpp Modified: mrn_table.cpp (+5 -3) =================================================================== --- mrn_table.cpp 2018-07-09 16:13:17 +0900 (bcb0a42a) +++ mrn_table.cpp 2018-07-09 16:21:59 +0900 (8bc29085) @@ -20,6 +20,7 @@ #include "mrn_mysql.h" +#include <mysql/plugin.h> #if MYSQL_VERSION_ID >= 50500 # include <sql_servers.h> # include <sql_base.h> @@ -1210,16 +1211,17 @@ st_mrn_slot_data *mrn_get_slot_data(THD *thd, bool can_create) { MRN_DBUG_ENTER_FUNCTION(); st_mrn_slot_data *slot_data = - (st_mrn_slot_data*) *thd_ha_data(thd, mrn_hton_ptr); + static_cast<st_mrn_slot_data *>(thd_get_ha_data(thd, mrn_hton_ptr)); if (slot_data == NULL) { - slot_data = (st_mrn_slot_data*) malloc(sizeof(st_mrn_slot_data)); + slot_data = + static_cast<st_mrn_slot_data *>(malloc(sizeof(st_mrn_slot_data))); slot_data->last_insert_record_id = GRN_ID_NIL; slot_data->first_wrap_hton = NULL; slot_data->alter_create_info = NULL; slot_data->disable_keys_create_info = NULL; slot_data->alter_connect_string = NULL; slot_data->alter_comment = NULL; - *thd_ha_data(thd, mrn_hton_ptr) = (void *) slot_data; + thd_set_ha_data(thd, mrn_hton_ptr, slot_data); { mrn::Lock lock(&mrn_allocated_thds_mutex); if (grn_hash_add(&mrn_ctx, -------------- next part -------------- HTML����������������������������... URL: https://lists.osdn.me/mailman/archives/groonga-mysql-commit/attachments/20180709/6f4982d1/attachment.htm