mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
This change splits innodb_file_format_check into innodb_file_format_check
and innodb_file_format_max two system variables. And this also fixes bug #53654 after 2nd shutdown innodb_file_format_check attains strange values. rb://366 approved by Marko
This commit is contained in:
@@ -920,7 +920,7 @@ create index t1u on t1 (u(1));
|
||||
drop table t1;
|
||||
set global innodb_file_per_table=0;
|
||||
set global innodb_file_format=Antelope;
|
||||
set global innodb_file_format_check=Antelope;
|
||||
set global innodb_file_format_max=Antelope;
|
||||
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
|
||||
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
|
||||
CREATE TABLE t1(
|
||||
|
||||
@@ -397,25 +397,25 @@ set global innodb_file_per_table=0;
|
||||
set global innodb_file_format=Antelope;
|
||||
set global innodb_file_per_table=on;
|
||||
set global innodb_file_format=`Barracuda`;
|
||||
set global innodb_file_format_check=`Antelope`;
|
||||
set global innodb_file_format_max=`Antelope`;
|
||||
create table normal_table (
|
||||
c1 int
|
||||
) engine = innodb;
|
||||
select @@innodb_file_format_check;
|
||||
@@innodb_file_format_check
|
||||
select @@innodb_file_format_max;
|
||||
@@innodb_file_format_max
|
||||
Antelope
|
||||
create table zip_table (
|
||||
c1 int
|
||||
) engine = innodb key_block_size = 8;
|
||||
select @@innodb_file_format_check;
|
||||
@@innodb_file_format_check
|
||||
select @@innodb_file_format_max;
|
||||
@@innodb_file_format_max
|
||||
Barracuda
|
||||
set global innodb_file_format_check=`Antelope`;
|
||||
select @@innodb_file_format_check;
|
||||
@@innodb_file_format_check
|
||||
set global innodb_file_format_max=`Antelope`;
|
||||
select @@innodb_file_format_max;
|
||||
@@innodb_file_format_max
|
||||
Antelope
|
||||
show table status;
|
||||
select @@innodb_file_format_check;
|
||||
@@innodb_file_format_check
|
||||
select @@innodb_file_format_max;
|
||||
@@innodb_file_format_max
|
||||
Barracuda
|
||||
drop table normal_table, zip_table;
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
set @old_innodb_file_format_check=@@innodb_file_format_check;
|
||||
select @old_innodb_file_format_check;
|
||||
@old_innodb_file_format_check
|
||||
set @old_innodb_file_format_max=@@innodb_file_format_max;
|
||||
select @old_innodb_file_format_max;
|
||||
@old_innodb_file_format_max
|
||||
Antelope
|
||||
set global innodb_file_format_check = Barracuda;
|
||||
select @@innodb_file_format_check;
|
||||
@@innodb_file_format_check
|
||||
set global innodb_file_format_max = Barracuda;
|
||||
select @@innodb_file_format_max;
|
||||
@@innodb_file_format_max
|
||||
Barracuda
|
||||
set global innodb_file_format_check = DEFAULT;
|
||||
select @@innodb_file_format_check;
|
||||
@@innodb_file_format_check
|
||||
Barracuda
|
||||
set global innodb_file_format_check = @old_innodb_file_format_check;
|
||||
select @@innodb_file_format_check;
|
||||
@@innodb_file_format_check
|
||||
set global innodb_file_format_max = DEFAULT;
|
||||
select @@innodb_file_format_max;
|
||||
@@innodb_file_format_max
|
||||
Antelope
|
||||
set global innodb_file_format_check = cheetah;
|
||||
ERROR 42000: Variable 'innodb_file_format_check' can't be set to the value of 'cheetah'
|
||||
set global innodb_file_format_check = Bear;
|
||||
ERROR 42000: Variable 'innodb_file_format_check' can't be set to the value of 'Bear'
|
||||
set global innodb_file_format_check = on;
|
||||
ERROR 42000: Variable 'innodb_file_format_check' can't be set to the value of 'ON'
|
||||
set global innodb_file_format_check = off;
|
||||
ERROR 42000: Variable 'innodb_file_format_check' can't be set to the value of 'off'
|
||||
set global innodb_file_format_max = @old_innodb_file_format_max;
|
||||
select @@innodb_file_format_max;
|
||||
@@innodb_file_format_max
|
||||
Antelope
|
||||
set global innodb_file_format_max = cheetah;
|
||||
ERROR 42000: Variable 'innodb_file_format_max' can't be set to the value of 'cheetah'
|
||||
set global innodb_file_format_max = Bear;
|
||||
ERROR 42000: Variable 'innodb_file_format_max' can't be set to the value of 'Bear'
|
||||
set global innodb_file_format_max = on;
|
||||
ERROR 42000: Variable 'innodb_file_format_max' can't be set to the value of 'ON'
|
||||
set global innodb_file_format_max = off;
|
||||
ERROR 42000: Variable 'innodb_file_format_max' can't be set to the value of 'off'
|
||||
|
||||
@@ -126,5 +126,5 @@ Warning 1265 Data truncated for column 'col79' at row 1
|
||||
Warning 1264 Out of range value for column 'col84' at row 1
|
||||
DROP TABLE bug52745;
|
||||
SET GLOBAL innodb_file_format=Antelope;
|
||||
SET GLOBAL innodb_file_format_check=Antelope;
|
||||
SET GLOBAL innodb_file_format_max=Antelope;
|
||||
SET GLOBAL innodb_file_per_table=0;
|
||||
|
||||
@@ -12,5 +12,5 @@ Error 1118 Row size too large. The maximum row size for the used table type, not
|
||||
Error 1030 Got error 139 from storage engine
|
||||
DROP TABLE bug53591;
|
||||
SET GLOBAL innodb_file_format=Antelope;
|
||||
SET GLOBAL innodb_file_format_check=Antelope;
|
||||
SET GLOBAL innodb_file_format_max=Antelope;
|
||||
SET GLOBAL innodb_file_per_table=0;
|
||||
|
||||
@@ -3,6 +3,9 @@ select @@innodb_file_format;
|
||||
Antelope
|
||||
select @@innodb_file_format_check;
|
||||
@@innodb_file_format_check
|
||||
1
|
||||
select @@innodb_file_format_max;
|
||||
@@innodb_file_format_max
|
||||
Antelope
|
||||
set global innodb_file_format=antelope;
|
||||
set global innodb_file_format=barracuda;
|
||||
@@ -22,22 +25,26 @@ ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'off'
|
||||
select @@innodb_file_format;
|
||||
@@innodb_file_format
|
||||
Antelope
|
||||
set global innodb_file_format_check=antelope;
|
||||
set global innodb_file_format_check=barracuda;
|
||||
set global innodb_file_format_check=cheetah;
|
||||
ERROR 42000: Variable 'innodb_file_format_check' can't be set to the value of 'cheetah'
|
||||
select @@innodb_file_format_check;
|
||||
@@innodb_file_format_check
|
||||
Barracuda
|
||||
set global innodb_file_format_check=default;
|
||||
select @@innodb_file_format_check;
|
||||
@@innodb_file_format_check
|
||||
set global innodb_file_format_max=antelope;
|
||||
set global innodb_file_format_max=barracuda;
|
||||
set global innodb_file_format_max=cheetah;
|
||||
ERROR 42000: Variable 'innodb_file_format_max' can't be set to the value of 'cheetah'
|
||||
select @@innodb_file_format_max;
|
||||
@@innodb_file_format_max
|
||||
Barracuda
|
||||
set global innodb_file_format_max=default;
|
||||
select @@innodb_file_format_max;
|
||||
@@innodb_file_format_max
|
||||
Antelope
|
||||
set global innodb_file_format=on;
|
||||
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'ON'
|
||||
set global innodb_file_format=off;
|
||||
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'off'
|
||||
select @@innodb_file_format_check;
|
||||
@@innodb_file_format_check
|
||||
Barracuda
|
||||
set global innodb_file_format_check=antelope;
|
||||
select @@innodb_file_format_max;
|
||||
@@innodb_file_format_max
|
||||
Antelope
|
||||
set global innodb_file_format_max=antelope;
|
||||
set global innodb_file_format_check=off;
|
||||
ERROR HY000: Variable 'innodb_file_format_check' is a read only variable
|
||||
SET GLOBAL innodb_file_format=Antelope;
|
||||
SET GLOBAL innodb_file_format_max=Antelope;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# embedded server ignores 'delayed', so skip this
|
||||
-- source include/not_embedded.inc
|
||||
|
||||
let $innodb_file_format_check_orig=`select @@innodb_file_format_check`;
|
||||
let $innodb_file_format_max_orig=`select @@innodb_file_format_max`;
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
@@ -40,4 +40,4 @@ DROP TABLE t1;
|
||||
#
|
||||
|
||||
-- disable_query_log
|
||||
eval SET GLOBAL innodb_file_format_check=$innodb_file_format_check_orig;
|
||||
eval SET GLOBAL innodb_file_format_max=$innodb_file_format_max_orig;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# embedded server ignores 'delayed', so skip this
|
||||
-- source include/not_embedded.inc
|
||||
|
||||
let $innodb_file_format_check_orig=`select @@innodb_file_format_check`;
|
||||
let $innodb_file_format_max_orig=`select @@innodb_file_format_max`;
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
@@ -671,4 +671,4 @@ DROP TABLE t1;
|
||||
#
|
||||
|
||||
-- disable_query_log
|
||||
eval SET GLOBAL innodb_file_format_check=$innodb_file_format_check_orig;
|
||||
eval SET GLOBAL innodb_file_format_max=$innodb_file_format_max_orig;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||
|
||||
let $innodb_file_format_check_orig=`select @@innodb_file_format_check`;
|
||||
let $innodb_file_format_max_orig=`select @@innodb_file_format_max`;
|
||||
|
||||
create table t1(a int not null, b int, c char(10) not null, d varchar(20)) engine = innodb;
|
||||
insert into t1 values (5,5,'oo','oo'),(4,4,'tr','tr'),(3,4,'ad','ad'),(2,3,'ak','ak');
|
||||
@@ -403,7 +403,7 @@ create index t1u on t1 (u(1));
|
||||
drop table t1;
|
||||
eval set global innodb_file_per_table=$per_table;
|
||||
eval set global innodb_file_format=$format;
|
||||
eval set global innodb_file_format_check=$format;
|
||||
eval set global innodb_file_format_max=$format;
|
||||
|
||||
#
|
||||
# Test to check whether CREATE INDEX handles implicit foreign key
|
||||
@@ -550,4 +550,4 @@ DROP TABLE t1;
|
||||
#
|
||||
|
||||
-- disable_query_log
|
||||
eval SET GLOBAL innodb_file_format_check=$innodb_file_format_check_orig;
|
||||
eval SET GLOBAL innodb_file_format_max=$innodb_file_format_max_orig;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
let $per_table=`select @@innodb_file_per_table`;
|
||||
let $format=`select @@innodb_file_format`;
|
||||
let $innodb_file_format_check_orig=`select @@innodb_file_format_check`;
|
||||
let $innodb_file_format_max_orig=`select @@innodb_file_format_max`;
|
||||
set global innodb_file_per_table=off;
|
||||
set global innodb_file_format=`0`;
|
||||
|
||||
@@ -316,21 +316,21 @@ eval set global innodb_file_format=$format;
|
||||
-- disable_info
|
||||
set global innodb_file_per_table=on;
|
||||
set global innodb_file_format=`Barracuda`;
|
||||
set global innodb_file_format_check=`Antelope`;
|
||||
set global innodb_file_format_max=`Antelope`;
|
||||
create table normal_table (
|
||||
c1 int
|
||||
) engine = innodb;
|
||||
select @@innodb_file_format_check;
|
||||
select @@innodb_file_format_max;
|
||||
create table zip_table (
|
||||
c1 int
|
||||
) engine = innodb key_block_size = 8;
|
||||
select @@innodb_file_format_check;
|
||||
set global innodb_file_format_check=`Antelope`;
|
||||
select @@innodb_file_format_check;
|
||||
select @@innodb_file_format_max;
|
||||
set global innodb_file_format_max=`Antelope`;
|
||||
select @@innodb_file_format_max;
|
||||
-- disable_result_log
|
||||
show table status;
|
||||
-- enable_result_log
|
||||
select @@innodb_file_format_check;
|
||||
select @@innodb_file_format_max;
|
||||
drop table normal_table, zip_table;
|
||||
-- disable_result_log
|
||||
|
||||
@@ -341,4 +341,4 @@ drop table normal_table, zip_table;
|
||||
-- disable_query_log
|
||||
eval set global innodb_file_format=$format;
|
||||
eval set global innodb_file_per_table=$per_table;
|
||||
eval set global innodb_file_format_check=$innodb_file_format_check_orig;
|
||||
eval set global innodb_file_format_max=$innodb_file_format_max_orig;
|
||||
|
||||
@@ -15,7 +15,7 @@ SET storage_engine=InnoDB;
|
||||
-- disable_result_log
|
||||
|
||||
let $file_format=`select @@innodb_file_format`;
|
||||
let $file_format_check=`select @@innodb_file_format_check`;
|
||||
let $file_format_max=`select @@innodb_file_format_max`;
|
||||
let $file_per_table=`select @@innodb_file_per_table`;
|
||||
SET GLOBAL innodb_file_format='Barracuda';
|
||||
SET GLOBAL innodb_file_per_table=on;
|
||||
@@ -28,5 +28,5 @@ INSERT IGNORE INTO `table0` SET `col19` = '19940127002709', `col20` = 2383927.90
|
||||
CHECK TABLE table0 EXTENDED;
|
||||
DROP TABLE table0;
|
||||
EVAL SET GLOBAL innodb_file_format=$file_format;
|
||||
EVAL SET GLOBAL innodb_file_format_check=$file_format_check;
|
||||
EVAL SET GLOBAL innodb_file_format_max=$file_format_max;
|
||||
EVAL SET GLOBAL innodb_file_per_table=$file_per_table;
|
||||
|
||||
@@ -1,45 +1,44 @@
|
||||
# This is the unit test for bug *47167.
|
||||
# It tests setting the global variable
|
||||
# "innodb_file_format_check" with a
|
||||
# user-Defined Variable.
|
||||
# This is the unit test for bug #47167.
|
||||
# It tests setting the global variable "innodb_file_format_max" (
|
||||
# originally "innodb_file_format_check") with a user-Defined Variable.
|
||||
|
||||
--source include/have_innodb.inc
|
||||
|
||||
# Save the value (Antelope) in 'innodb_file_format_check' to
|
||||
# 'old_innodb_file_format_check'
|
||||
set @old_innodb_file_format_check=@@innodb_file_format_check;
|
||||
# Save the value (Antelope) in 'innodb_file_format_max' to
|
||||
# 'old_innodb_file_format_max'
|
||||
set @old_innodb_file_format_max=@@innodb_file_format_max;
|
||||
|
||||
# @old_innodb_file_format_check shall have the value of 'Antelope'
|
||||
select @old_innodb_file_format_check;
|
||||
# @old_innodb_file_format_max shall have the value of 'Antelope'
|
||||
select @old_innodb_file_format_max;
|
||||
|
||||
# Reset the value in 'innodb_file_format_check' to 'Barracuda'
|
||||
set global innodb_file_format_check = Barracuda;
|
||||
# Reset the value in 'innodb_file_format_max' to 'Barracuda'
|
||||
set global innodb_file_format_max = Barracuda;
|
||||
|
||||
select @@innodb_file_format_check;
|
||||
select @@innodb_file_format_max;
|
||||
|
||||
# Set 'innodb_file_format_check' to its default value, which
|
||||
# Set 'innodb_file_format_max' to its default value, which
|
||||
# is the latest file format supported in the current release.
|
||||
set global innodb_file_format_check = DEFAULT;
|
||||
set global innodb_file_format_max = DEFAULT;
|
||||
|
||||
select @@innodb_file_format_check;
|
||||
select @@innodb_file_format_max;
|
||||
|
||||
# Put the saved value back to 'innodb_file_format_check'
|
||||
set global innodb_file_format_check = @old_innodb_file_format_check;
|
||||
# Put the saved value back to 'innodb_file_format_max'
|
||||
set global innodb_file_format_max = @old_innodb_file_format_max;
|
||||
|
||||
# Check whether 'innodb_file_format_check' get its original value.
|
||||
select @@innodb_file_format_check;
|
||||
# Check whether 'innodb_file_format_max' get its original value.
|
||||
select @@innodb_file_format_max;
|
||||
|
||||
# Following are negative tests, all should fail.
|
||||
--disable_warnings
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
set global innodb_file_format_check = cheetah;
|
||||
set global innodb_file_format_max = cheetah;
|
||||
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
set global innodb_file_format_check = Bear;
|
||||
set global innodb_file_format_max = Bear;
|
||||
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
set global innodb_file_format_check = on;
|
||||
set global innodb_file_format_max = on;
|
||||
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
set global innodb_file_format_check = off;
|
||||
set global innodb_file_format_max = off;
|
||||
--enable_warnings
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
-- source include/have_innodb.inc
|
||||
|
||||
let $file_format=`select @@innodb_file_format`;
|
||||
let $file_format_check=`select @@innodb_file_format_check`;
|
||||
let $file_format_max=`select @@innodb_file_format_max`;
|
||||
let $file_per_table=`select @@innodb_file_per_table`;
|
||||
SET GLOBAL innodb_file_format='Barracuda';
|
||||
SET GLOBAL innodb_file_per_table=on;
|
||||
@@ -105,5 +105,5 @@ SHOW WARNINGS;
|
||||
DROP TABLE bug52745;
|
||||
|
||||
EVAL SET GLOBAL innodb_file_format=$file_format;
|
||||
EVAL SET GLOBAL innodb_file_format_check=$file_format_check;
|
||||
EVAL SET GLOBAL innodb_file_format_max=$file_format_max;
|
||||
EVAL SET GLOBAL innodb_file_per_table=$file_per_table;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
-- source include/have_innodb.inc
|
||||
|
||||
let $file_format=`select @@innodb_file_format`;
|
||||
let $file_format_check=`select @@innodb_file_format_check`;
|
||||
let $file_format_max=`select @@innodb_file_format_max`;
|
||||
let $file_per_table=`select @@innodb_file_per_table`;
|
||||
|
||||
SET GLOBAL innodb_file_format='Barracuda';
|
||||
@@ -18,5 +18,5 @@ SHOW WARNINGS;
|
||||
DROP TABLE bug53591;
|
||||
|
||||
EVAL SET GLOBAL innodb_file_format=$file_format;
|
||||
EVAL SET GLOBAL innodb_file_format_check=$file_format_check;
|
||||
EVAL SET GLOBAL innodb_file_format_max=$file_format_max;
|
||||
EVAL SET GLOBAL innodb_file_per_table=$file_per_table;
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
-- source include/have_innodb.inc
|
||||
|
||||
let $innodb_file_format_orig=`select @@innodb_file_format`;
|
||||
let $innodb_file_format_max_orig=`select @@innodb_file_format_max`;
|
||||
|
||||
select @@innodb_file_format;
|
||||
select @@innodb_file_format_check;
|
||||
select @@innodb_file_format_max;
|
||||
set global innodb_file_format=antelope;
|
||||
set global innodb_file_format=barracuda;
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
@@ -14,16 +18,24 @@ set global innodb_file_format=on;
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
set global innodb_file_format=off;
|
||||
select @@innodb_file_format;
|
||||
set global innodb_file_format_check=antelope;
|
||||
set global innodb_file_format_check=barracuda;
|
||||
set global innodb_file_format_max=antelope;
|
||||
set global innodb_file_format_max=barracuda;
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
set global innodb_file_format_check=cheetah;
|
||||
select @@innodb_file_format_check;
|
||||
set global innodb_file_format_check=default;
|
||||
select @@innodb_file_format_check;
|
||||
set global innodb_file_format_max=cheetah;
|
||||
select @@innodb_file_format_max;
|
||||
set global innodb_file_format_max=default;
|
||||
select @@innodb_file_format_max;
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
set global innodb_file_format=on;
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
set global innodb_file_format=off;
|
||||
select @@innodb_file_format_check;
|
||||
set global innodb_file_format_check=antelope;
|
||||
select @@innodb_file_format_max;
|
||||
set global innodb_file_format_max=antelope;
|
||||
|
||||
# innodb_file_format_check is read only variable, can be
|
||||
# set as server startup parameter
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set global innodb_file_format_check=off;
|
||||
|
||||
eval SET GLOBAL innodb_file_format=$innodb_file_format_orig;
|
||||
eval SET GLOBAL innodb_file_format_max=$innodb_file_format_max_orig;
|
||||
|
||||
@@ -10,5 +10,7 @@ There should be *no* long test name listed below:
|
||||
select variable_name as `There should be *no* variables listed below:` from t2
|
||||
left join t1 on variable_name=test_name where test_name is null;
|
||||
There should be *no* variables listed below:
|
||||
INNODB_FILE_FORMAT_MAX
|
||||
INNODB_FILE_FORMAT_MAX
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
|
||||
@@ -1,59 +1,59 @@
|
||||
SET @start_global_value = @@global.innodb_file_format_check;
|
||||
SET @start_global_value = @@global.innodb_file_format_max;
|
||||
SELECT @start_global_value;
|
||||
@start_global_value
|
||||
Antelope
|
||||
Valid values are 'Antelope' and 'Barracuda'
|
||||
select @@global.innodb_file_format_check in ('Antelope', 'Barracuda');
|
||||
@@global.innodb_file_format_check in ('Antelope', 'Barracuda')
|
||||
select @@global.innodb_file_format_max in ('Antelope', 'Barracuda');
|
||||
@@global.innodb_file_format_max in ('Antelope', 'Barracuda')
|
||||
1
|
||||
select @@global.innodb_file_format_check;
|
||||
@@global.innodb_file_format_check
|
||||
select @@global.innodb_file_format_max;
|
||||
@@global.innodb_file_format_max
|
||||
Antelope
|
||||
select @@session.innodb_file_format_check;
|
||||
ERROR HY000: Variable 'innodb_file_format_check' is a GLOBAL variable
|
||||
show global variables like 'innodb_file_format_check';
|
||||
select @@session.innodb_file_format_max;
|
||||
ERROR HY000: Variable 'innodb_file_format_max' is a GLOBAL variable
|
||||
show global variables like 'innodb_file_format_max';
|
||||
Variable_name Value
|
||||
innodb_file_format_check Antelope
|
||||
show session variables like 'innodb_file_format_check';
|
||||
innodb_file_format_max Antelope
|
||||
show session variables like 'innodb_file_format_max';
|
||||
Variable_name Value
|
||||
innodb_file_format_check Antelope
|
||||
select * from information_schema.global_variables where variable_name='innodb_file_format_check';
|
||||
innodb_file_format_max Antelope
|
||||
select * from information_schema.global_variables where variable_name='innodb_file_format_max';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_FILE_FORMAT_CHECK Antelope
|
||||
select * from information_schema.session_variables where variable_name='innodb_file_format_check';
|
||||
INNODB_FILE_FORMAT_MAX Antelope
|
||||
select * from information_schema.session_variables where variable_name='innodb_file_format_max';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_FILE_FORMAT_CHECK Antelope
|
||||
set global innodb_file_format_check='Antelope';
|
||||
select @@global.innodb_file_format_check;
|
||||
@@global.innodb_file_format_check
|
||||
INNODB_FILE_FORMAT_MAX Antelope
|
||||
set global innodb_file_format_max='Antelope';
|
||||
select @@global.innodb_file_format_max;
|
||||
@@global.innodb_file_format_max
|
||||
Antelope
|
||||
select * from information_schema.global_variables where variable_name='innodb_file_format_check';
|
||||
select * from information_schema.global_variables where variable_name='innodb_file_format_max';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_FILE_FORMAT_CHECK Antelope
|
||||
select * from information_schema.session_variables where variable_name='innodb_file_format_check';
|
||||
INNODB_FILE_FORMAT_MAX Antelope
|
||||
select * from information_schema.session_variables where variable_name='innodb_file_format_max';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_FILE_FORMAT_CHECK Antelope
|
||||
set @@global.innodb_file_format_check='Barracuda';
|
||||
select @@global.innodb_file_format_check;
|
||||
@@global.innodb_file_format_check
|
||||
INNODB_FILE_FORMAT_MAX Antelope
|
||||
set @@global.innodb_file_format_max='Barracuda';
|
||||
select @@global.innodb_file_format_max;
|
||||
@@global.innodb_file_format_max
|
||||
Barracuda
|
||||
select * from information_schema.global_variables where variable_name='innodb_file_format_check';
|
||||
select * from information_schema.global_variables where variable_name='innodb_file_format_max';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_FILE_FORMAT_CHECK Barracuda
|
||||
select * from information_schema.session_variables where variable_name='innodb_file_format_check';
|
||||
INNODB_FILE_FORMAT_MAX Barracuda
|
||||
select * from information_schema.session_variables where variable_name='innodb_file_format_max';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_FILE_FORMAT_CHECK Barracuda
|
||||
set session innodb_file_format_check='Salmon';
|
||||
ERROR HY000: Variable 'innodb_file_format_check' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
set @@session.innodb_file_format_check='Salmon';
|
||||
ERROR HY000: Variable 'innodb_file_format_check' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
set global innodb_file_format_check=1.1;
|
||||
ERROR 42000: Incorrect argument type to variable 'innodb_file_format_check'
|
||||
set global innodb_file_format_check=1e1;
|
||||
ERROR 42000: Incorrect argument type to variable 'innodb_file_format_check'
|
||||
set global innodb_file_format_check='Salmon';
|
||||
ERROR 42000: Variable 'innodb_file_format_check' can't be set to the value of 'Salmon'
|
||||
SET @@global.innodb_file_format_check = @start_global_value;
|
||||
SELECT @@global.innodb_file_format_check;
|
||||
@@global.innodb_file_format_check
|
||||
INNODB_FILE_FORMAT_MAX Barracuda
|
||||
set session innodb_file_format_max='Salmon';
|
||||
ERROR HY000: Variable 'innodb_file_format_max' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
set @@session.innodb_file_format_max='Salmon';
|
||||
ERROR HY000: Variable 'innodb_file_format_max' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
set global innodb_file_format_max=1.1;
|
||||
ERROR 42000: Incorrect argument type to variable 'innodb_file_format_max'
|
||||
set global innodb_file_format_max=1e1;
|
||||
ERROR 42000: Incorrect argument type to variable 'innodb_file_format_max'
|
||||
set global innodb_file_format_max='Salmon';
|
||||
ERROR 42000: Variable 'innodb_file_format_max' can't be set to the value of 'Salmon'
|
||||
SET @@global.innodb_file_format_max = @start_global_value;
|
||||
SELECT @@global.innodb_file_format_max;
|
||||
@@global.innodb_file_format_max
|
||||
Antelope
|
||||
|
||||
@@ -5,51 +5,51 @@
|
||||
|
||||
--source include/have_innodb.inc
|
||||
|
||||
SET @start_global_value = @@global.innodb_file_format_check;
|
||||
SET @start_global_value = @@global.innodb_file_format_max;
|
||||
SELECT @start_global_value;
|
||||
|
||||
#
|
||||
# exists as global only
|
||||
#
|
||||
--echo Valid values are 'Antelope' and 'Barracuda'
|
||||
select @@global.innodb_file_format_check in ('Antelope', 'Barracuda');
|
||||
select @@global.innodb_file_format_check;
|
||||
select @@global.innodb_file_format_max in ('Antelope', 'Barracuda');
|
||||
select @@global.innodb_file_format_max;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.innodb_file_format_check;
|
||||
show global variables like 'innodb_file_format_check';
|
||||
show session variables like 'innodb_file_format_check';
|
||||
select * from information_schema.global_variables where variable_name='innodb_file_format_check';
|
||||
select * from information_schema.session_variables where variable_name='innodb_file_format_check';
|
||||
select @@session.innodb_file_format_max;
|
||||
show global variables like 'innodb_file_format_max';
|
||||
show session variables like 'innodb_file_format_max';
|
||||
select * from information_schema.global_variables where variable_name='innodb_file_format_max';
|
||||
select * from information_schema.session_variables where variable_name='innodb_file_format_max';
|
||||
|
||||
#
|
||||
# show that it's writable
|
||||
#
|
||||
set global innodb_file_format_check='Antelope';
|
||||
select @@global.innodb_file_format_check;
|
||||
select * from information_schema.global_variables where variable_name='innodb_file_format_check';
|
||||
select * from information_schema.session_variables where variable_name='innodb_file_format_check';
|
||||
set @@global.innodb_file_format_check='Barracuda';
|
||||
select @@global.innodb_file_format_check;
|
||||
select * from information_schema.global_variables where variable_name='innodb_file_format_check';
|
||||
select * from information_schema.session_variables where variable_name='innodb_file_format_check';
|
||||
set global innodb_file_format_max='Antelope';
|
||||
select @@global.innodb_file_format_max;
|
||||
select * from information_schema.global_variables where variable_name='innodb_file_format_max';
|
||||
select * from information_schema.session_variables where variable_name='innodb_file_format_max';
|
||||
set @@global.innodb_file_format_max='Barracuda';
|
||||
select @@global.innodb_file_format_max;
|
||||
select * from information_schema.global_variables where variable_name='innodb_file_format_max';
|
||||
select * from information_schema.session_variables where variable_name='innodb_file_format_max';
|
||||
--error ER_GLOBAL_VARIABLE
|
||||
set session innodb_file_format_check='Salmon';
|
||||
set session innodb_file_format_max='Salmon';
|
||||
--error ER_GLOBAL_VARIABLE
|
||||
set @@session.innodb_file_format_check='Salmon';
|
||||
set @@session.innodb_file_format_max='Salmon';
|
||||
|
||||
#
|
||||
# incorrect types
|
||||
#
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global innodb_file_format_check=1.1;
|
||||
set global innodb_file_format_max=1.1;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global innodb_file_format_check=1e1;
|
||||
set global innodb_file_format_max=1e1;
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
set global innodb_file_format_check='Salmon';
|
||||
set global innodb_file_format_max='Salmon';
|
||||
|
||||
#
|
||||
# Cleanup
|
||||
#
|
||||
|
||||
SET @@global.innodb_file_format_check = @start_global_value;
|
||||
SELECT @@global.innodb_file_format_check;
|
||||
SET @@global.innodb_file_format_max = @start_global_value;
|
||||
SELECT @@global.innodb_file_format_max;
|
||||
|
||||
Reference in New Issue
Block a user