| 1 |
# 2014-03-16 - Added |
| 2 |
# |
| 3 |
|
| 4 |
--source include/have_debug.inc |
| 5 |
|
| 6 |
# The default depends on whatever the server is started with. |
| 7 |
# We force it to 'none' here. |
| 8 |
SET @backup_global_value = @@global.innodb_compress_debug; |
| 9 |
set global innodb_compress_debug="none"; |
| 10 |
|
| 11 |
SET @start_global_value = @@global.innodb_compress_debug; |
| 12 |
SELECT @start_global_value; |
| 13 |
|
| 14 |
# |
| 15 |
# Exists as global only |
| 16 |
# |
| 17 |
--echo Valid value none, zlib, lz4 |
| 18 |
select @@global.innodb_compress_debug <= 2; |
| 19 |
select @@global.innodb_compress_debug; |
| 20 |
--error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 21 |
select @@session.innodb_compress_debug; |
| 22 |
show global variables like 'innodb_compress_debug'; |
| 23 |
show session variables like 'innodb_compress_debug'; |
| 24 |
select * from performance_schema.global_variables where variable_name='innodb_compress_debug'; |
| 25 |
select * from performance_schema.session_variables where variable_name='innodb_compress_debug'; |
| 26 |
|
| 27 |
# |
| 28 |
# show that it's writable |
| 29 |
# |
| 30 |
set global innodb_compress_debug="lz4"; |
| 31 |
select @@global.innodb_compress_debug; |
| 32 |
select * from performance_schema.global_variables where variable_name='innodb_compress_debug'; |
| 33 |
select * from performance_schema.session_variables where variable_name='innodb_compress_debug'; |
| 34 |
--error ER_GLOBAL_VARIABLE |
| 35 |
set session innodb_compress_debug="none"; |
| 36 |
|
| 37 |
# |
| 38 |
# incorrect types and values |
| 39 |
# |
| 40 |
--error ER_WRONG_TYPE_FOR_VAR |
| 41 |
set global innodb_compress_debug=1.1; |
| 42 |
--error ER_WRONG_TYPE_FOR_VAR |
| 43 |
set global innodb_compress_debug=1e1; |
| 44 |
--error ER_WRONG_VALUE_FOR_VAR |
| 45 |
set global innodb_compress_debug=10; |
| 46 |
select @@global.innodb_compress_debug; |
| 47 |
select * from performance_schema.global_variables where variable_name='innodb_compress_debug'; |
| 48 |
--error ER_WRONG_VALUE_FOR_VAR |
| 49 |
set global innodb_compress_debug=-7; |
| 50 |
select @@global.innodb_compress_debug; |
| 51 |
--error ER_WRONG_VALUE_FOR_VAR |
| 52 |
set global innodb_compress_debug="blah"; |
| 53 |
select @@global.innodb_compress_debug; |
| 54 |
select * from performance_schema.global_variables where variable_name='innodb_compress_debug'; |
| 55 |
|
| 56 |
# |
| 57 |
# Correct values |
| 58 |
# |
| 59 |
set global innodb_compress_debug="none"; |
| 60 |
select @@global.innodb_compress_debug; |
| 61 |
set global innodb_compress_debug="zlib"; |
| 62 |
select @@global.innodb_compress_debug; |
| 63 |
set global innodb_compress_debug="lz4"; |
| 64 |
select @@global.innodb_compress_debug; |
| 65 |
|
| 66 |
# |
| 67 |
# cleanup |
| 68 |
# |
| 69 |
|
| 70 |
SET @@global.innodb_compress_debug = @backup_global_value; |
| 71 |
SELECT @@global.innodb_compress_debug; |