mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 10:31:54 +01:00
Fixed test failure introduced by adding a new dynamic
configuration variable innodb_compression_algorithm. Removed unnecessary test for removed configuration variable.
This commit is contained in:
parent
f61f36b386
commit
89e0514150
4 changed files with 109 additions and 8 deletions
|
@ -0,0 +1,57 @@
|
|||
SET @start_global_value = @@global.innodb_compression_algorithm;
|
||||
SELECT @start_global_value;
|
||||
@start_global_value
|
||||
lz4
|
||||
Valid value 0-3
|
||||
select @@global.innodb_compression_algorithm <= 3;
|
||||
@@global.innodb_compression_algorithm <= 3
|
||||
1
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'lz4'
|
||||
select @@global.innodb_compression_algorithm;
|
||||
@@global.innodb_compression_algorithm
|
||||
lz4
|
||||
select @@session.innodb_compression_algorithm;
|
||||
ERROR HY000: Variable 'innodb_compression_algorithm' is a GLOBAL variable
|
||||
show global variables like 'innodb_compression_algorithm';
|
||||
Variable_name Value
|
||||
innodb_compression_algorithm lz4
|
||||
show session variables like 'innodb_compression_algorithm';
|
||||
Variable_name Value
|
||||
innodb_compression_algorithm lz4
|
||||
select * from information_schema.global_variables where variable_name='innodb_compression_algorithm';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_COMPRESSION_ALGORITHM lz4
|
||||
select * from information_schema.session_variables where variable_name='innodb_compression_algorithm';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_COMPRESSION_ALGORITHM lz4
|
||||
set global innodb_compression_algorithm=1;
|
||||
select @@global.innodb_compression_algorithm;
|
||||
@@global.innodb_compression_algorithm
|
||||
zlib
|
||||
select * from information_schema.global_variables where variable_name='innodb_compression_algorithm';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_COMPRESSION_ALGORITHM zlib
|
||||
select * from information_schema.session_variables where variable_name='innodb_compression_algorithm';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_COMPRESSION_ALGORITHM zlib
|
||||
set session innodb_compression_algorithm=0;
|
||||
ERROR HY000: Variable 'innodb_compression_algorithm' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
set global innodb_compression_algorithm=1.1;
|
||||
ERROR 42000: Incorrect argument type to variable 'innodb_compression_algorithm'
|
||||
set global innodb_compression_algorithm=1e1;
|
||||
ERROR 42000: Incorrect argument type to variable 'innodb_compression_algorithm'
|
||||
set global innodb_compression_algorithm="foo";
|
||||
ERROR 42000: Variable 'innodb_compression_algorithm' can't be set to the value of 'foo'
|
||||
set global innodb_compression_algorithm=0;
|
||||
select @@global.innodb_compression_algorithm;
|
||||
@@global.innodb_compression_algorithm
|
||||
none
|
||||
set global innodb_compression_algorithm=1;
|
||||
select @@global.innodb_compression_algorithm;
|
||||
@@global.innodb_compression_algorithm
|
||||
zlib
|
||||
SET @@global.innodb_compression_algorithm = @start_global_value;
|
||||
SELECT @@global.innodb_compression_algorithm;
|
||||
@@global.innodb_compression_algorithm
|
||||
lz4
|
|
@ -1,3 +0,0 @@
|
|||
select @@global.innodb_use_fallocate;
|
||||
@@global.innodb_use_fallocate
|
||||
0
|
|
@ -0,0 +1,52 @@
|
|||
--source include/have_innodb.inc
|
||||
|
||||
SET @start_global_value = @@global.innodb_compression_algorithm;
|
||||
SELECT @start_global_value;
|
||||
|
||||
#
|
||||
# exists as global only
|
||||
#
|
||||
--echo Valid value 0-3
|
||||
select @@global.innodb_compression_algorithm <= 3;
|
||||
select @@global.innodb_compression_algorithm;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.innodb_compression_algorithm;
|
||||
show global variables like 'innodb_compression_algorithm';
|
||||
show session variables like 'innodb_compression_algorithm';
|
||||
select * from information_schema.global_variables where variable_name='innodb_compression_algorithm';
|
||||
select * from information_schema.session_variables where variable_name='innodb_compression_algorithm';
|
||||
|
||||
#
|
||||
# show that it's writable
|
||||
#
|
||||
set global innodb_compression_algorithm=1;
|
||||
select @@global.innodb_compression_algorithm;
|
||||
select * from information_schema.global_variables where variable_name='innodb_compression_algorithm';
|
||||
select * from information_schema.session_variables where variable_name='innodb_compression_algorithm';
|
||||
--error ER_GLOBAL_VARIABLE
|
||||
set session innodb_compression_algorithm=0;
|
||||
|
||||
#
|
||||
# incorrect types
|
||||
#
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global innodb_compression_algorithm=1.1;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global innodb_compression_algorithm=1e1;
|
||||
--error 1231
|
||||
set global innodb_compression_algorithm="foo";
|
||||
#
|
||||
# min/max values
|
||||
#
|
||||
set global innodb_compression_algorithm=0;
|
||||
select @@global.innodb_compression_algorithm;
|
||||
# installation may not have lz4=2 or lzo=3
|
||||
set global innodb_compression_algorithm=1;
|
||||
select @@global.innodb_compression_algorithm;
|
||||
|
||||
#
|
||||
# cleanup
|
||||
#
|
||||
|
||||
SET @@global.innodb_compression_algorithm = @start_global_value;
|
||||
SELECT @@global.innodb_compression_algorithm;
|
|
@ -1,5 +0,0 @@
|
|||
--source include/have_innodb.inc
|
||||
# bool readonly
|
||||
# not on all compilations
|
||||
select @@global.innodb_use_fallocate;
|
||||
|
Loading…
Add table
Reference in a new issue