Navigation Menu

Skip to content

Commit

Permalink
storage: fix a crash bug by renaming column by "ALTER TABLE CHANGE"
Browse files Browse the repository at this point in the history
Redmine: fixes #2637
  • Loading branch information
kou committed Jul 24, 2014
1 parent 3405d6f commit 470865e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion ha_mroonga.cpp
Expand Up @@ -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(
Expand Down

0 comments on commit 470865e

Please sign in to comment.