[Groonga-mysql-commit] mroonga/mroonga [master] [storage] add storage_ prefix to store_XXX.

Back to archive index

null+****@clear***** null+****@clear*****
2012年 1月 23日 (月) 15:44:38 JST


Kouhei Sutou	2012-01-23 15:44:38 +0900 (Mon, 23 Jan 2012)

  New Revision: efdb8d88f35ae3e6d92e830f188a254124a64ce1

  Log:
    [storage] add storage_ prefix to store_XXX.

  Modified files:
    ha_mroonga.cc
    ha_mroonga.h

  Modified: ha_mroonga.cc (+13 -13)
===================================================================
--- ha_mroonga.cc    2012-01-23 15:41:43 +0900 (1709db4)
+++ ha_mroonga.cc    2012-01-23 15:44:38 +0900 (dd13362)
@@ -3859,7 +3859,7 @@ int ha_mroonga::storage_rnd_pos(uchar *buf, uchar *pos)
 {
   MRN_DBUG_ENTER_METHOD();
   record_id = *((grn_id*) pos);
-  store_to_fields_from_primary_table(buf, record_id);
+  storage_store_to_fields_from_primary_table(buf, record_id);
   DBUG_RETURN(0);
 }
 
@@ -5335,7 +5335,7 @@ int ha_mroonga::storage_index_read_map(uchar *buf, const uchar *key,
       if (strncmp(MRN_COLUMN_NAME_ID, column_name, column_name_size) == 0) {
         grn_id found_record_id = *(grn_id *)key_min[key_nr];
         if (grn_table_at(ctx, grn_table, found_record_id) != GRN_ID_NIL) { // found
-          store_to_fields_from_primary_table(buf, found_record_id);
+          storage_store_to_fields_from_primary_table(buf, found_record_id);
           table->status = 0;
           record_id = found_record_id;
           DBUG_RETURN(0);
@@ -5853,8 +5853,8 @@ int ha_mroonga::storage_read_range_first(const key_range *start_key,
         if (strncmp(MRN_COLUMN_NAME_ID, column_name, column_name_size) == 0) {
           grn_id found_record_id = *(grn_id *)key_min[active_index];
           if (grn_table_at(ctx, grn_table, found_record_id) != GRN_ID_NIL) { // found
-            store_to_fields_from_primary_table(table->record[0],
-                                               found_record_id);
+            storage_store_to_fields_from_primary_table(table->record[0],
+                                                       found_record_id);
             table->status = 0;
             cursor = NULL;
             record_id = found_record_id;
@@ -6300,7 +6300,7 @@ int ha_mroonga::storage_ft_read(uchar *buf)
     grn_table_cursor_get_key(ctx, cursor, &key);
     record_id = *((grn_id *)key);
   }
-  store_to_fields_from_primary_table(buf, record_id);
+  storage_store_to_fields_from_primary_table(buf, record_id);
   DBUG_RETURN(0);
 }
 
@@ -6668,9 +6668,9 @@ int ha_mroonga::storage_get_next_record(uchar *buf)
   }
   if (buf) {
     if (keyread)
-      store_to_fields_from_index(buf);
+      storage_store_to_fields_from_index(buf);
     else
-      store_to_fields_from_primary_table(buf, record_id);
+      storage_store_to_fields_from_primary_table(buf, record_id);
     if (cursor_geo && grn_source_column_geo) {
       int latitude, longitude;
       GRN_GEO_POINT_VALUE(&source_point, latitude, longitude);
@@ -7006,8 +7006,8 @@ void ha_mroonga::check_fast_order_limit(grn_table_sort_key **sort_keys,
   DBUG_VOID_RETURN;
 }
 
-void ha_mroonga::store_to_field(grn_obj *col, grn_id id, Field *field,
-                                void *key, int key_length)
+void ha_mroonga::storage_store_to_field(grn_obj *col, grn_id id, Field *field,
+                                        void *key, int key_length)
 {
   grn_obj buf;
   mrn_change_encoding(ctx, field->charset());
@@ -7166,7 +7166,7 @@ void ha_mroonga::store_to_field(grn_obj *col, grn_id id, Field *field,
   grn_obj_unlink(ctx, &buf);
 }
 
-void ha_mroonga::store_to_fields_from_primary_table(uchar *buf, grn_id record_id)
+void ha_mroonga::storage_store_to_fields_from_primary_table(uchar *buf, grn_id record_id)
 {
   MRN_DBUG_ENTER_METHOD();
   DBUG_PRINT("info", ("mroonga: stored record ID: %d", record_id));
@@ -7200,7 +7200,7 @@ void ha_mroonga::store_to_fields_from_primary_table(uchar *buf, grn_id record_id
         field->store((int)record_id);
       } else {
         // actual column
-        store_to_field(grn_columns[i], record_id, field, NULL, 0);
+        storage_store_to_field(grn_columns[i], record_id, field, NULL, 0);
       }
       field->move_field_offset(-ptr_diff);
 #ifndef DBUG_OFF
@@ -7212,7 +7212,7 @@ void ha_mroonga::store_to_fields_from_primary_table(uchar *buf, grn_id record_id
   DBUG_VOID_RETURN;
 }
 
-void ha_mroonga::store_to_fields_from_index(uchar *buf)
+void ha_mroonga::storage_store_to_fields_from_index(uchar *buf)
 {
   MRN_DBUG_ENTER_METHOD();
   int key_length;
@@ -7231,7 +7231,7 @@ void ha_mroonga::store_to_fields_from_index(uchar *buf)
                                                       table->write_set);
 #endif
     field->move_field_offset(ptr_diff);
-    store_to_field(NULL, 0, field, key, key_length);
+    storage_store_to_field(NULL, 0, field, key, key_length);
     field->move_field_offset(-ptr_diff);
 #ifndef DBUG_OFF
     dbug_tmp_restore_column_map(table->write_set, tmp_map);

  Modified: ha_mroonga.h (+4 -4)
===================================================================
--- ha_mroonga.h    2012-01-23 15:41:43 +0900 (8362636)
+++ ha_mroonga.h    2012-01-23 15:44:38 +0900 (edbe1eb)
@@ -401,10 +401,10 @@ private:
   void check_fast_order_limit(grn_table_sort_key **sort_keys, int *n_sort_keys,
                               longlong *limit,
                               grn_obj *target_table, grn_obj *score_column);
-  void store_to_field(grn_obj *col, grn_id id, Field *field,
-                      void *key, int key_length);
-  void store_to_fields_from_primary_table(uchar *buf, grn_id record_id);
-  void store_to_fields_from_index(uchar *buf);
+  void storage_store_to_field(grn_obj *col, grn_id id, Field *field,
+                              void *key, int key_length);
+  void storage_store_to_fields_from_primary_table(uchar *buf, grn_id record_id);
+  void storage_store_to_fields_from_index(uchar *buf);
   void set_pk_bitmap();
   int wrapper_create(const char *name, TABLE *table,
                      HA_CREATE_INFO *info, MRN_SHARE *tmp_share);




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