diff options
author | Varun Gupta <varun.gupta@mariadb.com> | 2021-01-29 00:27:19 +0530 |
---|---|---|
committer | Varun Gupta <varun.gupta@mariadb.com> | 2021-01-30 14:41:43 +0530 |
commit | b87c342da5e51e112e06b36d8b95037f182bdb0e (patch) | |
tree | 2703129479836c5322303591becc3b77d20209e8 /sql/table.h | |
parent | 0921656734c25143d6070a75a1cbbee58fa42753 (diff) | |
download | mariadb-git-b87c342da5e51e112e06b36d8b95037f182bdb0e.tar.gz |
MDEV-11172: EXPLAIN shows non-sensical value for key_len with type=index
The issue happens when the secondary keys are extended with primary
key parts. Inside the function TABLE_SHARE::init_from_binary_frm_image()
adds the length bytes for the primary key key parts to the length of the
secondary key. This is not needed because when the extended keys are
used we recalculate the length for the used key parts.
Also removed TABLE_SHARE::total_key_length as it is not used in the code
Apporved-by: Monty <monty@mariadb.org>
Diffstat (limited to 'sql/table.h')
-rw-r--r-- | sql/table.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/table.h b/sql/table.h index a5d412c2c08..83c72f76831 100644 --- a/sql/table.h +++ b/sql/table.h @@ -773,7 +773,7 @@ struct TABLE_SHARE uint rec_buff_length; /* Size of table->record[] buffer */ uint keys, key_parts; uint ext_key_parts; /* Total number of key parts in extended keys */ - uint max_key_length, max_unique_length, total_key_length; + uint max_key_length, max_unique_length; uint uniques; /* Number of UNIQUE index */ uint db_create_options; /* Create options from database */ uint db_options_in_use; /* Options in use */ |