Navigation Menu

Skip to content

Commit

Permalink
mysql57: simplify "COUNT(*)" only output check
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Mar 18, 2015
1 parent 21f0b18 commit 154f8ec
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions ha_mroonga.cpp
Expand Up @@ -217,17 +217,13 @@ static mysql_mutex_t *mrn_LOCK_open;
((select_lex)->where_cond())
# define MRN_SELECT_LEX_GET_HAVING_COND(select_lex) \
((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)
# define MRN_SELECT_LEX_GET_HAVING_COND(select_lex) \
((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
Expand Down Expand Up @@ -9239,7 +9235,7 @@ void ha_mroonga::check_count_skip(key_part_map start_key_part_map,

if (
thd_sql_command(ha_thd()) == SQLCOM_SELECT &&
!MRN_SELECT_LEX_IS_AGG_FUNC_USED(select_lex) &&
select_lex->item_list.elements == 1 &&
!select_lex->group_list.elements &&
!MRN_SELECT_LEX_GET_HAVING_COND(select_lex) &&
select_lex->table_list.elements == 1
Expand Down

0 comments on commit 154f8ec

Please sign in to comment.