Navigation Menu

Skip to content

Commit

Permalink
mysql57: follow handler::is_fatal_error() API change
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Mar 17, 2015
1 parent 7c39419 commit 505b31f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
8 changes: 8 additions & 0 deletions ha_mroonga.cpp
Expand Up @@ -13234,7 +13234,11 @@ bool ha_mroonga::wrapper_is_fatal_error(int error_num, uint flags)
MRN_DBUG_ENTER_METHOD();
MRN_SET_WRAP_SHARE_KEY(share, table->s);
MRN_SET_WRAP_TABLE_KEY(this, table);
#ifdef MRN_HANDLER_IS_FATAL_ERROR_HAVE_FLAGS
res = wrap_handler->is_fatal_error(error_num, flags);
#else
res = wrap_handler->is_fatal_error(error_num);
#endif
MRN_SET_BASE_SHARE_KEY(share, table->s);
MRN_SET_BASE_TABLE_KEY(this, table);
DBUG_RETURN(res);
Expand All @@ -13243,7 +13247,11 @@ bool ha_mroonga::wrapper_is_fatal_error(int error_num, uint flags)
bool ha_mroonga::storage_is_fatal_error(int error_num, uint flags)
{
MRN_DBUG_ENTER_METHOD();
#ifdef MRN_HANDLER_IS_FATAL_ERROR_HAVE_FLAGS
bool is_fatal_error = handler::is_fatal_error(error_num, flags);
#else
bool is_fatal_error = handler::is_fatal_error(error_num);
#endif
DBUG_RETURN(is_fatal_error);
}

Expand Down
7 changes: 6 additions & 1 deletion ha_mroonga.hpp
Expand Up @@ -223,6 +223,11 @@ extern "C" {
# define MRN_FOREIGN_KEY_USE_CONST_STRING
#endif

#if MYSQL_VERSION_ID < 50706 || defined(MRN_MARIADB_P)
# define MRN_HANDLER_IS_FATAL_ERROR_HAVE_FLAGS
#endif


class ha_mroonga;

/* structs */
Expand Down Expand Up @@ -492,7 +497,7 @@ class ha_mroonga: public handler
bool check_and_repair(THD *thd);
int analyze(THD* thd, HA_CHECK_OPT* check_opt);
int optimize(THD* thd, HA_CHECK_OPT* check_opt);
bool is_fatal_error(int error_num, uint flags);
bool is_fatal_error(int error_num, uint flags=0);
bool check_if_incompatible_data(HA_CREATE_INFO *create_info,
uint table_changes);
#ifdef MRN_HANDLER_HAVE_CHECK_IF_SUPPORTED_INPLACE_ALTER
Expand Down

0 comments on commit 505b31f

Please sign in to comment.