[Groonga-mysql-commit] mroonga/mroonga [master] Remove unused functions

Back to archive index

null+****@clear***** null+****@clear*****
2012年 4月 10日 (火) 10:03:28 JST


Kouhei Sutou	2012-04-10 10:03:28 +0900 (Tue, 10 Apr 2012)

  New Revision: 3eefa383a2f0b079fee3bacd5d01e58908fe074c

  Log:
    Remove unused functions
    
    mrn_encode() and mrn_decode()

  Modified files:
    mrn_table.cpp
    mrn_table.hpp

  Modified: mrn_table.cpp (+0 -61)
===================================================================
--- mrn_table.cpp    2012-04-10 10:00:41 +0900 (6845152)
+++ mrn_table.cpp    2012-04-10 10:03:28 +0900 (8dc055d)
@@ -862,67 +862,6 @@ void mrn_set_bitmap_by_key(MY_BITMAP *map, KEY *key_info)
   DBUG_VOID_RETURN;
 }
 
-uint mrn_encode(char *buf_st, char *buf_ed, const char *st, const char *ed)
-{
-  int res1, res2;
-  char *buf = buf_st;
-  my_wc_t wc;
-  my_charset_conv_mb_wc mb_wc = system_charset_info->cset->mb_wc;
-  my_charset_conv_wc_mb wc_mb = my_charset_filename.cset->wc_mb;
-  DBUG_ENTER("mrn_encode");
-  DBUG_PRINT("info", ("mroonga: in=%s", st));
-  buf_ed--;
-  for (; st < ed && buf < buf_ed; st += res1, buf += res2)
-  {
-    if ((res1 = (*mb_wc)(NULL, &wc, (uchar *) st, (uchar *) ed)) > 0)
-    {
-      if ((res2 = (*wc_mb)(NULL, wc, (uchar *) buf, (uchar *) buf_ed)) <= 0)
-      {
-        break;
-      }
-    } else if (res1 == MY_CS_ILSEQ)
-    {
-      *buf = *st;
-      res1 = 1;
-      res2 = 1;
-    } else {
-      break;
-    }
-  }
-  *buf = '\0';
-  DBUG_PRINT("info", ("mroonga: out=%s", buf_st));
-  DBUG_RETURN(buf - buf_st);
-}
-
-uint mrn_decode(char *buf_st, char *buf_ed, const char *st, const char *ed)
-{
-  int res;
-  char *buf = buf_st;
-  my_wc_t wc;
-  my_charset_conv_mb_wc mb_wc = my_charset_filename.cset->mb_wc;
-  DBUG_ENTER("mrn_decode");
-  DBUG_PRINT("info", ("mroonga: in=%s", st));
-  buf_ed--;
-  for (; st < ed && buf < buf_ed; st += res)
-  {
-    if ((res = (*mb_wc)(NULL, &wc, (uchar *) st, (uchar *) ed)) > 0)
-    {
-      for (; wc; buf++, wc >>= 8)
-        *buf = (uchar)(wc & 0xff);
-    } else if (res == MY_CS_ILSEQ)
-    {
-      *buf = *st;
-      buf++;
-      res = 1;
-    } else {
-      break;
-    }
-  }
-  *buf = '\0';
-  DBUG_PRINT("info", ("mroonga: out=%s", buf_st));
-  DBUG_RETURN(buf - buf_st);
-}
-
 st_mrn_slot_data *mrn_get_slot_data(THD *thd, bool can_create)
 {
   DBUG_ENTER("mrn_get_slot_data");

  Modified: mrn_table.hpp (+0 -2)
===================================================================
--- mrn_table.hpp    2012-04-10 10:00:41 +0900 (cb7c741)
+++ mrn_table.hpp    2012-04-10 10:03:28 +0900 (710aced)
@@ -107,8 +107,6 @@ TABLE_SHARE *mrn_create_tmp_table_share(TABLE_LIST *table_list, const char *path
 void mrn_free_tmp_table_share(TABLE_SHARE *table_share);
 KEY *mrn_create_key_info_for_table(MRN_SHARE *share, TABLE *table, int *error);
 void mrn_set_bitmap_by_key(MY_BITMAP *map, KEY *key_info);
-uint mrn_encode(char *buf_st, char *buf_ed, const char *st, const char *ed);
-uint mrn_decode(char *buf_st, char *buf_ed, const char *st, const char *ed);
 st_mrn_slot_data *mrn_get_slot_data(THD *thd, bool can_create);
 void mrn_clear_alter_share(THD *thd);
 




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