[Groonga-mysql-commit] mroonga/mroonga at 7fd1e46 [master] mariadb10.3: follow Item::name type change

Back to archive index

Kouhei Sutou null+****@clear*****
Sun Dec 24 13:11:48 JST 2017


Kouhei Sutou	2017-12-24 13:11:48 +0900 (Sun, 24 Dec 2017)

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

  Message:
    mariadb10.3: follow Item::name type change
    
    const char * -> LEX_CSTRING.

  Modified files:
    lib/mrn_condition_converter.cpp
    mrn_mysql_compat.h

  Modified: lib/mrn_condition_converter.cpp (+8 -2)
===================================================================
--- lib/mrn_condition_converter.cpp    2017-12-24 02:24:18 +0900 (72d35608)
+++ lib/mrn_condition_converter.cpp    2017-12-24 13:11:48 +0900 (10c358f7)
@@ -29,9 +29,15 @@
 #  define MRN_ITEM_FIELD_GET_NAME_LENGTH(item)  \
   (static_cast<int>(item->item_name.length()))
 #else
-#  define MRN_ITEM_FIELD_GET_NAME(item)        ((item)->name)
-#  define MRN_ITEM_FIELD_GET_NAME_LENGTH(item)  \
+#  ifdef MRN_ITEM_ITEM_NAME_IS_LEX_STRING
+#    define MRN_ITEM_FIELD_GET_NAME(item)        ((item)->name.str)
+#    define MRN_ITEM_FIELD_GET_NAME_LENGTH(item)        \
+  (static_cast<int>((item)->name.length))
+#  else
+#    define MRN_ITEM_FIELD_GET_NAME(item)        ((item)->name)
+#    define MRN_ITEM_FIELD_GET_NAME_LENGTH(item)        \
   (static_cast<int>(strlen((item)->name)))
+#  endif
 #endif
 
 namespace mrn {

  Modified: mrn_mysql_compat.h (+4 -0)
===================================================================
--- mrn_mysql_compat.h    2017-12-24 02:24:18 +0900 (d5e1b5d8)
+++ mrn_mysql_compat.h    2017-12-24 13:11:48 +0900 (86305e83)
@@ -193,6 +193,10 @@
 #  define MRN_ITEM_HAVE_ITEM_NAME
 #endif
 
+#if MYSQL_VERSION_ID >= 100302 && defined(MRN_MARIADB_P)
+#  define MRN_ITEM_ITEM_NAME_IS_LEX_STRING
+#endif
+
 #if MYSQL_VERSION_ID < 100000
 #  define MRN_HAVE_TABLE_DEF_CACHE
 #endif
-------------- next part --------------
HTML����������������������������...
URL: https://lists.osdn.me/mailman/archives/groonga-mysql-commit/attachments/20171224/257f01da/attachment.htm 



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