[Groonga-mysql-commit] mroonga/mroonga at 5475f5f [master] Fix alter table with fulltext index which refer to table returns empty result on MySQL5.5 or MariaDB5.5

Back to archive index

Kenji Maruyama null+****@clear*****
Sat Feb 22 02:16:28 JST 2014


Kenji Maruyama	2014-02-22 02:16:28 +0900 (Sat, 22 Feb 2014)

  New Revision: 5475f5f30c1d27771750c65819f5b7f8496c7cce
  https://github.com/mroonga/mroonga/commit/5475f5f30c1d27771750c65819f5b7f8496c7cce

  Message:
    Fix alter table with fulltext index which refer to table returns empty result on MySQL5.5 or MariaDB5.5
    
    refs #2327
    
    [groonga-dev,02130]
    
    Reported by Naoya Murakami. Thanks!

  Modified files:
    ha_mroonga.cpp

  Modified: ha_mroonga.cpp (+16 -8)
===================================================================
--- ha_mroonga.cpp    2014-02-20 18:00:40 +0900 (3a6b31b)
+++ ha_mroonga.cpp    2014-02-22 02:16:28 +0900 (487d3b9)
@@ -13586,8 +13586,8 @@ int ha_mroonga::storage_add_index(TABLE *table_arg, KEY *key_info,
   MRN_ALLOCATE_VARIABLE_LENGTH_ARRAYS(grn_obj *, index_columns, num_of_keys + n_keys);
   MRN_SHARE *tmp_share;
   TABLE_SHARE tmp_table_share;
-  char **key_parser;
-  uint *key_parser_length;
+  char **index_table, **key_parser, **col_flags, **col_type;
+  uint *index_table_length, *key_parser_length, *col_flags_length, *col_type_length;
   bool have_multiple_column_index = false;
 
   MRN_DBUG_ENTER_METHOD();
@@ -13596,8 +13596,14 @@ int ha_mroonga::storage_add_index(TABLE *table_arg, KEY *key_info,
   if (!(tmp_share = (MRN_SHARE *)
     my_multi_malloc(MYF(MY_WME | MY_ZEROFILL),
       &tmp_share, sizeof(*tmp_share),
-      &key_parser, sizeof(char *) * (n_keys + num_of_keys),
-      &key_parser_length, sizeof(uint) * (n_keys + num_of_keys),
+      &index_table, sizeof(char*) *  tmp_table_share.keys,
+      &index_table_length, sizeof(uint) * tmp_table_share.keys,
+      &key_parser, sizeof(char *) * tmp_table_share.keys,
+      &key_parser_length, sizeof(uint) * tmp_table_share.keys,
+      &col_flags, sizeof(char *) * tmp_table_share.fields,
+      &col_flags_length, sizeof(uint) * tmp_table_share.fields,
+      &col_type, sizeof(char *) * tmp_table_share.fields,
+      &col_type_length, sizeof(uint) * tmp_table_share.fields,
       NullS))
   ) {
     MRN_FREE_VARIABLE_LENGTH_ARRAYS(index_tables);
@@ -13606,12 +13612,14 @@ int ha_mroonga::storage_add_index(TABLE *table_arg, KEY *key_info,
   }
   tmp_share->engine = NULL;
   tmp_share->table_share = &tmp_table_share;
-  tmp_share->index_table = NULL;
-  tmp_share->index_table_length = NULL;
+  tmp_share->index_table = index_table;
+  tmp_share->index_table_length = index_table_length;
   tmp_share->key_parser = key_parser;
   tmp_share->key_parser_length = key_parser_length;
-  tmp_share->col_flags = NULL;
-  tmp_share->col_type = NULL;
+  tmp_share->col_flags = col_flags;
+  tmp_share->col_flags_length = col_flags_length;
+  tmp_share->col_type = col_type;
+  tmp_share->col_type_length = col_type_length;
   bitmap_clear_all(table->read_set);
   mrn::PathMapper mapper(share->table_name);
   for (i = 0; i < num_of_keys; i++) {
-------------- next part --------------
HTML����������������������������...
Télécharger 



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