[Groonga-mysql-commit] mroonga/mroonga [master] Use mrn::PathEncoder

Back to archive index

null+****@clear***** null+****@clear*****
2012年 4月 9日 (月) 18:32:44 JST


Kouhei Sutou	2012-04-09 18:32:44 +0900 (Mon, 09 Apr 2012)

  New Revision: 01a2daba4900244e54865b8df39695b97c2472e3

  Log:
    Use mrn::PathEncoder

  Modified files:
    Makefile.am
    ha_mroonga.cpp

  Modified: Makefile.am (+2 -1)
===================================================================
--- Makefile.am    2012-04-09 18:32:22 +0900 (86d3725)
+++ Makefile.am    2012-04-09 18:32:44 +0900 (6e494cb)
@@ -20,7 +20,8 @@ sources =					\
 	mrn_table.cpp
 
 libraries =					\
-	$(top_builddir)/lib/libmroonga.la
+	$(top_builddir)/lib/libmroonga.la	\
+	$(top_builddir)/lib/libmrn_need_mysql.la
 
 dynamic_plugin_ldflags  = -module $(GROONGA_LIBS)
 dynamic_plugin_cxxflags = $(AM_CXXFLAGS) $(MYSQL_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN

  Modified: ha_mroonga.cpp (+3 -4)
===================================================================
--- ha_mroonga.cpp    2012-04-09 18:32:22 +0900 (b2ded3a)
+++ ha_mroonga.cpp    2012-04-09 18:32:44 +0900 (bc9dba2)
@@ -44,6 +44,7 @@
 #include "mrn_table.hpp"
 #include "ha_mroonga.hpp"
 #include <mrn_path_mapper.hpp>
+#include <mrn_path_encoder.hpp>
 
 #define MRN_SHORT_TEXT_SIZE (1 << 12) //  4Kbytes
 #define MRN_TEXT_SIZE       (1 << 16) // 64Kbytes
@@ -306,10 +307,8 @@ static char *mrn_index_table_name_create(const char *table_name,
                                          char *dest)
 {
   MRN_DBUG_ENTER_FUNCTION();
-  char encode_name[MRN_MAX_PATH_SIZE];
-  mrn_encode(encode_name, encode_name + MRN_MAX_PATH_SIZE,
-             index_name, index_name + strlen(index_name));
-  mrn_index_table_name_gen(table_name, encode_name, dest);
+  mrn::PathEncoder encoder(index_name);
+  mrn_index_table_name_gen(table_name, encoder.path(), dest);
   DBUG_RETURN(dest);
 }
 




Groonga-mysql-commit メーリングリストの案内
Back to archive index