Kouhei Sutou
null+****@clear*****
Tue Mar 17 21:25:49 JST 2015
Kouhei Sutou 2015-03-17 21:25:49 +0900 (Tue, 17 Mar 2015) New Revision: 5f9cd891cb0b40f54b9eb50db7cd2a1c8cc91b70 https://github.com/mroonga/mroonga/commit/5f9cd891cb0b40f54b9eb50db7cd2a1c8cc91b70 Message: mysql57: add wrapper to get SELCT_LEX::options Modified files: ha_mroonga.cpp Modified: ha_mroonga.cpp (+7 -2) =================================================================== --- ha_mroonga.cpp 2015-03-17 21:14:40 +0900 (3c7efb9) +++ ha_mroonga.cpp 2015-03-17 21:25:49 +0900 (61178d1) @@ -213,6 +213,8 @@ static mysql_mutex_t *mrn_LOCK_open; ((select_lex)->having_cond()) # define MRN_SELECT_LEX_IS_AGG_FUNC_USED(select_lex) \ ((select_lex)->agg_func_used()) +# define MRN_SELECT_LEX_GET_ACTIVE_OPTIONS(select_lex) \ + ((select_lex)->active_options()) #else # define MRN_SELECT_LEX_GET_WHERE_COND(select_lex) \ ((select_lex)->where) @@ -220,6 +222,8 @@ static mysql_mutex_t *mrn_LOCK_open; ((select_lex)->having) # define MRN_SELECT_LEX_IS_AGG_FUNC_USED(select_lex) \ ((select_lex)->non_agg_fields.elements) +# define MRN_SELECT_LEX_GET_ACTIVE_OPTIONS(select_lex) \ + ((select_lex)->options) #endif Rpl_filter *mrn_binlog_filter; @@ -9367,7 +9371,7 @@ void ha_mroonga::check_fast_order_limit(grn_table_sort_key **sort_keys, } DBUG_PRINT("info", ("mroonga: first_select_lex->options=%llu", - first_select_lex ? first_select_lex->options : 0)); + first_select_lex ? MRN_SELECT_LEX_GET_ACTIVE_OPTIONS(first_select_lex) : 0)); if ( thd_sql_command(ha_thd()) == SQLCOM_SELECT && @@ -9394,7 +9398,8 @@ void ha_mroonga::check_fast_order_limit(grn_table_sort_key **sort_keys, fast_order_limit = false; DBUG_VOID_RETURN; } - if (first_select_lex && (first_select_lex->options & OPTION_FOUND_ROWS)) { + if (first_select_lex && + (MRN_SELECT_LEX_GET_ACTIVE_OPTIONS(first_select_lex) & OPTION_FOUND_ROWS)) { DBUG_PRINT("info", ("mroonga: fast_order_limit = false: " "SQL_CALC_FOUND_ROWS is specified")); -------------- next part -------------- HTML����������������������������... Download