1SET @start_global_value = @@global.encrypt_tmp_disk_tables;
2select @@global.encrypt_tmp_disk_tables;
3@@global.encrypt_tmp_disk_tables
40
5select @@session.encrypt_tmp_disk_tables;
6ERROR HY000: Variable 'encrypt_tmp_disk_tables' is a GLOBAL variable
7show global variables like 'encrypt_tmp_disk_tables';
8Variable_name	Value
9encrypt_tmp_disk_tables	OFF
10show session variables like 'encrypt_tmp_disk_tables';
11Variable_name	Value
12encrypt_tmp_disk_tables	OFF
13select * from information_schema.global_variables
14where variable_name='encrypt_tmp_disk_tables';
15VARIABLE_NAME	VARIABLE_VALUE
16ENCRYPT_TMP_DISK_TABLES	OFF
17select * from information_schema.session_variables
18where variable_name='encrypt_tmp_disk_tables';
19VARIABLE_NAME	VARIABLE_VALUE
20ENCRYPT_TMP_DISK_TABLES	OFF
21set global encrypt_tmp_disk_tables=ON;
22select @@global.encrypt_tmp_disk_tables;
23@@global.encrypt_tmp_disk_tables
241
25set global encrypt_tmp_disk_tables=OFF;
26select @@global.encrypt_tmp_disk_tables;
27@@global.encrypt_tmp_disk_tables
280
29set global encrypt_tmp_disk_tables=1;
30select @@global.encrypt_tmp_disk_tables;
31@@global.encrypt_tmp_disk_tables
321
33set session encrypt_tmp_disk_tables=1;
34ERROR HY000: Variable 'encrypt_tmp_disk_tables' is a GLOBAL variable and should be set with SET GLOBAL
35set global encrypt_tmp_disk_tables=1.1;
36ERROR 42000: Incorrect argument type to variable 'encrypt_tmp_disk_tables'
37set global encrypt_tmp_disk_tables=1e1;
38ERROR 42000: Incorrect argument type to variable 'encrypt_tmp_disk_tables'
39set global encrypt_tmp_disk_tables="foo";
40ERROR 42000: Variable 'encrypt_tmp_disk_tables' can't be set to the value of 'foo'
41SET @@global.encrypt_tmp_disk_tables = @start_global_value;
42