summaryrefslogtreecommitdiff
path: root/sql/mf_iocache_encr.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-05-27 12:08:13 +0200
committerSergei Golubchik <serg@mariadb.org>2015-06-02 18:53:37 +0200
commit432b78c90376aac4fda94317fd20eced33d08230 (patch)
tree400b6d9bd928cc2dd0d7be000910b0c2ce9a59b5 /sql/mf_iocache_encr.cc
parentd9340d6c8e1b227044fc90bc40c5da1d1f6b0dcc (diff)
downloadmariadb-git-432b78c90376aac4fda94317fd20eced33d08230.tar.gz
just like tempfiles: use key id 2 for temp Aria tables
introduce ENCRYPTION_KEY_SYSTEM_DATA and ENCRYPTION_KEY_TEMPORARY_DATA constants; use them everywhere.
Diffstat (limited to 'sql/mf_iocache_encr.cc')
-rw-r--r--sql/mf_iocache_encr.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/mf_iocache_encr.cc b/sql/mf_iocache_encr.cc
index 0a72492d743..8d1f609a1de 100644
--- a/sql/mf_iocache_encr.cc
+++ b/sql/mf_iocache_encr.cc
@@ -232,9 +232,13 @@ void init_io_cache_encryption()
{
if (encrypt_tmp_files)
{
- keyver= encryption_key_get_latest_version(keyid= 2);
+ keyid= ENCRYPTION_KEY_TEMPORARY_DATA;
+ keyver= encryption_key_get_latest_version(keyid);
if (keyver == ENCRYPTION_KEY_VERSION_INVALID)
- keyver= encryption_key_get_latest_version(keyid= 1);
+ {
+ keyid= ENCRYPTION_KEY_SYSTEM_DATA;
+ keyver= encryption_key_get_latest_version(keyid);
+ }
}
else
keyver= ENCRYPTION_KEY_VERSION_INVALID;