[Groonga-mysql-commit] mroonga/mroonga [fix-for-visual-studio] fix a bug of table name.

Back to archive index

Tetsuro IKEDA null+****@clear*****
Thu Oct 4 10:19:14 JST 2012


Tetsuro IKEDA	2009-07-21 20:01:15 +0900 (Tue, 21 Jul 2009)

  New Revision: 0e83f1bd44f30f2d3be6ee71d845e6d820a78eca
  https://github.com/mroonga/mroonga/commit/0e83f1bd44f30f2d3be6ee71d845e6d820a78eca

  Log:
    fix a bug of table name.

  Modified files:
    src/ha_groonga.cc
    src/ha_groonga.h

  Modified: src/ha_groonga.cc (+5 -5)
===================================================================
--- src/ha_groonga.cc    2009-07-21 19:42:57 +0900 (2abaf55)
+++ src/ha_groonga.cc    2009-07-21 20:01:15 +0900 (2588349)
@@ -248,7 +248,7 @@ int ha_groonga::create(const char *name, TABLE *form, HA_CREATE_INFO *info)
 {
   int res;
   mrn_info *minfo;
-  convert_info(this->table_share, &minfo);
+  convert_info(name, this->table_share, &minfo);
   res = mrn_create(ctx, minfo);
   mrn_deinit_obj_info(ctx, minfo);
   return res;
@@ -327,7 +327,7 @@ int ha_groonga::open(const char *name, int mode, uint test_if_locked)
   else
   {
     mrn_info *minfo;
-    convert_info(this->table_share, &minfo);
+    convert_info(name, this->table_share, &minfo);
     if (mrn_open(ctx, minfo) == 0)
     {
       mrn_hash_put(ctx, minfo->table->name, minfo);
@@ -818,12 +818,12 @@ int ha_groonga::ft_read(uchar *buf)
 }
 #endif
 
-int ha_groonga::convert_info(TABLE_SHARE *share, mrn_info **_minfo)
+int ha_groonga::convert_info(const char *name, TABLE_SHARE *share, mrn_info **_minfo)
 {
   uint n_columns = share->fields, i;
   mrn_info *minfo = mrn_init_obj_info(ctx, n_columns);
-  minfo->table->name = share->table_name.str;
-  minfo->table->name_size = share->table_name.length;
+  minfo->table->name = MRN_TABLE_NAME(name);
+  minfo->table->name_size = strlen(MRN_TABLE_NAME(name));
   minfo->table->flags |= GRN_OBJ_TABLE_NO_KEY;
 
   for (i=0; i < n_columns; i++)

  Modified: src/ha_groonga.h (+1 -1)
===================================================================
--- src/ha_groonga.h    2009-07-21 19:42:57 +0900 (cf79c69)
+++ src/ha_groonga.h    2009-07-21 20:01:15 +0900 (e577cf4)
@@ -64,7 +64,7 @@ public:
   int ft_read(uchar *buf);
 
   // additional functions
-  int convert_info(TABLE_SHARE *share, mrn_info **minfo);
+  int convert_info(const char *name, TABLE_SHARE *share, mrn_info **minfo);
 };
 
 #endif /* _ha_groonga_h */
-------------- next part --------------
HTML����������������������������...
Download 



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