null+****@clear*****
null+****@clear*****
2011年 6月 18日 (土) 20:31:28 JST
Kentoku 2011-06-18 11:31:28 +0000 (Sat, 18 Jun 2011)
New Revision: 61169bec51657638a1344be8b3b9e47c492fa0be
Log:
add set pk bitmap
Modified files:
ha_mroonga.cc
ha_mroonga.h
Modified: ha_mroonga.cc (+12 -0)
===================================================================
--- ha_mroonga.cc 2011-06-18 11:19:54 +0000 (8683df5)
+++ ha_mroonga.cc 2011-06-18 11:31:28 +0000 (dd7bee6)
@@ -5028,6 +5028,18 @@ bool ha_mroonga::is_fatal_error(int error_num, uint flags)
DBUG_RETURN(default_is_fatal_error(error_num, flags));
}
+void ha_mroonga::set_pk_bitmap()
+{
+ KEY key_info = table->key_info[table_share->primary_key];
+ uint j;
+ MRN_DBUG_ENTER_METHOD();
+ for (j = 0; j < key_info.key_parts; j++) {
+ Field *field = key_info.key_part[j].field;
+ bitmap_set_bit(table->read_set, field->field_index);
+ }
+ DBUG_VOID_RETURN;
+}
+
#ifdef __cplusplus
}
#endif
Modified: ha_mroonga.h (+7 -10)
===================================================================
--- ha_mroonga.h 2011-06-18 11:19:54 +0000 (1c12605)
+++ ha_mroonga.h 2011-06-18 11:31:28 +0000 (f88c985)
@@ -32,8 +32,6 @@ extern "C" {
#include <groonga.h>
#include "mrn_sys.h"
-class ha_mroonga;
-
/* structs */
struct st_mrn_statuses
{
@@ -46,13 +44,12 @@ struct st_mrn_ft_info
struct _ft_vft *please;
grn_ctx *ctx;
grn_obj *result;
- grn_table_cursor *cursor;
- grn_id record_id;
+ grn_id rid;
};
struct st_mrn_slot_data
{
- grn_id last_insert_record_id;
+ grn_id last_insert_rid;
};
/* handler class */
@@ -64,7 +61,7 @@ class ha_mroonga: public handler
MRN_SHARE *share;
KEY *wrap_key_info;
KEY *base_key_info;
- key_part_map pk_keypart_map;
+ key_part_map pk_keypart_map
MEM_ROOT mem_root;
public:
handler *wrap_handler;
@@ -85,11 +82,10 @@ private:
grn_obj *result0;
grn_table_cursor *cur;
grn_table_cursor *cur0;
- grn_id record_id;
+ grn_id row_id;
grn_obj *_score;
st_mrn_ft_info mrn_ft_info;
- st_mrn_ft_info *wrapper_ft_info;
char **key_min;
char **key_max;
@@ -167,7 +163,7 @@ public:
int read_range_next();
int ft_init();
- void ft_end();
+ void ft_end()
FT_INFO *ft_init_ext(uint flags, uint inx, String *key);
int ft_read(uchar *buf);
@@ -215,7 +211,8 @@ private:
void check_count_skip(key_part_map start_key_part_map,
key_part_map end_key_part_map, bool fulltext);
void check_fast_order_limit();
- void store_fields_from_primary_table(uchar *buf, grn_id record_id);
+ void store_fields_from_primary_table(uchar *buf, grn_id rid);
+ void set_pk_bitmap();
int wrapper_create(const char *name, TABLE *table,
HA_CREATE_INFO *info, MRN_SHARE *tmp_share);
int default_create(const char *name, TABLE *table,