Navigation Menu

Skip to content

Commit

Permalink
mysql57: follow SELECT_LEX::non_agg_fields API change
Browse files Browse the repository at this point in the history
It's not the same condition. We may need to use a feature in
sql/aggregate_check.h.
  • Loading branch information
kou committed Mar 16, 2015
1 parent 59d0507 commit edb11b0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ha_mroonga.cpp
Expand Up @@ -210,11 +210,15 @@ 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())
#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)
#endif

Rpl_filter *mrn_binlog_filter;
Expand Down Expand Up @@ -9212,7 +9216,7 @@ void ha_mroonga::check_count_skip(key_part_map start_key_part_map,

if (
thd_sql_command(ha_thd()) == SQLCOM_SELECT &&
!select_lex->non_agg_fields.elements &&
!MRN_SELECT_LEX_IS_AGG_FUNC_USED(select_lex) &&
!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 edb11b0

Please sign in to comment.