diff options
author | Alexander Barkov <bar@mariadb.com> | 2019-06-04 10:56:53 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2019-06-04 10:56:53 +0400 |
commit | 7966258a64abbd05319cdfb1bf3473cbdfc4f017 (patch) | |
tree | fc5196d3f7afd46f24d4cfcb78e8625b33c56915 /sql/sql_select.cc | |
parent | bf5a144e1692f6cc6a6d781b7e75ff4abf32bdf3 (diff) | |
download | mariadb-git-7966258a64abbd05319cdfb1bf3473cbdfc4f017.tar.gz |
MDEV-19345 Cleanup inconsistency in setting HA_(BLOB|VAR_LENGTH|BIT)_PART flags
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r-- | sql/sql_select.cc | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index e97abf3d981..12b522f67e3 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -18628,19 +18628,8 @@ bool Create_tmp_table::finalize(THD *thd, m_key_part_info->store_length+= HA_KEY_NULL_LENGTH; m_key_part_info->key_part_flag |= HA_NULL_PART; } - if ((*reg_field)->type() == MYSQL_TYPE_BLOB || - (*reg_field)->real_type() == MYSQL_TYPE_VARCHAR || - (*reg_field)->type() == MYSQL_TYPE_GEOMETRY) - { - if ((*reg_field)->type() == MYSQL_TYPE_BLOB || - (*reg_field)->type() == MYSQL_TYPE_GEOMETRY) - m_key_part_info->key_part_flag|= HA_BLOB_PART; - else - m_key_part_info->key_part_flag|= HA_VAR_LENGTH_PART; - - m_key_part_info->store_length+=HA_KEY_BLOB_LENGTH; - } - + m_key_part_info->key_part_flag|= (*reg_field)->key_part_flag(); + m_key_part_info->store_length+= (*reg_field)->key_part_length_bytes(); keyinfo->key_length+= m_key_part_info->store_length; m_key_part_info->type= (uint8) (*reg_field)->key_type(); |