Kouhei Sutou
null+****@clear*****
Fri Aug 10 16:14:49 JST 2018
Kouhei Sutou 2018-08-10 16:14:49 +0900 (Fri, 10 Aug 2018) New Revision: 5a9d64f2be14f94965d290a3ea842b805f6224d7 https://github.com/mroonga/mroonga/commit/5a9d64f2be14f94965d290a3ea842b805f6224d7 Message: Wrap handler::print_error() Modified files: ha_mroonga.cpp ha_mroonga.hpp Modified: ha_mroonga.cpp (+29 -0) =================================================================== --- ha_mroonga.cpp 2018-08-10 16:14:35 +0900 (a204929f) +++ ha_mroonga.cpp 2018-08-10 16:14:49 +0900 (59da1521) @@ -13042,6 +13042,35 @@ handler *ha_mroonga::clone(const char *name, MEM_ROOT *mem_root) DBUG_RETURN(cloned_handler); } +void ha_mroonga::wrapper_print_error(int error, myf flag) +{ + MRN_DBUG_ENTER_METHOD(); + MRN_SET_WRAP_SHARE_KEY(share, table->s); + MRN_SET_WRAP_TABLE_KEY(this, table); + wrap_handler->print_error(error, flag); + MRN_SET_BASE_SHARE_KEY(share, table->s); + MRN_SET_BASE_TABLE_KEY(this, table); + DBUG_VOID_RETURN; +} + +void ha_mroonga::storage_print_error(int error, myf flag) +{ + MRN_DBUG_ENTER_METHOD(); + handler::print_error(error, flag); + DBUG_VOID_RETURN; +} + +void ha_mroonga::print_error(int error, myf flag) +{ + MRN_DBUG_ENTER_METHOD(); + if (share->wrapper_mode) { + wrapper_print_error(error, flag); + } else { + storage_print_error(error, flag); + } + DBUG_VOID_RETURN; +} + bool ha_mroonga::wrapper_get_error_message(int error, String *buffer) { bool errored; Modified: ha_mroonga.hpp (+3 -0) =================================================================== --- ha_mroonga.hpp 2018-08-10 16:14:35 +0900 (cdd7c7b0) +++ ha_mroonga.hpp 2018-08-10 16:14:49 +0900 (ab9d0ce0) @@ -646,6 +646,7 @@ public: int reset(); handler *clone(const char *name, MEM_ROOT *mem_root) mrn_override; + void print_error(int error, myf flag) mrn_override; bool get_error_message(int error, String *buffer) mrn_override; #ifdef MRN_HANDLER_HAVE_TABLE_CACHE_TYPE uint8 table_cache_type(); @@ -1302,6 +1303,8 @@ private: void storage_cond_pop(); handler *wrapper_clone(const char *name, MEM_ROOT *mem_root); handler *storage_clone(const char *name, MEM_ROOT *mem_root); + void wrapper_print_error(int error, myf flag); + void storage_print_error(int error, myf flag); bool wrapper_get_error_message(int error, String *buffer); bool storage_get_error_message(int error, String *buffer); #ifdef MRN_HANDLER_HAVE_TABLE_CACHE_TYPE -------------- next part -------------- HTML����������������������������... URL: https://lists.osdn.me/mailman/archives/groonga-mysql-commit/attachments/20180810/3914fdcc/attachment-0001.htm