Navigation Menu

Skip to content

Commit

Permalink
initialize st_mrn_slot_data.last_insert_record_id.
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Nov 26, 2011
1 parent b78ca7e commit 12ab07f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ha_mroonga.cc
Expand Up @@ -3562,7 +3562,7 @@ int ha_mroonga::storage_write_row(uchar *buf)
#endif
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
}
slot_data->last_insert_record_id = (int) record_id;
slot_data->last_insert_record_id = record_id;

#ifndef DBUG_OFF
dbug_tmp_restore_column_map(table->read_set, tmp_map);
Expand Down
1 change: 1 addition & 0 deletions mrn_table.cc
Expand Up @@ -878,6 +878,7 @@ st_mrn_slot_data *mrn_get_slot_data(THD *thd, bool can_create)
(st_mrn_slot_data*) *thd_ha_data(thd, mrn_hton_ptr);
if (slot_data == NULL) {
slot_data = (st_mrn_slot_data*) malloc(sizeof(st_mrn_slot_data));
slot_data->last_insert_record_id = GRN_ID_NIL;
slot_data->first_alter_share = NULL;
*thd_ha_data(thd, mrn_hton_ptr) = (void *) slot_data;
pthread_mutex_lock(&mrn_allocated_thds_mutex);
Expand Down
4 changes: 3 additions & 1 deletion mrn_table.h
Expand Up @@ -21,6 +21,8 @@
#ifndef _mrn_table_h
#define _mrn_table_h

#include <groonga.h>

#if MYSQL_VERSION_ID >= 50500
#define my_free(A,B) my_free(A)
#endif
Expand Down Expand Up @@ -60,7 +62,7 @@ struct st_mrn_alter_share

struct st_mrn_slot_data
{
int last_insert_record_id;
grn_id last_insert_record_id;
st_mrn_alter_share *first_alter_share;
};

Expand Down

0 comments on commit 12ab07f

Please sign in to comment.