| 1 |
SET @start_global_value = @@global.gtid_executed_compression_period; |
| 2 |
SELECT @start_global_value; |
| 3 |
@start_global_value |
| 4 |
0 |
| 5 |
# |
| 6 |
# It exists as a global variable |
| 7 |
# |
| 8 |
SELECT @@GLOBAL.gtid_executed_compression_period; |
| 9 |
@@GLOBAL.gtid_executed_compression_period |
| 10 |
0 |
| 11 |
SHOW GLOBAL VARIABLES LIKE 'gtid_executed_compression_period'; |
| 12 |
Variable_name Value |
| 13 |
gtid_executed_compression_period 0 |
| 14 |
SELECT * FROM performance_schema.global_variables WHERE |
| 15 |
VARIABLE_NAME = 'gtid_executed_compression_period'; |
| 16 |
VARIABLE_NAME VARIABLE_VALUE |
| 17 |
gtid_executed_compression_period 0 |
| 18 |
# |
| 19 |
# It is not a session variable |
| 20 |
# |
| 21 |
SELECT @@SESSION.gtid_executed_compression_period; |
| 22 |
ERROR HY000: Variable 'gtid_executed_compression_period' is a GLOBAL variable |
| 23 |
SET SESSION gtid_executed_compression_period= 2; |
| 24 |
ERROR HY000: Variable 'gtid_executed_compression_period' is a GLOBAL variable and should be set with SET GLOBAL |
| 25 |
SHOW SESSION VARIABLES LIKE 'gtid_executed_compression_period'; |
| 26 |
Variable_name Value |
| 27 |
gtid_executed_compression_period 0 |
| 28 |
SHOW SESSION VARIABLES LIKE 'gtid_executed_compression_period'; |
| 29 |
Variable_name Value |
| 30 |
gtid_executed_compression_period 0 |
| 31 |
SELECT * FROM performance_schema.session_variables WHERE |
| 32 |
VARIABLE_NAME ='gtid_executed_compression_period'; |
| 33 |
VARIABLE_NAME VARIABLE_VALUE |
| 34 |
gtid_executed_compression_period 0 |
| 35 |
# |
| 36 |
# Verify that it's writable |
| 37 |
# |
| 38 |
SET GLOBAL gtid_executed_compression_period= 0; |
| 39 |
SELECT @@GLOBAL.gtid_executed_compression_period; |
| 40 |
@@GLOBAL.gtid_executed_compression_period |
| 41 |
0 |
| 42 |
SET GLOBAL gtid_executed_compression_period= 5000; |
| 43 |
SELECT @@GLOBAL.gtid_executed_compression_period; |
| 44 |
@@GLOBAL.gtid_executed_compression_period |
| 45 |
5000 |
| 46 |
SET GLOBAL gtid_executed_compression_period= 4294967295; |
| 47 |
SELECT @@GLOBAL.gtid_executed_compression_period; |
| 48 |
@@GLOBAL.gtid_executed_compression_period |
| 49 |
4294967295 |
| 50 |
# |
| 51 |
# Verify that it could not bet set with invalid values |
| 52 |
# |
| 53 |
SET GLOBAL gtid_executed_compression_period= -1; |
| 54 |
Warnings: |
| 55 |
Warning 1292 Truncated incorrect gtid_executed_compression_period value: '-1' |
| 56 |
SELECT @@GLOBAL.gtid_executed_compression_period; |
| 57 |
@@GLOBAL.gtid_executed_compression_period |
| 58 |
0 |
| 59 |
SET GLOBAL gtid_executed_compression_period= 4294967296; |
| 60 |
Warnings: |
| 61 |
Warning 1292 Truncated incorrect gtid_executed_compression_period value: '4294967296' |
| 62 |
SELECT @@GLOBAL.gtid_executed_compression_period; |
| 63 |
@@GLOBAL.gtid_executed_compression_period |
| 64 |
4294967295 |
| 65 |
set global gtid_executed_compression_period= 1.1; |
| 66 |
ERROR 42000: Incorrect argument type to variable 'gtid_executed_compression_period' |
| 67 |
set global gtid_executed_compression_period= 1e1; |
| 68 |
ERROR 42000: Incorrect argument type to variable 'gtid_executed_compression_period' |
| 69 |
set global gtid_executed_compression_period= "foobar"; |
| 70 |
ERROR 42000: Incorrect argument type to variable 'gtid_executed_compression_period' |
| 71 |
SET @@global.gtid_executed_compression_period= @start_global_value; |
| 72 |
SELECT @@global.gtid_executed_compression_period; |
| 73 |
@@global.gtid_executed_compression_period |
| 74 |
0 |