Kentoku
null+****@clear*****
Thu Oct 4 10:40:33 JST 2012
Kentoku 2011-11-16 01:49:32 +0900 (Wed, 16 Nov 2011) New Revision: f32b2203e4ac8d3456eccd2f7fb19c5025a46b8b https://github.com/mroonga/mroonga/commit/f32b2203e4ac8d3456eccd2f7fb19c5025a46b8b Log: FLUSH STATUS should reset groonga status variables. refs #1166 Modified files: ha_mroonga.cc ha_mroonga.h Modified: ha_mroonga.cc (+2 -26) =================================================================== --- ha_mroonga.cc 2011-11-15 10:08:20 +0900 (346ae25) +++ ha_mroonga.cc 2011-11-16 01:49:32 +0900 (d1e2a7b) @@ -102,7 +102,6 @@ static uchar *mrn_open_tables_get_key(MRN_SHARE *share, } /* status */ -st_mrn_statuses mrn_status_vals; long mrn_count_skip = 0; long mrn_fast_order_limit = 0; @@ -151,36 +150,13 @@ static uchar *mrn_allocated_thds_get_key(THD *thd, /* system functions */ -static void mrn_create_status() -{ - MRN_DBUG_ENTER_FUNCTION(); - mrn_status_vals.count_skip = mrn_count_skip; - mrn_status_vals.fast_order_limit = mrn_fast_order_limit; - DBUG_VOID_RETURN; -} - -struct st_mysql_show_var mrn_statuses[] = -{ - {"count_skip", (char *) &mrn_status_vals.count_skip, SHOW_LONG}, - {"fast_order_limit", (char *) &mrn_status_vals.fast_order_limit, SHOW_LONG}, - {NullS, NullS, SHOW_LONG} -}; - -static int mrn_show_status(THD *thd, SHOW_VAR *var, char *buff) -{ - MRN_DBUG_ENTER_FUNCTION(); - mrn_create_status(); - var->type = SHOW_ARRAY; - var->value = (char *) &mrn_statuses; - DBUG_RETURN(0); -} - struct st_mysql_storage_engine storage_engine_structure = { MYSQL_HANDLERTON_INTERFACE_VERSION }; struct st_mysql_show_var mrn_status_variables[] = { - {"groonga", (char *) &mrn_show_status, SHOW_FUNC}, + {"groonga_count_skip", (char *) &mrn_count_skip, SHOW_LONG}, + {"groonga_fast_order_limit", (char *) &mrn_fast_order_limit, SHOW_LONG}, {NullS, NullS, SHOW_LONG} }; Modified: ha_mroonga.h (+0 -6) =================================================================== --- ha_mroonga.h 2011-11-15 10:08:20 +0900 (475ed05) +++ ha_mroonga.h 2011-11-16 01:49:32 +0900 (e4a88a9) @@ -93,12 +93,6 @@ extern "C" { class ha_mroonga; /* structs */ -struct st_mrn_statuses -{ - long count_skip; - long fast_order_limit; -}; - struct st_mrn_ft_info { struct _ft_vft *please; -------------- next part -------------- HTML����������������������������...Download