[Groonga-mysql-commit] mroonga/mroonga at 084e00b [master] Work with old MySQL again

Zurück zum Archiv-Index

Kouhei Sutou null+****@clear*****
Fri Jul 1 14:19:42 JST 2016


Kouhei Sutou	2016-07-01 14:19:42 +0900 (Fri, 01 Jul 2016)

  New Revision: 084e00b2991e69984a6bfe98aa575c537f5b79fd
  https://github.com/mroonga/mroonga/commit/084e00b2991e69984a6bfe98aa575c537f5b79fd

  Message:
    Work with old MySQL again

  Modified files:
    ha_mroonga.cpp

  Modified: ha_mroonga.cpp (+9 -1)
===================================================================
--- ha_mroonga.cpp    2016-07-01 14:14:53 +0900 (4e35641)
+++ ha_mroonga.cpp    2016-07-01 14:19:42 +0900 (a1902d5)
@@ -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
@@ -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;
 
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-mysql-commit mailing list
Zurück zum Archiv-Index