[Groonga-mysql-commit] mroonga/mroonga at 7c3f0a5 [master] mariadb10.2: support count skip optimization with prepared statement

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Dec 8 23:13:47 JST 2016


Kouhei Sutou	2016-12-08 23:13:47 +0900 (Thu, 08 Dec 2016)

  New Revision: 7c3f0a533b5baa8355eb445ea66f9c6e69d09c28
  https://github.com/mroonga/mroonga/commit/7c3f0a533b5baa8355eb445ea66f9c6e69d09c28

  Message:
    mariadb10.2: support count skip optimization with prepared statement
    
    GitHub: fix #114

  Modified files:
    ha_mroonga.cpp
    ha_mroonga.hpp

  Modified: ha_mroonga.cpp (+9 -0)
===================================================================
--- ha_mroonga.cpp    2016-12-08 22:24:41 +0900 (f3601cc)
+++ ha_mroonga.cpp    2016-12-08 23:13:47 +0900 (89337e1)
@@ -10125,6 +10125,15 @@ void ha_mroonga::check_count_skip(key_part_map start_key_part_map,
             }
             break;
           case Item_func::MULT_EQUAL_FUNC:
+#ifdef MRN_HAVE_ITEM_EQUAL_FIELDS_ITERATOR
+            {
+              Item_equal *equal_item = static_cast<Item_equal *>(where);
+              if (equal_item->n_field_items() == 1) {
+                Item_equal_fields_iterator it(*equal_item);
+                target = it++;
+              }
+            }
+#endif
             break;
           default:
             target = NULL;

  Modified: ha_mroonga.hpp (+4 -0)
===================================================================
--- ha_mroonga.hpp    2016-12-08 22:24:41 +0900 (f4f7a18)
+++ ha_mroonga.hpp    2016-12-08 23:13:47 +0900 (c7e885f)
@@ -222,6 +222,10 @@ extern "C" {
 #  define MRN_HANDLER_RECORDS_RETURN_ERROR
 #endif
 
+#ifdef MRN_MARIADB_P
+#  define MRN_HAVE_ITEM_EQUAL_FIELDS_ITERATOR
+#endif
+
 class ha_mroonga;
 
 /* structs */
-------------- next part --------------
HTML����������������������������...
Download 



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