shibakentoku
null+****@clear*****
Fri Dec 20 02:16:06 JST 2013
shibakentoku 2013-12-20 02:16:06 +0900 (Fri, 20 Dec 2013) New Revision: 15008ebfb71f35a3464da530bbf2a2b7f04bb564 https://github.com/mroonga/mroonga/commit/15008ebfb71f35a3464da530bbf2a2b7f04bb564 Message: change the followings from MariaDB 10.0.7. refs #1964 from thd->variables.auto_increment_offset to thd_get_autoinc() from thd->variables.auto_increment_increment to thd_get_autoinc() from thd->get_stmt_da()->message() to thd_get_error_message() from thd->get_stmt_da()->current_row_for_warning() to thd_get_error_row() Modified files: ha_mroonga.cpp mrn_mysql_compat.h Modified: ha_mroonga.cpp (+15 -3) =================================================================== --- ha_mroonga.cpp 2013-12-18 13:18:21 +0900 (2d40923) +++ ha_mroonga.cpp 2013-12-20 02:16:06 +0900 (6148422) @@ -161,6 +161,16 @@ pthread_mutex_t *mrn_LOCK_open; # endif #endif +#if MYSQL_VERSION_ID >= 100007 && defined(MRN_MARIADB_P) +# define MRN_THD_GET_AUTOINC(thd, off, inc) thd_get_autoinc(thd, off, inc) +#else +# define MRN_THD_GET_AUTOINC(thd, off, inc) \ + { \ + *(off) = thd->variables.auto_increment_offset; \ + *(inc) = thd->variables.auto_increment_increment; \ + } +#endif + Rpl_filter *mrn_binlog_filter; Time_zone *mrn_my_tz_UTC; #ifdef MRN_HAVE_TABLE_DEF_CACHE @@ -4465,7 +4475,6 @@ int ha_mroonga::storage_info(uint flag) if ((flag & HA_STATUS_AUTO) && table->found_next_number_field) { THD *thd = ha_thd(); - struct system_variables *variables = &thd->variables; ulonglong nb_reserved_values; bool next_number_field_is_null = !table->next_number_field; mrn::ExternalLock mrn_external_lock(ha_thd(), this, @@ -4480,8 +4489,11 @@ int ha_mroonga::storage_info(uint flag) MRN_LONG_TERM_SHARE *long_term_share = share->long_term_share; { mrn::Lock lock(&long_term_share->auto_inc_mutex); - storage_get_auto_increment(variables->auto_increment_offset, - variables->auto_increment_increment, 1, + unsigned long auto_increment_offset, auto_increment_increment; + MRN_THD_GET_AUTOINC(thd, &auto_increment_offset, + &auto_increment_increment); + storage_get_auto_increment(auto_increment_offset, + auto_increment_increment, 1, &stats.auto_increment_value, &nb_reserved_values); } Modified: mrn_mysql_compat.h (+7 -2) =================================================================== --- mrn_mysql_compat.h 2013-12-18 13:18:21 +0900 (99961fb) +++ mrn_mysql_compat.h 2013-12-20 02:16:06 +0900 (157e5ff) @@ -84,8 +84,13 @@ #endif #if MYSQL_VERSION_ID >= 50607 -# define MRN_GET_ERROR_MESSAGE current_thd->get_stmt_da()->message() -# define MRN_GET_CURRENT_ROW_FOR_WARNING(thd) thd->get_stmt_da()->current_row_for_warning() +# if MYSQL_VERSION_ID >= 100007 && defined(MRN_MARIADB_P) +# define MRN_GET_ERROR_MESSAGE thd_get_error_message(current_thd) +# define MRN_GET_CURRENT_ROW_FOR_WARNING(thd) thd_get_error_row(thd) +# else +# define MRN_GET_ERROR_MESSAGE current_thd->get_stmt_da()->message() +# define MRN_GET_CURRENT_ROW_FOR_WARNING(thd) thd->get_stmt_da()->current_row_for_warning() +# endif #else # if MYSQL_VERSION_ID >= 50500 # define MRN_GET_ERROR_MESSAGE current_thd->stmt_da->message() -------------- next part -------------- HTML����������������������������...Download