[Groonga-mysql-commit] mroonga/mroonga [master] [mariadb] add key_parts argument to multi_range_read_info(). refs #1152

アーカイブの一覧に戻る

null+****@clear***** null+****@clear*****
2011年 10月 31日 (月) 23:40:51 JST


Kouhei Sutou	2011-10-31 14:40:51 +0000 (Mon, 31 Oct 2011)

  New Revision: 7644289dff9dfc73bdde1bc7985b5f424f07ebc6

  Log:
    [mariadb] add key_parts argument to multi_range_read_info(). refs #1152

  Modified files:
    ha_mroonga.cc
    ha_mroonga.h

  Modified: ha_mroonga.cc (+25 -2)
===================================================================
--- ha_mroonga.cc    2011-10-31 14:32:28 +0000 (e304e19)
+++ ha_mroonga.cc    2011-10-31 14:40:51 +0000 (0525209)
@@ -6232,7 +6232,11 @@ ha_rows ha_mroonga::multi_range_read_info_const(uint keyno, RANGE_SEQ_IF *seq,
 }
 
 ha_rows ha_mroonga::wrapper_multi_range_read_info(uint keyno, uint n_ranges,
-                                                  uint keys, uint *bufsz,
+                                                  uint keys,
+#ifdef MRN_HANDLER_HAVE_MULTI_RANGE_READ_INFO_KEY_PARTS
+                                                  uint key_parts,
+#endif
+                                                  uint *bufsz,
                                                   uint *flags, COST_VECT *cost)
 {
   MRN_DBUG_ENTER_METHOD();
@@ -6242,6 +6246,9 @@ ha_rows ha_mroonga::wrapper_multi_range_read_info(uint keyno, uint n_ranges,
   if (fulltext_searching)
     set_pk_bitmap();
   rows = wrap_handler->multi_range_read_info(keyno, n_ranges, keys,
+#ifdef MRN_HANDLER_HAVE_MULTI_RANGE_READ_INFO_KEY_PARTS
+                                             key_parts,
+#endif
                                              bufsz, flags, cost);
   MRN_SET_BASE_SHARE_KEY(share, table->s);
   MRN_SET_BASE_TABLE_KEY(this, table);
@@ -6249,16 +6256,26 @@ ha_rows ha_mroonga::wrapper_multi_range_read_info(uint keyno, uint n_ranges,
 }
 
 ha_rows ha_mroonga::storage_multi_range_read_info(uint keyno, uint n_ranges,
-                                                  uint keys, uint *bufsz,
+                                                  uint keys,
+#ifdef MRN_HANDLER_HAVE_MULTI_RANGE_READ_INFO_KEY_PARTS
+                                                  uint key_parts,
+#endif
+                                                  uint *bufsz,
                                                   uint *flags, COST_VECT *cost)
 {
   MRN_DBUG_ENTER_METHOD();
   ha_rows rows = handler::multi_range_read_info(keyno, n_ranges, keys,
+#ifdef MRN_HANDLER_HAVE_MULTI_RANGE_READ_INFO_KEY_PARTS
+                                                key_parts,
+#endif
                                                 bufsz, flags, cost);
   DBUG_RETURN(rows);
 }
 
 ha_rows ha_mroonga::multi_range_read_info(uint keyno, uint n_ranges, uint keys,
+#ifdef MRN_HANDLER_HAVE_MULTI_RANGE_READ_INFO_KEY_PARTS
+                                          uint key_parts,
+#endif
                                           uint *bufsz, uint *flags,
                                           COST_VECT *cost)
 {
@@ -6267,9 +6284,15 @@ ha_rows ha_mroonga::multi_range_read_info(uint keyno, uint n_ranges, uint keys,
   if (share->wrapper_mode)
   {
     rows = wrapper_multi_range_read_info(keyno, n_ranges, keys,
+#ifdef MRN_HANDLER_HAVE_MULTI_RANGE_READ_INFO_KEY_PARTS
+                                         key_parts,
+#endif
                                          bufsz, flags, cost);
   } else {
     rows = storage_multi_range_read_info(keyno, n_ranges, keys,
+#ifdef MRN_HANDLER_HAVE_MULTI_RANGE_READ_INFO_KEY_PARTS
+                                         key_parts,
+#endif
                                          bufsz, flags, cost);
   }
   DBUG_RETURN(rows);

  Modified: ha_mroonga.h (+13 -0)
===================================================================
--- ha_mroonga.h    2011-10-31 14:32:28 +0000 (c3b2215)
+++ ha_mroonga.h    2011-10-31 14:40:51 +0000 (05594f8)
@@ -71,6 +71,10 @@ extern "C" {
 #  define MRN_HANDLER_HAVE_INDEX_READ_LAST_MAP
 #endif
 
+#if (defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 50302)
+#  define MRN_HANDLER_HAVE_MULTI_RANGE_READ_INFO_KEY_PARTS
+#endif
+
 #if MYSQL_VERSION_ID < 50600
   typedef Item COND;
 #endif
@@ -274,6 +278,9 @@ public:
                                       uint n_ranges, uint *bufsz,
                                       uint *flags, COST_VECT *cost);
   ha_rows multi_range_read_info(uint keyno, uint n_ranges, uint keys,
+#ifdef MRN_HANDLER_HAVE_MULTI_RANGE_READ_INFO_KEY_PARTS
+                                uint key_parts,
+#endif
                                 uint *bufsz, uint *flags, COST_VECT *cost);
   int multi_range_read_init(RANGE_SEQ_IF *seq, void *seq_init_param,
                             uint n_ranges, uint mode,
@@ -553,9 +560,15 @@ private:
                                               uint *flags,
                                               COST_VECT *cost);
   ha_rows wrapper_multi_range_read_info(uint keyno, uint n_ranges, uint keys,
+#ifdef MRN_HANDLER_HAVE_MULTI_RANGE_READ_INFO_KEY_PARTS
+                                        uint key_parts,
+#endif
                                         uint *bufsz, uint *flags,
                                         COST_VECT *cost);
   ha_rows storage_multi_range_read_info(uint keyno, uint n_ranges, uint keys,
+#ifdef MRN_HANDLER_HAVE_MULTI_RANGE_READ_INFO_KEY_PARTS
+                                        uint key_parts,
+#endif
                                         uint *bufsz, uint *flags,
                                         COST_VECT *cost);
   int wrapper_multi_range_read_init(RANGE_SEQ_IF *seq, void *seq_init_param,




Groonga-mysql-commit メーリングリストの案内
アーカイブの一覧に戻る