From 1b5e5bdef31c5909fe98adc6a29a0bdc767da9aa Mon Sep 17 00:00:00 2001 From: Monty Date: Wed, 14 Aug 2019 00:18:58 +0300 Subject: MDEV-20306 Assert when converting encrypted Aria table to S3 Changes: - maria_create() now uses a bit in the parameter flags to check if table should be encrypted instead of using maria_encrypted_tables. - Don't encrypt tables that are to be converted to S3 - Added encrypted flag to ARIA_TABLE_CAPABILITIES - maria_chk --description now prints if table is encrypted. Other operations is not allowed on encrypted tables. --- storage/maria/ma_create.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'storage/maria/ma_create.c') diff --git a/storage/maria/ma_create.c b/storage/maria/ma_create.c index f683c64f346..01e54c300d0 100644 --- a/storage/maria/ma_create.c +++ b/storage/maria/ma_create.c @@ -95,7 +95,8 @@ int maria_create(const char *name, enum data_file_type datafile_type, my_bool forced_packed; myf sync_dir= 0; uchar *log_data= NULL; - my_bool encrypted= maria_encrypt_tables && datafile_type == BLOCK_RECORD; + my_bool encrypted= ((flags & HA_CREATE_ENCRYPTED) && + datafile_type == BLOCK_RECORD); my_bool insert_order= MY_TEST(flags & HA_PRESERVE_INSERT_ORDER); uint crypt_page_header_space= 0; DBUG_ENTER("maria_create"); -- cgit v1.2.1