[Groonga-mysql-commit] mroonga/mroonga at f43e10d [master] mysql80: follow Item_sum API change

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Jul 20 23:34:09 JST 2017


Kouhei Sutou	2017-07-20 23:34:09 +0900 (Thu, 20 Jul 2017)

  New Revision: f43e10d4bf69eddd7ba97658a338c5b4b8e91b50
  https://github.com/mroonga/mroonga/commit/f43e10d4bf69eddd7ba97658a338c5b4b8e91b50

  Message:
    mysql80: follow Item_sum API change

  Modified files:
    lib/mrn_count_skip_checker.cpp
    mrn_mysql_compat.h

  Modified: lib/mrn_count_skip_checker.cpp (+6 -6)
===================================================================
--- lib/mrn_count_skip_checker.cpp    2017-07-20 23:31:35 +0900 (0aafb52)
+++ lib/mrn_count_skip_checker.cpp    2017-07-20 23:34:09 +0900 (c74d1b7)
@@ -84,15 +84,15 @@ namespace mrn {
               sum_item->sum_func());
       DBUG_RETURN(false);
     }
-    if (sum_item->nest_level != 0 ||
-        sum_item->aggr_level != 0 ||
-        sum_item->max_arg_level != -1 ||
+    if (sum_item->base_select->nest_level != 0 ||
+        sum_item->aggr_select->nest_level != 0 ||
+        sum_item->max_aggr_level != -1 ||
         sum_item->max_sum_func_level != -1) {
       GRN_LOG(ctx_, GRN_LOG_DEBUG,
               "[mroonga][count-skip][false] not simple COUNT(*): %d:%d:%d:%d",
-              sum_item->nest_level,
-              sum_item->aggr_level,
-              sum_item->max_arg_level,
+              sum_item->base_select->nest_level,
+              sum_item->aggr_select->nest_level,
+              sum_item->max_aggr_level,
               sum_item->max_sum_func_level);
       DBUG_RETURN(false);
     }

  Modified: mrn_mysql_compat.h (+10 -0)
===================================================================
--- mrn_mysql_compat.h    2017-07-20 23:31:35 +0900 (e63249b)
+++ mrn_mysql_compat.h    2017-07-20 23:34:09 +0900 (4e8af65)
@@ -394,4 +394,14 @@
   (create_subpartition_name(out, in1, in2, in3, name_variant), 0)
 #endif
 
+#if (!defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 80002)
+#  define ITEM_SUM_GET_NEST_LEVEL(sum_item) sum_item->base_select->next_level
+#  define ITEM_SUM_GET_AGGR_LEVEL(sum_item) sum_item->aggr_select->next_level
+#  define ITEM_SUM_GET_MAX_AGGR_LEVEL(sum_item) sum_item->max_aggr_level
+#else
+#  define ITEM_SUM_GET_NEST_LEVEL(sum_item) sum_item->next_level
+#  define ITEM_SUM_GET_AGGR_LEVEL(sum_item) sum_item->aggr_level
+#  define ITEM_SUM_GET_MAX_AGGR_LEVEL(sum_item) sum_item->max_arg_level
+#endif
+
 #endif /* MRN_MYSQL_COMPAT_H_ */
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-mysql-commit mailing list
Back to archive index