[Groonga-mysql-commit] mroonga/mroonga [fix-for-visual-studio] initialize st_mrn_slot_data.last_insert_record_id.

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Oct 4 10:41:32 JST 2012


Kouhei Sutou	2011-11-26 16:38:42 +0900 (Sat, 26 Nov 2011)

  New Revision: 12ab07fefd29b786d5e35d8020b3494f5125a068
  https://github.com/mroonga/mroonga/commit/12ab07fefd29b786d5e35d8020b3494f5125a068

  Log:
    initialize st_mrn_slot_data.last_insert_record_id.

  Modified files:
    ha_mroonga.cc
    mrn_table.cc
    mrn_table.h

  Modified: ha_mroonga.cc (+1 -1)
===================================================================
--- ha_mroonga.cc    2011-11-26 16:12:47 +0900 (2d73f62)
+++ ha_mroonga.cc    2011-11-26 16:38:42 +0900 (cee47b0)
@@ -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);

  Modified: mrn_table.cc (+1 -0)
===================================================================
--- mrn_table.cc    2011-11-26 16:12:47 +0900 (47b2517)
+++ mrn_table.cc    2011-11-26 16:38:42 +0900 (23b7c4c)
@@ -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);

  Modified: mrn_table.h (+3 -1)
===================================================================
--- mrn_table.h    2011-11-26 16:12:47 +0900 (a0509a1)
+++ mrn_table.h    2011-11-26 16:38:42 +0900 (b62409b)
@@ -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
@@ -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;
 };
 
-------------- next part --------------
HTML����������������������������...
Download 



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