Debian Codegraph @

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

raw
1 # bool global
2 --source include/have_innodb.inc
3
4 SET @start_global_value = @@global.innodb_encrypt_tables;
5
6 #
7 # exists as global only
8 #
9 select @@global.innodb_encrypt_tables;
10 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
11 select @@session.innodb_encrypt_tables;
12 show global variables like 'innodb_encrypt_tables';
13 show session variables like 'innodb_encrypt_tables';
14 select * from information_schema.global_variables
15 where variable_name='innodb_encrypt_tables';
16 select * from information_schema.session_variables
17 where variable_name='innodb_encrypt_tables';
18
19 #
20 # show that it's writable
21 #
22 --error ER_WRONG_VALUE_FOR_VAR
23 set global innodb_encrypt_tables=ON;
24 show warnings;
25 select @@global.innodb_encrypt_tables;
26 set global innodb_encrypt_tables=OFF;
27 select @@global.innodb_encrypt_tables;
28 --error ER_WRONG_VALUE_FOR_VAR
29 set global innodb_encrypt_tables=1;
30 select @@global.innodb_encrypt_tables;
31 --error ER_GLOBAL_VARIABLE
32 set session innodb_encrypt_tables=1;
33
34 #
35 # incorrect types
36 #
37 --error ER_WRONG_TYPE_FOR_VAR
38 set global innodb_encrypt_tables=1.1;
39 --error ER_WRONG_TYPE_FOR_VAR
40 set global innodb_encrypt_tables=1e1;
41 --error ER_WRONG_VALUE_FOR_VAR
42 set global innodb_encrypt_tables="foo";
43
44 SET @@global.innodb_encrypt_tables = @start_global_value;