Commit 2943444a authored by unknown's avatar unknown

Fixed bug when comparing row types to see if file format has changed

parent 3e27ec4e
...@@ -2180,9 +2180,10 @@ enum row_type ha_maria::get_row_type() const ...@@ -2180,9 +2180,10 @@ enum row_type ha_maria::get_row_type() const
} }
static enum data_file_type maria_row_type(HA_CREATE_INFO *info) static enum data_file_type maria_row_type(HA_CREATE_INFO *info,
my_bool ignore_transactional)
{ {
if (info->transactional == HA_CHOICE_YES) if (info->transactional == HA_CHOICE_YES && ! ignore_transactional)
return BLOCK_RECORD; return BLOCK_RECORD;
switch (info->row_type) { switch (info->row_type) {
case ROW_TYPE_FIXED: return STATIC_RECORD; case ROW_TYPE_FIXED: return STATIC_RECORD;
...@@ -2215,7 +2216,7 @@ int ha_maria::create(const char *name, register TABLE *table_arg, ...@@ -2215,7 +2216,7 @@ int ha_maria::create(const char *name, register TABLE *table_arg,
} }
} }
/* Note: BLOCK_RECORD is used if table is transactional */ /* Note: BLOCK_RECORD is used if table is transactional */
row_type= maria_row_type(ha_create_info); row_type= maria_row_type(ha_create_info, 0);
if (ha_create_info->transactional == HA_CHOICE_YES && if (ha_create_info->transactional == HA_CHOICE_YES &&
ha_create_info->row_type != ROW_TYPE_PAGE && ha_create_info->row_type != ROW_TYPE_PAGE &&
ha_create_info->row_type != ROW_TYPE_NOT_USED && ha_create_info->row_type != ROW_TYPE_NOT_USED &&
...@@ -2396,7 +2397,7 @@ bool ha_maria::check_if_incompatible_data(HA_CREATE_INFO *create_info, ...@@ -2396,7 +2397,7 @@ bool ha_maria::check_if_incompatible_data(HA_CREATE_INFO *create_info,
if (create_info->auto_increment_value != stats.auto_increment_value || if (create_info->auto_increment_value != stats.auto_increment_value ||
create_info->data_file_name != data_file_name || create_info->data_file_name != data_file_name ||
create_info->index_file_name != index_file_name || create_info->index_file_name != index_file_name ||
(create_info->row_type != data_file_type && (maria_row_type(create_info, 1) != data_file_type &&
create_info->row_type != ROW_TYPE_DEFAULT) || create_info->row_type != ROW_TYPE_DEFAULT) ||
table_changes == IS_EQUAL_NO || table_changes == IS_EQUAL_NO ||
table_changes & IS_EQUAL_PACK_LENGTH) // Not implemented yet table_changes & IS_EQUAL_PACK_LENGTH) // Not implemented yet
......
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