Commit 2633b088 authored by marko's avatar marko

branches/zip: ha_innobase::create(): Do not test create_info->used_fields

before testing create_info->avg_row_length, because otherwise the table
would be converted to uncompressed format by CREATE INDEX and possibly
other statements.
parent ec06cfdb
...@@ -4797,12 +4797,10 @@ ha_innobase::create( ...@@ -4797,12 +4797,10 @@ ha_innobase::create(
if (form->s->row_type != ROW_TYPE_REDUNDANT) { if (form->s->row_type != ROW_TYPE_REDUNDANT) {
flags |= DICT_TF_COMPACT; flags |= DICT_TF_COMPACT;
#if 1 /* TODO: implement a proper way to specify zip_size */ #if 1 /* TODO: implement a proper way to specify zip_size */
if (create_info->used_fields & HA_CREATE_USED_AVG_ROW_LENGTH) { switch (create_info->avg_row_length) {
switch (create_info->avg_row_length) { case 1: case 2: case 4: case 8: case 16:
case 1: case 2: case 4: case 8: case 16: flags |= create_info->avg_row_length
flags |= create_info->avg_row_length << DICT_TF_COMPRESSED_SHIFT;
<< DICT_TF_COMPRESSED_SHIFT;
}
} }
#endif #endif
} }
......
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