Kentoku
null+****@clear*****
Thu Oct 4 10:33:15 JST 2012
Kentoku 2011-12-01 01:24:51 +0900 (Thu, 01 Dec 2011) New Revision: 588db76b43dd082acfd41ae81174c316f61d7993 https://github.com/mroonga/mroonga/commit/588db76b43dd082acfd41ae81174c316f61d7993 Log: support repair/optimize table for wrapper mode. Modified files: ha_mroonga.cc Modified: ha_mroonga.cc (+3 -15) =================================================================== --- ha_mroonga.cc 2011-11-29 01:34:35 +0900 (511542a) +++ ha_mroonga.cc 2011-12-01 01:24:51 +0900 (7b75302) @@ -1377,7 +1377,7 @@ ulonglong ha_mroonga::wrapper_table_flags() const MRN_SET_WRAP_TABLE_KEY(this, table); table_flags = wrap_handler->ha_table_flags() | HA_CAN_FULLTEXT | HA_PRIMARY_KEY_REQUIRED_FOR_DELETE | - HA_CAN_RTREEKEYS; + HA_CAN_RTREEKEYS | HA_CAN_REPAIR; MRN_SET_BASE_SHARE_KEY(share, table->s); MRN_SET_BASE_TABLE_KEY(this, table); DBUG_RETURN(table_flags); @@ -7555,14 +7555,8 @@ int ha_mroonga::check(THD* thd, HA_CHECK_OPT* check_opt) int ha_mroonga::wrapper_repair(THD* thd, HA_CHECK_OPT* check_opt) { - int error = 0; MRN_DBUG_ENTER_METHOD(); - MRN_SET_WRAP_SHARE_KEY(share, table->s); - MRN_SET_WRAP_TABLE_KEY(this, table); - error = wrap_handler->ha_repair(thd, check_opt); - MRN_SET_BASE_SHARE_KEY(share, table->s); - MRN_SET_BASE_TABLE_KEY(this, table); - DBUG_RETURN(error); + DBUG_RETURN(HA_ADMIN_TRY_ALTER); } int ha_mroonga::storage_repair(THD* thd, HA_CHECK_OPT* check_opt) @@ -7650,14 +7644,8 @@ int ha_mroonga::analyze(THD* thd, HA_CHECK_OPT* check_opt) int ha_mroonga::wrapper_optimize(THD* thd, HA_CHECK_OPT* check_opt) { - int error = 0; MRN_DBUG_ENTER_METHOD(); - MRN_SET_WRAP_SHARE_KEY(share, table->s); - MRN_SET_WRAP_TABLE_KEY(this, table); - error = wrap_handler->ha_optimize(thd, check_opt); - MRN_SET_BASE_SHARE_KEY(share, table->s); - MRN_SET_BASE_TABLE_KEY(this, table); - DBUG_RETURN(error); + DBUG_RETURN(HA_ADMIN_TRY_ALTER); } int ha_mroonga::storage_optimize(THD* thd, HA_CHECK_OPT* check_opt) -------------- next part -------------- HTML����������������������������...Download