Navigation Menu

Skip to content

Commit

Permalink
Work with old MySQL again
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Jul 1, 2016
1 parent b7d896b commit 084e00b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion ha_mroonga.cpp
Expand Up @@ -226,6 +226,14 @@ static mysql_mutex_t *mrn_LOCK_open;
((select_lex)->options)
#endif

#if MYSQL_VERSION_ID >= 50712 && !defined(MRN_MARIADB_P)
# define MRN_ITEM_IS_VALID(item) \
((item) && ((item)->type() != Item::INVALID_ITEM))
#else
# define MRN_ITEM_IS_VALID(item) \
(item)
#endif

#if MYSQL_VERSION_ID >= 50706 && !defined(MRN_MARIADB_P)
# define MRN_TABLE_LIST_GET_DERIVED(table_list) NULL
#else
Expand Down Expand Up @@ -9945,7 +9953,7 @@ void ha_mroonga::check_count_skip(key_part_map start_key_part_map,
KEY_PART_INFO *key_part = key_info->key_part;
uint n_fields = 0;
for (Item *where = MRN_SELECT_LEX_GET_WHERE_COND(select_lex);
where && where->type() != Item::INVALID_ITEM;
MRN_ITEM_IS_VALID(where);
where = where->next) {
Item *target = where;

Expand Down

0 comments on commit 084e00b

Please sign in to comment.