diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2021-08-02 11:41:00 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2021-08-02 11:41:00 +0200 |
commit | 7f264997dd21c5126350a9a5f0cc0960afdd1229 (patch) | |
tree | ff937359abac9b26e72d96d2b00c93db8c46fff8 /sql | |
parent | 1423cf5e3dcb3c50047f086a5933fe77006cf242 (diff) | |
parent | b549af69137023ce0f93d312a10d61e467dca07f (diff) | |
download | mariadb-git-7f264997dd21c5126350a9a5f0cc0960afdd1229.tar.gz |
Merge branch '10.2' into 10.3mariadb-10.3.31
Diffstat (limited to 'sql')
-rw-r--r-- | sql/table.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sql/table.cc b/sql/table.cc index 00db9d7135a..be734b734bc 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -3436,6 +3436,21 @@ enum open_frm_error open_table_from_share(THD *thd, TABLE_SHARE *share, /* Update to use trigger fields */ switch_defaults_to_nullable_trigger_fields(outparam); + + for (uint k= 0; k < share->keys; k++) + { + KEY &key_info= outparam->key_info[k]; + uint parts = (share->use_ext_keys ? key_info.ext_key_parts : + key_info.user_defined_key_parts); + for (uint p= 0; p < parts; p++) + { + KEY_PART_INFO &kp= key_info.key_part[p]; + if (kp.field != outparam->field[kp.fieldnr - 1]) + { + kp.field->vcol_info = outparam->field[kp.fieldnr - 1]->vcol_info; + } + } + } } #ifdef WITH_PARTITION_STORAGE_ENGINE |