[Groonga-mysql-commit] mroonga/mroonga at 470865e [master] storage: fix a crash bug by renaming column by "ALTER TABLE CHANGE"

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Jul 24 23:19:28 JST 2014


Kouhei Sutou	2014-07-24 23:19:28 +0900 (Thu, 24 Jul 2014)

  New Revision: 470865e2ad4281af04741b4614ece86b7b944ee1
  https://github.com/mroonga/mroonga/commit/470865e2ad4281af04741b4614ece86b7b944ee1

  Message:
    storage: fix a crash bug by renaming column by "ALTER TABLE CHANGE"
    
    Redmine: fixes #2637

  Modified files:
    ha_mroonga.cpp

  Modified: ha_mroonga.cpp (+10 -1)
===================================================================
--- ha_mroonga.cpp    2014-07-24 15:08:52 +0900 (80c817c)
+++ ha_mroonga.cpp    2014-07-24 23:19:28 +0900 (3c96fd5)
@@ -12827,7 +12827,16 @@ bool ha_mroonga::storage_check_if_incompatible_data(
   HA_CREATE_INFO *create_info, uint table_changes)
 {
   MRN_DBUG_ENTER_METHOD();
-  DBUG_RETURN(COMPATIBLE_DATA_YES);
+  bool is_incompatible = COMPATIBLE_DATA_YES;
+  uint n = table_share->fields;
+  for (uint i = 0; i < n; i++) {
+    Field *field = table->field[i];
+    if (field->flags & FIELD_IS_RENAMED) {
+      is_incompatible = COMPATIBLE_DATA_NO;
+      break;
+    }
+  }
+  DBUG_RETURN(is_incompatible);
 }
 
 bool ha_mroonga::check_if_incompatible_data(
-------------- next part --------------
HTML����������������������������...
Download 



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