summaryrefslogtreecommitdiff
path: root/storage/maria/ma_create.c
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2019-08-14 00:18:58 +0300
committerSergei Golubchik <serg@mariadb.org>2019-08-23 22:02:39 +0200
commit1b5e5bdef31c5909fe98adc6a29a0bdc767da9aa (patch)
tree2d9be76b9a165c0b47d8c1212ef8de946903fcd2 /storage/maria/ma_create.c
parentbb6d674df91c6e7f6ea8bb68c916593d02b16ab6 (diff)
downloadmariadb-git-1b5e5bdef31c5909fe98adc6a29a0bdc767da9aa.tar.gz
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.
Diffstat (limited to 'storage/maria/ma_create.c')
-rw-r--r--storage/maria/ma_create.c3
1 files changed, 2 insertions, 1 deletions
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");