diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index fd9e23dc32f..c95c7fc931e 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -3252,6 +3252,13 @@ innobase_init( } #endif + if ((srv_encrypt_tables || srv_encrypt_log) + && !encryption_key_id_exists(FIL_DEFAULT_ENCRYPTION_KEY)) { + sql_print_error("InnoDB: cannot enable encryption, " + "encryption plugin is not available"); + goto error; + } + os_innodb_umask = (ulint) my_umask; /* First calculate the default path for innodb_data_home_dir etc., diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc index 47659fb13b3..c0d35671574 100644 --- a/storage/xtradb/handler/ha_innodb.cc +++ b/storage/xtradb/handler/ha_innodb.cc @@ -3633,6 +3633,13 @@ innobase_init( } #endif + if ((srv_encrypt_tables || srv_encrypt_log) + && !encryption_key_id_exists(FIL_DEFAULT_ENCRYPTION_KEY)) { + sql_print_error("InnoDB: cannot enable encryption, " + "encryption plugin is not available"); + goto error; + } + os_innodb_umask = (ulint) my_umask; /* First calculate the default path for innodb_data_home_dir etc.,