From 89e0514150433eeb9737e3bb6272b88dd82b8443 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Tue, 17 Jun 2014 08:40:54 +0300 Subject: [PATCH] Fixed test failure introduced by adding a new dynamic configuration variable innodb_compression_algorithm. Removed unnecessary test for removed configuration variable. --- .../innodb_compression_algorithm_basic.result | 57 +++++++++++++++++++ .../sys_vars/r/innodb_use_lz4_basic.result | 3 - .../t/innodb_compression_algorithm_basic.test | 52 +++++++++++++++++ .../sys_vars/t/innodb_use_lz4_basic.test | 5 -- 4 files changed, 109 insertions(+), 8 deletions(-) create mode 100644 mysql-test/suite/sys_vars/r/innodb_compression_algorithm_basic.result delete mode 100644 mysql-test/suite/sys_vars/r/innodb_use_lz4_basic.result create mode 100644 mysql-test/suite/sys_vars/t/innodb_compression_algorithm_basic.test delete mode 100644 mysql-test/suite/sys_vars/t/innodb_use_lz4_basic.test diff --git a/mysql-test/suite/sys_vars/r/innodb_compression_algorithm_basic.result b/mysql-test/suite/sys_vars/r/innodb_compression_algorithm_basic.result new file mode 100644 index 00000000000..37290cf2742 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_compression_algorithm_basic.result @@ -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 diff --git a/mysql-test/suite/sys_vars/r/innodb_use_lz4_basic.result b/mysql-test/suite/sys_vars/r/innodb_use_lz4_basic.result deleted file mode 100644 index 4c3cfa524af..00000000000 --- a/mysql-test/suite/sys_vars/r/innodb_use_lz4_basic.result +++ /dev/null @@ -1,3 +0,0 @@ -select @@global.innodb_use_fallocate; -@@global.innodb_use_fallocate -0 diff --git a/mysql-test/suite/sys_vars/t/innodb_compression_algorithm_basic.test b/mysql-test/suite/sys_vars/t/innodb_compression_algorithm_basic.test new file mode 100644 index 00000000000..bef7ef5c6ea --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_compression_algorithm_basic.test @@ -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; diff --git a/mysql-test/suite/sys_vars/t/innodb_use_lz4_basic.test b/mysql-test/suite/sys_vars/t/innodb_use_lz4_basic.test deleted file mode 100644 index aefa276dcee..00000000000 --- a/mysql-test/suite/sys_vars/t/innodb_use_lz4_basic.test +++ /dev/null @@ -1,5 +0,0 @@ ---source include/have_innodb.inc -# bool readonly -# not on all compilations -select @@global.innodb_use_fallocate; -