[Groonga-mysql-commit] mroonga/mroonga [master] Remove needless code

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Nov 16 16:45:23 JST 2012


Kouhei Sutou	2012-11-16 16:45:23 +0900 (Fri, 16 Nov 2012)

  New Revision: 989027117814acc328f81c003ee0aafdf2477e97
  https://github.com/mroonga/mroonga/commit/989027117814acc328f81c003ee0aafdf2477e97

  Log:
    Remove needless code
    
    The index cursor counts exact number of records in range. We doesn't
    need estimate number of records in range.

  Modified files:
    ha_mroonga.cpp

  Modified: ha_mroonga.cpp (+0 -4)
===================================================================
--- ha_mroonga.cpp    2012-11-16 16:21:19 +0900 (7aa799b)
+++ ha_mroonga.cpp    2012-11-16 16:45:23 +0900 (6f5ec53)
@@ -6120,10 +6120,6 @@ ha_rows ha_mroonga::storage_records_in_range(uint key_nr, key_range *range_min,
     }
     grn_obj_unlink(ctx, index_cursor);
     grn_table_cursor_close(ctx, cursor);
-
-    uint table_size = grn_table_size(ctx, grn_table);
-    uint cardinality = grn_table_size(ctx, grn_index_tables[key_nr]);
-    row_count = ceil((double)table_size * ((double)row_count / (double)cardinality));
   }
   DBUG_RETURN(row_count);
 }
-------------- next part --------------
HTML����������������������������...
Download 



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