Commit 6b066ec3 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-27235: Crash on SET GLOBAL innodb_encrypt_tables

fil_crypt_set_encrypt_tables(): If no encryption threads have been
initialized, do nothing.
parent 0745db71
......@@ -136,6 +136,7 @@ show tables;
Tables_in_test
create temporary table t1 (keyc int, c1 char(100), c2 char(100)) engine = innodb;
ERROR HY000: Can't create table `test`.`t1` (errno: 165 "Table is read only")
SET GLOBAL innodb_encrypt_tables=DEFAULT;
# test various bad start-up parameters
FOUND 2 /InnoDB: Unable to create temporary file/ in mysqld.1.err
FOUND 1 /innodb_temporary and innodb_system file names seem to be the same/ in mysqld.1.err
......
......@@ -121,6 +121,8 @@ show tables;
--error ER_CANT_CREATE_TABLE
create temporary table t1 (keyc int, c1 char(100), c2 char(100)) engine = innodb;
SET GLOBAL innodb_encrypt_tables=DEFAULT;
--echo # test various bad start-up parameters
let SEARCH_FILE = $MYSQLTEST_VARDIR/log/mysqld.1.err;
......
......@@ -2470,6 +2470,10 @@ void
fil_crypt_set_encrypt_tables(
uint val)
{
if (!fil_crypt_threads_inited) {
return;
}
mutex_enter(&fil_system->mutex);
srv_encrypt_tables = val;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment