From 602c803bd9c80e88d4e2a611422ad2da0033a111 Mon Sep 17 00:00:00 2001 From: Monty Date: Fri, 9 Oct 2015 13:02:55 +0300 Subject: [PATCH] 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 --- BUILD/SETUP.sh | 2 +- cmake/configure.pl | 2 +- plugin/file_key_management/file_key_management_plugin.cc | 8 ++++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/BUILD/SETUP.sh b/BUILD/SETUP.sh index 8948cf2158c..065422459b1 100755 --- a/BUILD/SETUP.sh +++ b/BUILD/SETUP.sh @@ -205,7 +205,7 @@ fi max_no_embedded_configs="$SSL_LIBRARY --with-plugins=max" max_no_qc_configs="$SSL_LIBRARY --with-plugins=max --without-query-cache" -max_configs="$SSL_LIBRARY --with-plugins=max --with-embedded-server --with-libevent" +max_configs="$SSL_LIBRARY --with-plugins=max --with-embedded-server --with-libevent --without-plugin=plugin_file_key_management" all_configs="$SSL_LIBRARY --with-plugins=max --with-embedded-server --with-innodb_plugin --with-libevent" # diff --git a/cmake/configure.pl b/cmake/configure.pl index b528cda70dc..d9ca3f34e59 100644 --- a/cmake/configure.pl +++ b/cmake/configure.pl @@ -135,7 +135,7 @@ foreach my $option (@ARGV) $cmakeargs = $cmakeargs." -DWITH_EXTRA_CHARSETS=".$charsets; next; } - if($option =~ /without-plugin=/) + if($option =~ /without-plugin=/ || $option =~ /without-plugin-/) { $cmakeargs = $cmakeargs." -DWITHOUT_".uc(substr($option,15))."=1"; next; diff --git a/plugin/file_key_management/file_key_management_plugin.cc b/plugin/file_key_management/file_key_management_plugin.cc index 970fae9c189..ffe4b940a4d 100644 --- a/plugin/file_key_management/file_key_management_plugin.cc +++ b/plugin/file_key_management/file_key_management_plugin.cc @@ -16,6 +16,7 @@ #include "parser.h" #include +#include #include static char* filename; @@ -165,6 +166,13 @@ struct st_mariadb_encryption file_key_management_plugin= { static int file_key_management_plugin_init(void *p) { + if (!filename || !filename[0]) + { + my_printf_error(ER_CANT_INITIALIZE_UDF, + "file_key_management-filename is not set", MYF(0)); + return 1; + } + Parser parser(filename, filekey); return parser.parse(&keys); }