mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Recommitting the changes to push the code.
This commit is contained in:
@ -11,13 +11,7 @@ There should be *no* long test name listed below:
|
|||||||
select variable_name as `There should be *no* variables listed below:` from t2
|
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;
|
left join t1 on variable_name=test_name where test_name is null;
|
||||||
There should be *no* variables listed below:
|
There should be *no* variables listed below:
|
||||||
INNODB_ROLLBACK_SEGMENTS
|
|
||||||
INNODB_STATS_METHOD
|
|
||||||
INNODB_FILE_FORMAT_MAX
|
|
||||||
INNODB_LARGE_PREFIX
|
INNODB_LARGE_PREFIX
|
||||||
INNODB_ROLLBACK_SEGMENTS
|
|
||||||
INNODB_STATS_METHOD
|
|
||||||
INNODB_FILE_FORMAT_MAX
|
|
||||||
INNODB_LARGE_PREFIX
|
INNODB_LARGE_PREFIX
|
||||||
drop table t1;
|
drop table t1;
|
||||||
drop table t2;
|
drop table t2;
|
||||||
|
@ -1,59 +1,80 @@
|
|||||||
SET @start_global_value = @@global.innodb_file_format_max;
|
SET @start_global_value = @@global.innodb_file_format_check;
|
||||||
SELECT @start_global_value;
|
SELECT @start_global_value;
|
||||||
@start_global_value
|
@start_global_value
|
||||||
Antelope
|
|
||||||
Valid values are 'Antelope' and 'Barracuda'
|
|
||||||
select @@global.innodb_file_format_max in ('Antelope', 'Barracuda');
|
|
||||||
@@global.innodb_file_format_max in ('Antelope', 'Barracuda')
|
|
||||||
1
|
1
|
||||||
select @@global.innodb_file_format_max;
|
Valid values are 'ON' and 'OFF'
|
||||||
@@global.innodb_file_format_max
|
SELECT @@global.innodb_file_format_check in (0, 1);
|
||||||
Antelope
|
@@global.innodb_file_format_check in (0, 1)
|
||||||
select @@session.innodb_file_format_max;
|
1
|
||||||
ERROR HY000: Variable 'innodb_file_format_max' is a GLOBAL variable
|
SELECT @@global.innodb_file_format_check;
|
||||||
show global variables like 'innodb_file_format_max';
|
@@global.innodb_file_format_check
|
||||||
|
1
|
||||||
|
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';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
innodb_file_format_max Antelope
|
innodb_file_format_check ON
|
||||||
show session variables like 'innodb_file_format_max';
|
SHOW session variables LIKE 'innodb_file_format_check';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
innodb_file_format_max Antelope
|
innodb_file_format_check ON
|
||||||
select * from information_schema.global_variables where variable_name='innodb_file_format_max';
|
SELECT * FROM information_schema.global_variables
|
||||||
|
WHERE variable_name='innodb_file_format_check';
|
||||||
VARIABLE_NAME VARIABLE_VALUE
|
VARIABLE_NAME VARIABLE_VALUE
|
||||||
INNODB_FILE_FORMAT_MAX Antelope
|
INNODB_FILE_FORMAT_CHECK ON
|
||||||
select * from information_schema.session_variables where variable_name='innodb_file_format_max';
|
SELECT * FROM information_schema.session_variables
|
||||||
|
WHERE variable_name='innodb_file_format_check';
|
||||||
VARIABLE_NAME VARIABLE_VALUE
|
VARIABLE_NAME VARIABLE_VALUE
|
||||||
INNODB_FILE_FORMAT_MAX Antelope
|
INNODB_FILE_FORMAT_CHECK ON
|
||||||
set global innodb_file_format_max='Antelope';
|
SET @@global.innodb_file_format_check='Off';
|
||||||
select @@global.innodb_file_format_max;
|
ERROR HY000: Variable 'innodb_file_format_check' is a read only variable
|
||||||
@@global.innodb_file_format_max
|
Expected error 'Read only variable'
|
||||||
Antelope
|
SET @@global.innodb_file_format_check=1;
|
||||||
select * from information_schema.global_variables where variable_name='innodb_file_format_max';
|
ERROR HY000: Variable 'innodb_file_format_check' is a read only variable
|
||||||
VARIABLE_NAME VARIABLE_VALUE
|
Expected error 'Read only variable'
|
||||||
INNODB_FILE_FORMAT_MAX Antelope
|
SET @@global.innodb_file_format_check=0;
|
||||||
select * from information_schema.session_variables where variable_name='innodb_file_format_max';
|
ERROR HY000: Variable 'innodb_file_format_check' is a read only variable
|
||||||
VARIABLE_NAME VARIABLE_VALUE
|
Expected error 'Read only variable'
|
||||||
INNODB_FILE_FORMAT_MAX Antelope
|
SET @@global.innodb_file_format_check='On';
|
||||||
set @@global.innodb_file_format_max='Barracuda';
|
ERROR HY000: Variable 'innodb_file_format_check' is a read only variable
|
||||||
select @@global.innodb_file_format_max;
|
Expected error 'Read only variable'
|
||||||
@@global.innodb_file_format_max
|
SET session innodb_large_prefix='OFF';
|
||||||
Barracuda
|
ERROR HY000: Variable 'innodb_large_prefix' is a GLOBAL variable and should be set with SET GLOBAL
|
||||||
select * from information_schema.global_variables where variable_name='innodb_file_format_max';
|
SET @@session.innodb_stats_on_metadata='ON';
|
||||||
VARIABLE_NAME VARIABLE_VALUE
|
ERROR HY000: Variable 'innodb_stats_on_metadata' is a GLOBAL variable and should be set with SET GLOBAL
|
||||||
INNODB_FILE_FORMAT_MAX Barracuda
|
SELECT IF(@@GLOBAL.innodb_file_format_check, "ON", "OFF") = VARIABLE_VALUE
|
||||||
select * from information_schema.session_variables where variable_name='innodb_file_format_max';
|
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||||
VARIABLE_NAME VARIABLE_VALUE
|
WHERE VARIABLE_NAME='innodb_file_format_check';
|
||||||
INNODB_FILE_FORMAT_MAX Barracuda
|
IF(@@GLOBAL.innodb_file_format_check, "ON", "OFF") = VARIABLE_VALUE
|
||||||
set session innodb_file_format_max='Salmon';
|
1
|
||||||
ERROR HY000: Variable 'innodb_file_format_max' is a GLOBAL variable and should be set with SET GLOBAL
|
1 Expected
|
||||||
set @@session.innodb_file_format_max='Salmon';
|
SELECT COUNT(@@GLOBAL.innodb_file_format_check);
|
||||||
ERROR HY000: Variable 'innodb_file_format_max' is a GLOBAL variable and should be set with SET GLOBAL
|
COUNT(@@GLOBAL.innodb_file_format_check)
|
||||||
set global innodb_file_format_max=1.1;
|
1
|
||||||
ERROR 42000: Incorrect argument type to variable 'innodb_file_format_max'
|
1 Expected
|
||||||
set global innodb_file_format_max=1e1;
|
SELECT COUNT(VARIABLE_VALUE)
|
||||||
ERROR 42000: Incorrect argument type to variable 'innodb_file_format_max'
|
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||||
set global innodb_file_format_max='Salmon';
|
WHERE VARIABLE_NAME='innodb_file_format_check';
|
||||||
ERROR 42000: Variable 'innodb_file_format_max' can't be set to the value of 'Salmon'
|
COUNT(VARIABLE_VALUE)
|
||||||
SET @@global.innodb_file_format_max = @start_global_value;
|
1
|
||||||
SELECT @@global.innodb_file_format_max;
|
1 Expected
|
||||||
@@global.innodb_file_format_max
|
SELECT @@innodb_file_format_check = @@GLOBAL.innodb_file_format_check;
|
||||||
Antelope
|
@@innodb_file_format_check = @@GLOBAL.innodb_file_format_check
|
||||||
|
1
|
||||||
|
1 Expected
|
||||||
|
SELECT COUNT(@@innodb_file_format_check);
|
||||||
|
COUNT(@@innodb_file_format_check)
|
||||||
|
1
|
||||||
|
1 Expected
|
||||||
|
SELECT COUNT(@@local.innodb_file_format_check);
|
||||||
|
ERROR HY000: Variable 'innodb_file_format_check' is a GLOBAL variable
|
||||||
|
Expected error 'Variable is a GLOBAL variable'
|
||||||
|
SELECT COUNT(@@SESSION.innodb_file_format_check);
|
||||||
|
ERROR HY000: Variable 'innodb_file_format_check' is a GLOBAL variable
|
||||||
|
Expected error 'Variable is a GLOBAL variable'
|
||||||
|
SELECT COUNT(@@GLOBAL.innodb_file_format_check);
|
||||||
|
COUNT(@@GLOBAL.innodb_file_format_check)
|
||||||
|
1
|
||||||
|
1 Expected
|
||||||
|
SELECT innodb_file_format_check = @@SESSION.innodb_file_format_check;
|
||||||
|
ERROR 42S22: Unknown column 'innodb_file_format_check' in 'field list'
|
||||||
|
Expected error 'Readonly variable'
|
||||||
|
@ -0,0 +1,65 @@
|
|||||||
|
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_max in ('Antelope', 'Barracuda');
|
||||||
|
@@global.innodb_file_format_max in ('Antelope', 'Barracuda')
|
||||||
|
1
|
||||||
|
SELECT @@global.innodb_file_format_max;
|
||||||
|
@@global.innodb_file_format_max
|
||||||
|
Antelope
|
||||||
|
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_max Antelope
|
||||||
|
SHOW session variables LIKE 'innodb_file_format_max';
|
||||||
|
Variable_name Value
|
||||||
|
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_MAX Antelope
|
||||||
|
SELECT * FROM information_schema.session_variables
|
||||||
|
WHERE variable_name='innodb_file_format_max';
|
||||||
|
VARIABLE_NAME VARIABLE_VALUE
|
||||||
|
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_max';
|
||||||
|
VARIABLE_NAME VARIABLE_VALUE
|
||||||
|
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_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_max';
|
||||||
|
VARIABLE_NAME VARIABLE_VALUE
|
||||||
|
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_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
|
@ -0,0 +1,64 @@
|
|||||||
|
SET @start_global_value = @@global.innodb_rollback_segments;
|
||||||
|
SELECT @start_global_value;
|
||||||
|
@start_global_value
|
||||||
|
128
|
||||||
|
Valid values are zero or above
|
||||||
|
SELECT @@global.innodb_rollback_segments >=0;
|
||||||
|
@@global.innodb_rollback_segments >=0
|
||||||
|
1
|
||||||
|
SELECT @@global.innodb_rollback_segments <=128;
|
||||||
|
@@global.innodb_rollback_segments <=128
|
||||||
|
1
|
||||||
|
SELECT @@global.innodb_rollback_segments;
|
||||||
|
@@global.innodb_rollback_segments
|
||||||
|
128
|
||||||
|
SELECT @@session.innodb_rollback_segments;
|
||||||
|
ERROR HY000: Variable 'innodb_rollback_segments' is a GLOBAL variable
|
||||||
|
SHOW global variables LIKE 'innodb_rollback_segments';
|
||||||
|
Variable_name Value
|
||||||
|
innodb_rollback_segments 128
|
||||||
|
SHOW session variables LIKE 'innodb_rollback_segments';
|
||||||
|
Variable_name Value
|
||||||
|
innodb_rollback_segments 128
|
||||||
|
SELECT * FROM information_schema.global_variables
|
||||||
|
WHERE variable_name='innodb_rollback_segments';
|
||||||
|
VARIABLE_NAME VARIABLE_VALUE
|
||||||
|
INNODB_ROLLBACK_SEGMENTS 128
|
||||||
|
SELECT * FROM information_schema.session_variables
|
||||||
|
WHERE variable_name='innodb_rollback_segments';
|
||||||
|
VARIABLE_NAME VARIABLE_VALUE
|
||||||
|
INNODB_ROLLBACK_SEGMENTS 128
|
||||||
|
SET global innodb_rollback_segments=100;
|
||||||
|
SELECT @@global.innodb_rollback_segments;
|
||||||
|
@@global.innodb_rollback_segments
|
||||||
|
100
|
||||||
|
SELECT * FROM information_schema.global_variables
|
||||||
|
WHERE variable_name='innodb_rollback_segments';
|
||||||
|
VARIABLE_NAME VARIABLE_VALUE
|
||||||
|
INNODB_ROLLBACK_SEGMENTS 100
|
||||||
|
SELECT * FROM information_schema.session_variables
|
||||||
|
WHERE variable_name='innodb_rollback_segments';
|
||||||
|
VARIABLE_NAME VARIABLE_VALUE
|
||||||
|
INNODB_ROLLBACK_SEGMENTS 100
|
||||||
|
SET session innodb_rollback_segments=1;
|
||||||
|
ERROR HY000: Variable 'innodb_rollback_segments' is a GLOBAL variable and should be set with SET GLOBAL
|
||||||
|
SET global innodb_rollback_segments=1.1;
|
||||||
|
ERROR 42000: Incorrect argument type to variable 'innodb_rollback_segments'
|
||||||
|
SET global innodb_rollback_segments=1e1;
|
||||||
|
ERROR 42000: Incorrect argument type to variable 'innodb_rollback_segments'
|
||||||
|
SET global innodb_rollback_segments="foo";
|
||||||
|
ERROR 42000: Incorrect argument type to variable 'innodb_rollback_segments'
|
||||||
|
SET global innodb_rollback_segments=-7;
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect innodb_rollback_segments value: '-7'
|
||||||
|
SELECT @@global.innodb_rollback_segments;
|
||||||
|
@@global.innodb_rollback_segments
|
||||||
|
1
|
||||||
|
SELECT * FROM information_schema.global_variables
|
||||||
|
WHERE variable_name='innodb_rollback_segments';
|
||||||
|
VARIABLE_NAME VARIABLE_VALUE
|
||||||
|
INNODB_ROLLBACK_SEGMENTS 1
|
||||||
|
SET @@global.innodb_rollback_segments = @start_global_value;
|
||||||
|
SELECT @@global.innodb_rollback_segments;
|
||||||
|
@@global.innodb_rollback_segments
|
||||||
|
128
|
83
mysql-test/suite/sys_vars/r/innodb_stats_method_basic.result
Normal file
83
mysql-test/suite/sys_vars/r/innodb_stats_method_basic.result
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
SET @start_global_value = @@global.innodb_stats_method;
|
||||||
|
SELECT @start_global_value;
|
||||||
|
@start_global_value
|
||||||
|
nulls_equal
|
||||||
|
Valid values are 'nulls_equal', 'nulls_unequal', 'nulls_ignored'
|
||||||
|
SELECT @@global.innodb_stats_method in ('nulls_equal', 'nulls_unequal',
|
||||||
|
'nulls_ignored');
|
||||||
|
@@global.innodb_stats_method in ('nulls_equal', 'nulls_unequal',
|
||||||
|
'nulls_ignored')
|
||||||
|
1
|
||||||
|
SELECT @@global.innodb_stats_method;
|
||||||
|
@@global.innodb_stats_method
|
||||||
|
nulls_equal
|
||||||
|
SELECT @@session.innodb_stats_method;
|
||||||
|
ERROR HY000: Variable 'innodb_stats_method' is a GLOBAL variable
|
||||||
|
SHOW global variables LIKE 'innodb_stats_method';
|
||||||
|
Variable_name Value
|
||||||
|
innodb_stats_method nulls_equal
|
||||||
|
SHOW session variables LIKE 'innodb_stats_method';
|
||||||
|
Variable_name Value
|
||||||
|
innodb_stats_method nulls_equal
|
||||||
|
SELECT * FROM information_schema.global_variables
|
||||||
|
WHERE variable_name='innodb_stats_method';
|
||||||
|
VARIABLE_NAME VARIABLE_VALUE
|
||||||
|
INNODB_STATS_METHOD nulls_equal
|
||||||
|
SELECT * FROM information_schema.session_variables
|
||||||
|
WHERE variable_name='innodb_stats_method';
|
||||||
|
VARIABLE_NAME VARIABLE_VALUE
|
||||||
|
INNODB_STATS_METHOD nulls_equal
|
||||||
|
SET global innodb_stats_method='nulls_equal';
|
||||||
|
SELECT @@global.innodb_stats_method;
|
||||||
|
@@global.innodb_stats_method
|
||||||
|
nulls_equal
|
||||||
|
SELECT * FROM information_schema.global_variables
|
||||||
|
WHERE variable_name='innodb_stats_method';
|
||||||
|
VARIABLE_NAME VARIABLE_VALUE
|
||||||
|
INNODB_STATS_METHOD nulls_equal
|
||||||
|
SELECT * FROM information_schema.session_variables
|
||||||
|
WHERE variable_name='innodb_stats_method';
|
||||||
|
VARIABLE_NAME VARIABLE_VALUE
|
||||||
|
INNODB_STATS_METHOD nulls_equal
|
||||||
|
SET @@global.innodb_stats_method='nulls_unequal';
|
||||||
|
SELECT @@global.innodb_stats_method;
|
||||||
|
@@global.innodb_stats_method
|
||||||
|
nulls_unequal
|
||||||
|
SELECT * FROM information_schema.global_variables
|
||||||
|
WHERE variable_name='innodb_stats_method';
|
||||||
|
VARIABLE_NAME VARIABLE_VALUE
|
||||||
|
INNODB_STATS_METHOD nulls_unequal
|
||||||
|
SELECT * FROM information_schema.session_variables
|
||||||
|
WHERE variable_name='innodb_stats_method';
|
||||||
|
VARIABLE_NAME VARIABLE_VALUE
|
||||||
|
INNODB_STATS_METHOD nulls_unequal
|
||||||
|
SET global innodb_stats_method=2;
|
||||||
|
SELECT @@global.innodb_stats_method;
|
||||||
|
@@global.innodb_stats_method
|
||||||
|
nulls_ignored
|
||||||
|
SELECT * FROM information_schema.global_variables
|
||||||
|
WHERE variable_name='innodb_stats_method';
|
||||||
|
VARIABLE_NAME VARIABLE_VALUE
|
||||||
|
INNODB_STATS_METHOD nulls_ignored
|
||||||
|
SELECT * FROM information_schema.session_variables
|
||||||
|
WHERE variable_name='innodb_stats_method';
|
||||||
|
VARIABLE_NAME VARIABLE_VALUE
|
||||||
|
INNODB_STATS_METHOD nulls_ignored
|
||||||
|
SET session innodb_stats_method='nulls_equal';
|
||||||
|
ERROR HY000: Variable 'innodb_stats_method' is a GLOBAL variable and should be set with SET GLOBAL
|
||||||
|
SET @@session.innodb_stats_method='nulls_ignored';
|
||||||
|
ERROR HY000: Variable 'innodb_stats_method' is a GLOBAL variable and should be set with SET GLOBAL
|
||||||
|
SET global innodb_stats_method=1.1;
|
||||||
|
ERROR 42000: Incorrect argument type to variable 'innodb_stats_method'
|
||||||
|
SET global innodb_stats_method=4;
|
||||||
|
ERROR 42000: Variable 'innodb_stats_method' can't be set to the value of '4'
|
||||||
|
SET global innodb_stats_method=-2;
|
||||||
|
ERROR 42000: Variable 'innodb_stats_method' can't be set to the value of '-2'
|
||||||
|
SET global innodb_stats_method=1e1;
|
||||||
|
ERROR 42000: Incorrect argument type to variable 'innodb_stats_method'
|
||||||
|
SET global innodb_stats_method='some';
|
||||||
|
ERROR 42000: Variable 'innodb_stats_method' can't be set to the value of 'some'
|
||||||
|
SET @@global.innodb_stats_method = @start_global_value;
|
||||||
|
SELECT @@global.innodb_stats_method;
|
||||||
|
@@global.innodb_stats_method
|
||||||
|
nulls_equal
|
@ -1,55 +1,95 @@
|
|||||||
|
|
||||||
|
|
||||||
# 2010-01-25 - Added
|
|
||||||
#
|
#
|
||||||
|
# 2011-08-02 - Added
|
||||||
|
#
|
||||||
|
|
||||||
--source include/not_embedded.inc
|
--source include/not_embedded.inc
|
||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
|
|
||||||
SET @start_global_value = @@global.innodb_file_format_max;
|
SET @start_global_value = @@global.innodb_file_format_check;
|
||||||
SELECT @start_global_value;
|
SELECT @start_global_value;
|
||||||
|
|
||||||
#
|
#
|
||||||
# exists as global only
|
# exists as global only
|
||||||
#
|
#
|
||||||
--echo Valid values are 'Antelope' and 'Barracuda'
|
--echo Valid values are 'ON' and 'OFF'
|
||||||
select @@global.innodb_file_format_max in ('Antelope', 'Barracuda');
|
SELECT @@global.innodb_file_format_check in (0, 1);
|
||||||
select @@global.innodb_file_format_max;
|
SELECT @@global.innodb_file_format_check;
|
||||||
|
|
||||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||||
select @@session.innodb_file_format_max;
|
SELECT @@session.innodb_file_format_check;
|
||||||
show global variables like 'innodb_file_format_max';
|
SHOW global variables LIKE 'innodb_file_format_check';
|
||||||
show session variables like 'innodb_file_format_max';
|
SHOW session variables LIKE 'innodb_file_format_check';
|
||||||
select * from information_schema.global_variables where variable_name='innodb_file_format_max';
|
SELECT * FROM information_schema.global_variables
|
||||||
select * from information_schema.session_variables where variable_name='innodb_file_format_max';
|
WHERE variable_name='innodb_file_format_check';
|
||||||
|
SELECT * FROM information_schema.session_variables
|
||||||
|
WHERE variable_name='innodb_file_format_check';
|
||||||
|
|
||||||
#
|
#
|
||||||
# show that it's writable
|
# show that it's read only
|
||||||
#
|
#
|
||||||
set global innodb_file_format_max='Antelope';
|
|
||||||
select @@global.innodb_file_format_max;
|
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||||
select * from information_schema.global_variables where variable_name='innodb_file_format_max';
|
SET @@global.innodb_file_format_check='Off';
|
||||||
select * from information_schema.session_variables where variable_name='innodb_file_format_max';
|
--echo Expected error 'Read only variable'
|
||||||
set @@global.innodb_file_format_max='Barracuda';
|
|
||||||
select @@global.innodb_file_format_max;
|
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||||
select * from information_schema.global_variables where variable_name='innodb_file_format_max';
|
SET @@global.innodb_file_format_check=1;
|
||||||
select * from information_schema.session_variables where variable_name='innodb_file_format_max';
|
--echo Expected error 'Read only variable'
|
||||||
|
|
||||||
|
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||||
|
SET @@global.innodb_file_format_check=0;
|
||||||
|
--echo Expected error 'Read only variable'
|
||||||
|
|
||||||
|
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||||
|
SET @@global.innodb_file_format_check='On';
|
||||||
|
--echo Expected error 'Read only variable'
|
||||||
|
|
||||||
--error ER_GLOBAL_VARIABLE
|
--error ER_GLOBAL_VARIABLE
|
||||||
set session innodb_file_format_max='Salmon';
|
SET session innodb_large_prefix='OFF';
|
||||||
--error ER_GLOBAL_VARIABLE
|
--error ER_GLOBAL_VARIABLE
|
||||||
set @@session.innodb_file_format_max='Salmon';
|
SET @@session.innodb_stats_on_metadata='ON';
|
||||||
|
|
||||||
#
|
#
|
||||||
# incorrect types
|
# Check if the value in GLOBAL Table matches value in variable
|
||||||
#
|
|
||||||
--error ER_WRONG_TYPE_FOR_VAR
|
|
||||||
set global innodb_file_format_max=1.1;
|
|
||||||
--error ER_WRONG_TYPE_FOR_VAR
|
|
||||||
set global innodb_file_format_max=1e1;
|
|
||||||
--error ER_WRONG_VALUE_FOR_VAR
|
|
||||||
set global innodb_file_format_max='Salmon';
|
|
||||||
|
|
||||||
#
|
|
||||||
# Cleanup
|
|
||||||
#
|
#
|
||||||
|
|
||||||
SET @@global.innodb_file_format_max = @start_global_value;
|
SELECT IF(@@GLOBAL.innodb_file_format_check, "ON", "OFF") = VARIABLE_VALUE
|
||||||
SELECT @@global.innodb_file_format_max;
|
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||||
|
WHERE VARIABLE_NAME='innodb_file_format_check';
|
||||||
|
--echo 1 Expected
|
||||||
|
|
||||||
|
SELECT COUNT(@@GLOBAL.innodb_file_format_check);
|
||||||
|
--echo 1 Expected
|
||||||
|
|
||||||
|
SELECT COUNT(VARIABLE_VALUE)
|
||||||
|
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||||
|
WHERE VARIABLE_NAME='innodb_file_format_check';
|
||||||
|
--echo 1 Expected
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check if accessing variable with and without GLOBAL point to same variable
|
||||||
|
#
|
||||||
|
SELECT @@innodb_file_format_check = @@GLOBAL.innodb_file_format_check;
|
||||||
|
--echo 1 Expected
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check if innodb_doublewrite can be accessed with and without @@ sign
|
||||||
|
#
|
||||||
|
|
||||||
|
SELECT COUNT(@@innodb_file_format_check);
|
||||||
|
--echo 1 Expected
|
||||||
|
|
||||||
|
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||||
|
SELECT COUNT(@@local.innodb_file_format_check);
|
||||||
|
--echo Expected error 'Variable is a GLOBAL variable'
|
||||||
|
|
||||||
|
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||||
|
SELECT COUNT(@@SESSION.innodb_file_format_check);
|
||||||
|
--echo Expected error 'Variable is a GLOBAL variable'
|
||||||
|
|
||||||
|
SELECT COUNT(@@GLOBAL.innodb_file_format_check);
|
||||||
|
--echo 1 Expected
|
||||||
|
|
||||||
|
--Error ER_BAD_FIELD_ERROR
|
||||||
|
SELECT innodb_file_format_check = @@SESSION.innodb_file_format_check;
|
||||||
|
--echo Expected error 'Readonly variable'
|
||||||
|
@ -0,0 +1,60 @@
|
|||||||
|
#
|
||||||
|
# 2011-08-02 - Added
|
||||||
|
#
|
||||||
|
--source include/not_embedded.inc
|
||||||
|
--source include/have_innodb.inc
|
||||||
|
|
||||||
|
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_max in ('Antelope', 'Barracuda');
|
||||||
|
SELECT @@global.innodb_file_format_max;
|
||||||
|
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||||
|
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_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_max='Salmon';
|
||||||
|
--error ER_GLOBAL_VARIABLE
|
||||||
|
SET @@session.innodb_file_format_max='Salmon';
|
||||||
|
|
||||||
|
#
|
||||||
|
# incorrect types
|
||||||
|
#
|
||||||
|
--error ER_WRONG_TYPE_FOR_VAR
|
||||||
|
SET global innodb_file_format_max=1.1;
|
||||||
|
--error ER_WRONG_TYPE_FOR_VAR
|
||||||
|
SET global innodb_file_format_max=1e1;
|
||||||
|
--error ER_WRONG_VALUE_FOR_VAR
|
||||||
|
SET global innodb_file_format_max='Salmon';
|
||||||
|
|
||||||
|
#
|
||||||
|
# Cleanup
|
||||||
|
#
|
||||||
|
|
||||||
|
SET @@global.innodb_file_format_max = @start_global_value;
|
||||||
|
SELECT @@global.innodb_file_format_max;
|
@ -0,0 +1,58 @@
|
|||||||
|
#
|
||||||
|
# 2011-08-01 Added
|
||||||
|
#
|
||||||
|
|
||||||
|
--source include/have_innodb.inc
|
||||||
|
|
||||||
|
SET @start_global_value = @@global.innodb_rollback_segments;
|
||||||
|
SELECT @start_global_value;
|
||||||
|
|
||||||
|
#
|
||||||
|
# exists as global only
|
||||||
|
#
|
||||||
|
--echo Valid values are zero or above
|
||||||
|
SELECT @@global.innodb_rollback_segments >=0;
|
||||||
|
SELECT @@global.innodb_rollback_segments <=128;
|
||||||
|
SELECT @@global.innodb_rollback_segments;
|
||||||
|
|
||||||
|
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||||
|
SELECT @@session.innodb_rollback_segments;
|
||||||
|
SHOW global variables LIKE 'innodb_rollback_segments';
|
||||||
|
SHOW session variables LIKE 'innodb_rollback_segments';
|
||||||
|
SELECT * FROM information_schema.global_variables
|
||||||
|
WHERE variable_name='innodb_rollback_segments';
|
||||||
|
SELECT * FROM information_schema.session_variables
|
||||||
|
WHERE variable_name='innodb_rollback_segments';
|
||||||
|
|
||||||
|
#
|
||||||
|
# show that it's writable
|
||||||
|
#
|
||||||
|
SET global innodb_rollback_segments=100;
|
||||||
|
SELECT @@global.innodb_rollback_segments;
|
||||||
|
SELECT * FROM information_schema.global_variables
|
||||||
|
WHERE variable_name='innodb_rollback_segments';
|
||||||
|
SELECT * FROM information_schema.session_variables
|
||||||
|
WHERE variable_name='innodb_rollback_segments';
|
||||||
|
--error ER_GLOBAL_VARIABLE
|
||||||
|
SET session innodb_rollback_segments=1;
|
||||||
|
|
||||||
|
#
|
||||||
|
# incorrect types
|
||||||
|
#
|
||||||
|
--error ER_WRONG_TYPE_FOR_VAR
|
||||||
|
SET global innodb_rollback_segments=1.1;
|
||||||
|
--error ER_WRONG_TYPE_FOR_VAR
|
||||||
|
SET global innodb_rollback_segments=1e1;
|
||||||
|
--error ER_WRONG_TYPE_FOR_VAR
|
||||||
|
SET global innodb_rollback_segments="foo";
|
||||||
|
SET global innodb_rollback_segments=-7;
|
||||||
|
SELECT @@global.innodb_rollback_segments;
|
||||||
|
SELECT * FROM information_schema.global_variables
|
||||||
|
WHERE variable_name='innodb_rollback_segments';
|
||||||
|
|
||||||
|
#
|
||||||
|
# cleanup
|
||||||
|
#
|
||||||
|
|
||||||
|
SET @@global.innodb_rollback_segments = @start_global_value;
|
||||||
|
SELECT @@global.innodb_rollback_segments;
|
72
mysql-test/suite/sys_vars/t/innodb_stats_method_basic.test
Normal file
72
mysql-test/suite/sys_vars/t/innodb_stats_method_basic.test
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
#
|
||||||
|
# 2011-08-05 - Added
|
||||||
|
#
|
||||||
|
|
||||||
|
--source include/have_innodb.inc
|
||||||
|
|
||||||
|
SET @start_global_value = @@global.innodb_stats_method;
|
||||||
|
SELECT @start_global_value;
|
||||||
|
|
||||||
|
#
|
||||||
|
# exists as global only
|
||||||
|
#
|
||||||
|
--echo Valid values are 'nulls_equal', 'nulls_unequal', 'nulls_ignored'
|
||||||
|
SELECT @@global.innodb_stats_method in ('nulls_equal', 'nulls_unequal',
|
||||||
|
'nulls_ignored');
|
||||||
|
SELECT @@global.innodb_stats_method;
|
||||||
|
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||||
|
SELECT @@session.innodb_stats_method;
|
||||||
|
SHOW global variables LIKE 'innodb_stats_method';
|
||||||
|
SHOW session variables LIKE 'innodb_stats_method';
|
||||||
|
SELECT * FROM information_schema.global_variables
|
||||||
|
WHERE variable_name='innodb_stats_method';
|
||||||
|
SELECT * FROM information_schema.session_variables
|
||||||
|
WHERE variable_name='innodb_stats_method';
|
||||||
|
|
||||||
|
#
|
||||||
|
# show that it's writable
|
||||||
|
#
|
||||||
|
SET global innodb_stats_method='nulls_equal';
|
||||||
|
SELECT @@global.innodb_stats_method;
|
||||||
|
SELECT * FROM information_schema.global_variables
|
||||||
|
WHERE variable_name='innodb_stats_method';
|
||||||
|
SELECT * FROM information_schema.session_variables
|
||||||
|
WHERE variable_name='innodb_stats_method';
|
||||||
|
SET @@global.innodb_stats_method='nulls_unequal';
|
||||||
|
SELECT @@global.innodb_stats_method;
|
||||||
|
SELECT * FROM information_schema.global_variables
|
||||||
|
WHERE variable_name='innodb_stats_method';
|
||||||
|
SELECT * FROM information_schema.session_variables
|
||||||
|
WHERE variable_name='innodb_stats_method';
|
||||||
|
SET global innodb_stats_method=2;
|
||||||
|
SELECT @@global.innodb_stats_method;
|
||||||
|
SELECT * FROM information_schema.global_variables
|
||||||
|
WHERE variable_name='innodb_stats_method';
|
||||||
|
SELECT * FROM information_schema.session_variables
|
||||||
|
WHERE variable_name='innodb_stats_method';
|
||||||
|
|
||||||
|
--error ER_GLOBAL_VARIABLE
|
||||||
|
SET session innodb_stats_method='nulls_equal';
|
||||||
|
--error ER_GLOBAL_VARIABLE
|
||||||
|
SET @@session.innodb_stats_method='nulls_ignored';
|
||||||
|
|
||||||
|
#
|
||||||
|
# incorrect types
|
||||||
|
#
|
||||||
|
--error ER_WRONG_TYPE_FOR_VAR
|
||||||
|
SET global innodb_stats_method=1.1;
|
||||||
|
--error ER_WRONG_VALUE_FOR_VAR
|
||||||
|
SET global innodb_stats_method=4;
|
||||||
|
--error ER_WRONG_VALUE_FOR_VAR
|
||||||
|
SET global innodb_stats_method=-2;
|
||||||
|
--error ER_WRONG_TYPE_FOR_VAR
|
||||||
|
SET global innodb_stats_method=1e1;
|
||||||
|
--error ER_WRONG_VALUE_FOR_VAR
|
||||||
|
SET global innodb_stats_method='some';
|
||||||
|
|
||||||
|
#
|
||||||
|
# Cleanup
|
||||||
|
#
|
||||||
|
|
||||||
|
SET @@global.innodb_stats_method = @start_global_value;
|
||||||
|
SELECT @@global.innodb_stats_method;
|
Reference in New Issue
Block a user