[MDEV-33286] Ones should be able to see in information_schema.tables if a table is encrypted Created: 2024-01-21  Updated: 2024-01-22

Status: Open
Project: MariaDB Server
Component/s: Encryption
Affects Version/s: 10.6
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: Michael Widenius Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None


 Description   

Currently information_schema.tables does not contain encryption options in some cases.

This is needed to ensure that logical tools like mysqldump + mysqlimport will create the new tables encrypted if the original was encrypted.
(Unfortunately the mysqldump output will not be encrypted, but this is a separate issue).

Having the encryption option in information_schema.tables will also make it easier to quickly check which tables are encrypted and which are not.

Currently one will get the encryption option in CREATE_OPTIONS in the case of:
CREATE TABLE t1 (a int) engine=innodb encryption=yes;

However in the following case it will not be shown:
SET GLOBAL innodb_encrypt_tables = ON;
CREATE TABLE t1 (a int) engine=innodb;

Suggested fix:

  • Add `encrypted`=yes last to CREATE_OPTIONS for encrypted tables if the option is not already there.


 Comments   
Comment by Sergei Golubchik [ 2024-01-22 ]

No, the current behavior is intentional. encrypted=yes means always encrypt, independently from innodb_encrypt_tables, encrypted=no means never encrypt, encrypted=default means do what innodb_encrypt_tables says.

That is, it's a good idea to show in information_schema.tables whether a table is encrypted. But not by pretending that is has encrypted=yes.

Generated at Thu Feb 08 10:37:47 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.