Commit 0cb7c19f authored by Sergei Golubchik's avatar Sergei Golubchik

update sys_vars.innodb_compression_algorithm_basic to pass

it checked that the default is lz4. Which only worked on systems that
had lz4 and did not have lzo. Now it checks for the default to be zlib,
which works on systems that has neither lz4 or lzo. Like our package
builders in buildbot. This is intentional, we don't want introduce
additional dependencies (lz4, lzo) for our packages just yet.
This can (and will) be reconsidered, and this test can (and will)
be updated again.
parent 5f02051f
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'
zlib
select @@global.innodb_compression_algorithm;
@@global.innodb_compression_algorithm
lz4
zlib
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
innodb_compression_algorithm zlib
show session variables like 'innodb_compression_algorithm';
Variable_name Value
innodb_compression_algorithm lz4
innodb_compression_algorithm zlib
select * from information_schema.global_variables where variable_name='innodb_compression_algorithm';
VARIABLE_NAME VARIABLE_VALUE
INNODB_COMPRESSION_ALGORITHM lz4
INNODB_COMPRESSION_ALGORITHM zlib
select * from information_schema.session_variables where variable_name='innodb_compression_algorithm';
VARIABLE_NAME VARIABLE_VALUE
INNODB_COMPRESSION_ALGORITHM lz4
INNODB_COMPRESSION_ALGORITHM zlib
set global innodb_compression_algorithm=1;
select @@global.innodb_compression_algorithm;
@@global.innodb_compression_algorithm
......@@ -47,11 +41,12 @@ set global innodb_compression_algorithm=0;
select @@global.innodb_compression_algorithm;
@@global.innodb_compression_algorithm
none
set global innodb_compression_algorithm=1;
BUG! This should've failed (lzo is not compiled in)
set global innodb_compression_algorithm=3;
select @@global.innodb_compression_algorithm;
@@global.innodb_compression_algorithm
zlib
lzo
SET @@global.innodb_compression_algorithm = @start_global_value;
SELECT @@global.innodb_compression_algorithm;
@@global.innodb_compression_algorithm
lz4
zlib
......@@ -6,8 +6,6 @@ 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;
......@@ -40,8 +38,8 @@ set global innodb_compression_algorithm="foo";
#
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;
-- echo BUG! This should've failed (lzo is not compiled in)
set global innodb_compression_algorithm=3;
select @@global.innodb_compression_algorithm;
#
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment