• Varun Gupta's avatar
    MDEV-11172: EXPLAIN shows non-sensical value for key_len with type=index · b87c342d
    Varun Gupta authored
    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: default avatarMonty <monty@mariadb.org>
    b87c342d
table.cc 260 KB