diff options
Diffstat (limited to 'sql/table.cc')
| -rw-r--r-- | sql/table.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/table.cc b/sql/table.cc index ce7a34a8fe2..096711f851c 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -1029,7 +1029,7 @@ bool parse_vcol_defs(THD *thd, MEM_ROOT *mem_root, TABLE *table, while (pos < end) { uint type, expr_length; - if (table->s->mysql_version >= 100202) + if (table->s->frm_version >= FRM_VER_EXPRESSSIONS) { uint field_nr, name_length; /* see pack_expression() for how data is stored */ @@ -2270,7 +2270,7 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write, uint pk_part_length= key_first_info->key_part[i].store_length; if (keyinfo->ext_key_part_map & 1<<i) { - if (ext_key_length + pk_part_length > MAX_KEY_LENGTH) + if (ext_key_length + pk_part_length > MAX_DATA_LENGTH_FOR_KEY) { add_keyparts_for_this_key= i; break; @@ -2280,9 +2280,9 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write, } } - if (add_keyparts_for_this_key < (keyinfo->ext_key_parts - - keyinfo->user_defined_key_parts)) - { + if (add_keyparts_for_this_key < keyinfo->ext_key_parts - + keyinfo->user_defined_key_parts) + { share->ext_key_parts-= keyinfo->ext_key_parts; key_part_map ext_key_part_map= keyinfo->ext_key_part_map; keyinfo->ext_key_parts= keyinfo->user_defined_key_parts; |
