[Groonga-mysql-commit] mroonga/mroonga [master] mysql56: use Item::item_name instead of Item::name

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Nov 19 12:10:03 JST 2012


Kouhei Sutou	2012-11-19 12:10:03 +0900 (Mon, 19 Nov 2012)

  New Revision: 1f4ff948ff8922a8707d48062cdbf0c889481373
  https://github.com/mroonga/mroonga/commit/1f4ff948ff8922a8707d48062cdbf0c889481373

  Log:
    mysql56: use Item::item_name instead of Item::name

  Modified files:
    ha_mroonga.cpp
    ha_mroonga.hpp

  Modified: ha_mroonga.cpp (+6 -0)
===================================================================
--- ha_mroonga.cpp    2012-11-19 12:04:15 +0900 (d66c6c9)
+++ ha_mroonga.cpp    2012-11-19 12:10:03 +0900 (da6b8cc)
@@ -7118,7 +7118,13 @@ void ha_mroonga::generic_ft_init_ext_add_conditions_fast_order_limit(
             Item *right_item = arguments[1];
             if (left_item->type() == Item::FIELD_ITEM) {
               GRN_BULK_REWIND(&column_name);
+#ifdef MRN_ITEM_HAVE_ITEM_NAME
+              Item_name_string *name = &(left_item->item_name);
+              GRN_TEXT_PUT(info->ctx, &column_name,
+                           name->ptr(), name->length());
+#else
               GRN_TEXT_PUTS(info->ctx, &column_name, left_item->name);
+#endif
               grn_expr_append_const(info->ctx, expression, &column_name,
                                     GRN_OP_PUSH, 1);
               grn_expr_append_op(info->ctx, expression, GRN_OP_GET_VALUE, 1);

  Modified: ha_mroonga.hpp (+4 -0)
===================================================================
--- ha_mroonga.hpp    2012-11-19 12:04:15 +0900 (1d3c0f7)
+++ ha_mroonga.hpp    2012-11-19 12:10:03 +0900 (83c7239)
@@ -140,6 +140,10 @@ extern "C" {
 #  define MRN_JOIN_TAB_HAVE_CONDITION
 #endif
 
+#if MYSQL_VERSION_ID >= 50607
+#  define MRN_ITEM_HAVE_ITEM_NAME
+#endif
+
 #if MYSQL_VERSION_ID < 50600
 #  define MRN_RBR_UPDATE_NEED_ALL_COLUMNS
 #endif
-------------- next part --------------
HTML����������������������������...
Download 



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