WL#9531: InnoDB_New_DD: Enable table encryption and transparent compression
Affects: Server-8.0
—
Status: Complete
The worklog is to enable the encryption and transparent compression for newDD project. Currently, the encryption is a table property and indicated by a table flag: DICT_TF2_ENCRYPTION, and stored in InnoDB internal dictionary table sys_tables. So to support it in newDD, this flag needs to be a part of option field for the table. Which is stored in server dictionary, that is in the options field of mysql.tables. For compression, same as encryption, there is also a option in mysql.tables. Actually, server layer has already store these table options to New DD. We just need to get them from New DD by API, and set it to table object. Other aspect of the code should remain to be the same.
Encryption and Compression works fine in the New DD environments.
1: For create table, call New DD API to get the encryption and compression options , and set them into dict_table_t object accordingly. 2: For alter table, also need to get these options and set.
1: Get encryption and comppression options in creating table. ........ dd_part->table().options().get("compress", compress); dd_part->table().options().get("encrypt_type", encrypt); ........ 2: Set them into the dict_table_t object. ........ if (is_encrypted) { DICT_TF2_FLAG_SET(m_table, DICT_TF2_ENCRYPTION); } ........
Copyright (c) 2000, 2024, Oracle Corporation and/or its affiliates. All rights reserved.