Skip to content

Commit 34e01f8

Browse files
committed
restore innodb_encrypt_tables validation function
that was apparently lost in 20c2304: commit 20c2304 Author: Jan Lindström <jan.lindstrom@mariadb.com> Date: Sun May 17 14:14:16 2015 +0300 MDEV-8164: Server crashes in pfs_mutex_enter_func after fil_crypt_is_closing This also reverts 8635c4b: commit 8635c4b Author: Jan Lindström <jan.lindstrom@mariadb.com> Date: Thu May 21 11:02:03 2015 +0300 Fix test failure.
1 parent 5443b9d commit 34e01f8

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

mysql-test/suite/sys_vars/r/innodb_encrypt_tables_basic.result

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,23 @@ where variable_name='innodb_encrypt_tables';
1919
VARIABLE_NAME VARIABLE_VALUE
2020
INNODB_ENCRYPT_TABLES OFF
2121
set global innodb_encrypt_tables=ON;
22+
ERROR 42000: Variable 'innodb_encrypt_tables' can't be set to the value of 'ON'
23+
show warnings;
24+
Level Code Message
25+
Warning 138 InnoDB: cannot enable encryption, encryption plugin is not available
26+
Error 1231 Variable 'innodb_encrypt_tables' can't be set to the value of 'ON'
2227
select @@global.innodb_encrypt_tables;
2328
@@global.innodb_encrypt_tables
24-
ON
29+
OFF
2530
set global innodb_encrypt_tables=OFF;
2631
select @@global.innodb_encrypt_tables;
2732
@@global.innodb_encrypt_tables
2833
OFF
2934
set global innodb_encrypt_tables=1;
35+
ERROR 42000: Variable 'innodb_encrypt_tables' can't be set to the value of '1'
3036
select @@global.innodb_encrypt_tables;
3137
@@global.innodb_encrypt_tables
32-
ON
38+
OFF
3339
set session innodb_encrypt_tables=1;
3440
ERROR HY000: Variable 'innodb_encrypt_tables' is a GLOBAL variable and should be set with SET GLOBAL
3541
set global innodb_encrypt_tables=1.1;

mysql-test/suite/sys_vars/t/innodb_encrypt_tables_basic.test

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,13 @@ where variable_name='innodb_encrypt_tables';
1919
#
2020
# show that it's writable
2121
#
22+
--error ER_WRONG_VALUE_FOR_VAR
2223
set global innodb_encrypt_tables=ON;
24+
show warnings;
2325
select @@global.innodb_encrypt_tables;
2426
set global innodb_encrypt_tables=OFF;
2527
select @@global.innodb_encrypt_tables;
28+
--error ER_WRONG_VALUE_FOR_VAR
2629
set global innodb_encrypt_tables=1;
2730
select @@global.innodb_encrypt_tables;
2831
--error ER_GLOBAL_VARIABLE

storage/innobase/handler/ha_innodb.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19201,7 +19201,7 @@ static MYSQL_SYSVAR_ENUM(encrypt_tables, srv_encrypt_tables,
1920119201
PLUGIN_VAR_OPCMDARG,
1920219202
"Enable encryption for tables. "
1920319203
"Don't forget to enable --innodb-encrypt-log too",
19204-
NULL,
19204+
innodb_encrypt_tables_validate,
1920519205
innodb_encrypt_tables_update,
1920619206
0,
1920719207
&srv_encrypt_tables_typelib);

storage/xtradb/handler/ha_innodb.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20383,7 +20383,7 @@ static MYSQL_SYSVAR_ENUM(encrypt_tables, srv_encrypt_tables,
2038320383
PLUGIN_VAR_OPCMDARG,
2038420384
"Enable encryption for tables. "
2038520385
"Don't forget to enable --innodb-encrypt-log too",
20386-
NULL,
20386+
innodb_encrypt_tables_validate,
2038720387
innodb_encrypt_tables_update,
2038820388
0,
2038920389
&srv_encrypt_tables_typelib);

0 commit comments

Comments
 (0)