null+****@clear*****
null+****@clear*****
2011年 12月 1日 (木) 01:24:51 JST
Kentoku 2011-11-30 16:24:51 +0000 (Wed, 30 Nov 2011)
New Revision: 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-28 16:34:35 +0000 (511542a)
+++ ha_mroonga.cc 2011-11-30 16:24:51 +0000 (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)