Commit eb594c67 authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

refs #5607 hot text/blob expansion

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@48858 c7de825b-a66e-492c-adef-691d508d4ae1
parent 50213f40
......@@ -926,6 +926,19 @@ change_field_type_is_supported(Field *old_field, Field *new_field, TABLE *table,
// varchar(X) -> varchar(Y) and varbinary(X) -> varbinary(Y) expansion where X < 256 <= Y
// the ALTER_COLUMN_TYPE handler flag is set for these cases
return change_varchar_length_is_supported(old_field, new_field, table, altered_table, ha_alter_info, ctx);
} else if (old_type == MYSQL_TYPE_BLOB) {
// blob -> longer blob
if (new_type == MYSQL_TYPE_BLOB && old_field->binary() && new_field->binary() &&
old_field->pack_length() <= new_field->pack_length()) {
return true;
}
// text -> longer text
if (new_type == MYSQL_TYPE_BLOB && !old_field->binary() && !new_field->binary() &&
old_field->pack_length() <= new_field->pack_length() &&
old_field->charset()->number == new_field->charset()->number) {
return true;
}
return false;
} else
return false;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment