From e6bad1c75dd3207f60afc42f8ec227ef8cef2cb4 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 23 Aug 2019 13:58:11 +0200 Subject: [PATCH] move Aria/S3 specific flag into Aria code it doesn't belong in include/my_base.h --- include/maria.h | 2 +- include/my_base.h | 1 - storage/maria/ha_maria.cc | 3 +-- storage/maria/ma_create.c | 3 +-- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/include/maria.h b/include/maria.h index bb3ca905eab..5ff76391270 100644 --- a/include/maria.h +++ b/include/maria.h @@ -152,7 +152,7 @@ typedef struct st_maria_create_info uint compression_algorithm; enum data_file_type org_data_file_type; uint16 language; - my_bool with_auto_increment, transactional; + my_bool with_auto_increment, transactional, encrypted; } MARIA_CREATE_INFO; struct st_maria_share; diff --git a/include/my_base.h b/include/my_base.h index c7cccaebf3a..e73844d0937 100644 --- a/include/my_base.h +++ b/include/my_base.h @@ -368,7 +368,6 @@ enum ha_base_keytype { #define HA_CREATE_INTERNAL_TABLE 256U #define HA_PRESERVE_INSERT_ORDER 512U #define HA_CREATE_NO_ROLLBACK 1024U -#define HA_CREATE_ENCRYPTED 2048U /* Flags used by start_bulk_insert */ diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc index f169698ce1a..7dc07a971b3 100644 --- a/storage/maria/ha_maria.cc +++ b/storage/maria/ha_maria.cc @@ -3165,8 +3165,7 @@ int ha_maria::create(const char *name, TABLE *table_arg, (void) translog_log_debug_info(0, LOGREC_DEBUG_INFO_QUERY, (uchar*) thd->query(), thd->query_length()); - if (maria_encrypt_tables && ht == maria_hton) - create_flags|= HA_CREATE_ENCRYPTED; + create_info.encrypted= maria_encrypt_tables && ht == maria_hton; /* TODO: Check that the following fn_format is really needed */ error= maria_create(fn_format(buff, name, "", "", diff --git a/storage/maria/ma_create.c b/storage/maria/ma_create.c index 01e54c300d0..06139ed564d 100644 --- a/storage/maria/ma_create.c +++ b/storage/maria/ma_create.c @@ -95,8 +95,7 @@ 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= ((flags & HA_CREATE_ENCRYPTED) && - datafile_type == BLOCK_RECORD); + my_bool encrypted= ci->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");