Skip to content

Commit 602c803

Browse files
committed
Don't enable file_key_management_plugin by default (as this gives warnings in the log)
Better warning from file_key_management plugin if filename is not given
1 parent c696fc7 commit 602c803

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

BUILD/SETUP.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ fi
205205

206206
max_no_embedded_configs="$SSL_LIBRARY --with-plugins=max"
207207
max_no_qc_configs="$SSL_LIBRARY --with-plugins=max --without-query-cache"
208-
max_configs="$SSL_LIBRARY --with-plugins=max --with-embedded-server --with-libevent"
208+
max_configs="$SSL_LIBRARY --with-plugins=max --with-embedded-server --with-libevent --without-plugin=plugin_file_key_management"
209209
all_configs="$SSL_LIBRARY --with-plugins=max --with-embedded-server --with-innodb_plugin --with-libevent"
210210

211211
#

cmake/configure.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ sub check_compiler
135135
$cmakeargs = $cmakeargs." -DWITH_EXTRA_CHARSETS=".$charsets;
136136
next;
137137
}
138-
if($option =~ /without-plugin=/)
138+
if($option =~ /without-plugin=/ || $option =~ /without-plugin-/)
139139
{
140140
$cmakeargs = $cmakeargs." -DWITHOUT_".uc(substr($option,15))."=1";
141141
next;

plugin/file_key_management/file_key_management_plugin.cc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
#include "parser.h"
1818
#include <mysql/plugin_encryption.h>
19+
#include <mysqld_error.h>
1920
#include <string.h>
2021

2122
static char* filename;
@@ -165,6 +166,13 @@ struct st_mariadb_encryption file_key_management_plugin= {
165166

166167
static int file_key_management_plugin_init(void *p)
167168
{
169+
if (!filename || !filename[0])
170+
{
171+
my_printf_error(ER_CANT_INITIALIZE_UDF,
172+
"file_key_management-filename is not set", MYF(0));
173+
return 1;
174+
}
175+
168176
Parser parser(filename, filekey);
169177
return parser.parse(&keys);
170178
}

0 commit comments

Comments
 (0)