summaryrefslogtreecommitdiff
path: root/mysql-test/suite/sys_vars
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/sys_vars')
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_file_format_check_basic.result127
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_file_format_max_basic.result66
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_file_per_table_basic.result27
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_force_load_corrupted_basic.result53
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_large_prefix_basic.result93
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_lock_wait_timeout_basic.result21
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_random_read_ahead_basic.result92
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_rollback_segments_basic.result65
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_stats_method_basic.result84
-rw-r--r--mysql-test/suite/sys_vars/r/max_join_size_func.result4
-rw-r--r--mysql-test/suite/sys_vars/r/plugin_dir_basic.result10
-rw-r--r--mysql-test/suite/sys_vars/r/sql_big_selects_func.result2
-rw-r--r--mysql-test/suite/sys_vars/r/sql_max_join_size_func.result2
-rw-r--r--mysql-test/suite/sys_vars/t/binlog_dbug_fsync_sleep_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/debug_crc_break_basic.test1
-rw-r--r--mysql-test/suite/sys_vars/t/disabled.def3
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_autoinc_lock_mode_basic.test3
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_fast_shutdown_basic.test4
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_file_format_check_basic.test112
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_file_format_max_basic-master.opt1
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_file_format_max_basic.test61
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_file_per_table_basic.test22
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_force_load_corrupted_basic.test102
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_io_capacity_basic.test4
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_large_prefix_basic.test71
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_lock_wait_timeout_basic.test24
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_basic.test4
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_random_read_ahead_basic.test70
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_rollback_segments_basic.test59
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_stats_method_basic.test73
-rw-r--r--mysql-test/suite/sys_vars/t/mutex_deadlock_detector_basic.test1
-rw-r--r--mysql-test/suite/sys_vars/t/plugin_dir_basic-master.opt1
-rw-r--r--mysql-test/suite/sys_vars/t/plugin_dir_basic.test16
33 files changed, 1137 insertions, 143 deletions
diff --git a/mysql-test/suite/sys_vars/r/innodb_file_format_check_basic.result b/mysql-test/suite/sys_vars/r/innodb_file_format_check_basic.result
index c59e1b802f4..9167585f1d6 100644
--- a/mysql-test/suite/sys_vars/r/innodb_file_format_check_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_file_format_check_basic.result
@@ -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;
@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';
+1
+Valid values are 'ON' and 'OFF'
+SELECT @@global.innodb_file_format_check in (0, 1);
+@@global.innodb_file_format_check in (0, 1)
+1
+SELECT @@global.innodb_file_format_check;
+@@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
-innodb_file_format_max Antelope
-show session variables like 'innodb_file_format_max';
+innodb_file_format_check ON
+SHOW session variables LIKE 'innodb_file_format_check';
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';
+innodb_file_format_check ON
+SELECT * FROM information_schema.global_variables
+WHERE variable_name='innodb_file_format_check';
VARIABLE_NAME VARIABLE_VALUE
-INNODB_FILE_FORMAT_MAX Barracuda
-select * from information_schema.session_variables where variable_name='innodb_file_format_max';
+INNODB_FILE_FORMAT_CHECK ON
+SELECT * FROM information_schema.session_variables
+WHERE variable_name='innodb_file_format_check';
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
+INNODB_FILE_FORMAT_CHECK ON
+SET @@global.innodb_file_format_check='Off';
+ERROR HY000: Variable 'innodb_file_format_check' is a read only variable
+Expected error 'Read only variable'
+SET @@global.innodb_file_format_check=1;
+ERROR HY000: Variable 'innodb_file_format_check' is a read only variable
+Expected error 'Read only variable'
+SET @@global.innodb_file_format_check=0;
+ERROR HY000: Variable 'innodb_file_format_check' is a read only variable
+Expected error 'Read only variable'
+SET @@global.innodb_file_format_check='On';
+ERROR HY000: Variable 'innodb_file_format_check' is a read only variable
+Expected error 'Read only variable'
+SET session innodb_large_prefix='OFF';
+ERROR HY000: Variable 'innodb_large_prefix' is a GLOBAL variable and should be set with SET GLOBAL
+SET @@session.innodb_stats_on_metadata='ON';
+ERROR HY000: Variable 'innodb_stats_on_metadata' is a GLOBAL variable and should be set with SET GLOBAL
+SELECT IF(@@GLOBAL.innodb_file_format_check, "ON", "OFF") = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_file_format_check';
+IF(@@GLOBAL.innodb_file_format_check, "ON", "OFF") = VARIABLE_VALUE
+1
+1 Expected
+SELECT COUNT(@@GLOBAL.innodb_file_format_check);
+COUNT(@@GLOBAL.innodb_file_format_check)
+1
+1 Expected
+SELECT COUNT(VARIABLE_VALUE)
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_file_format_check';
+COUNT(VARIABLE_VALUE)
+1
+1 Expected
+SELECT @@innodb_file_format_check = @@GLOBAL.innodb_file_format_check;
+@@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'
diff --git a/mysql-test/suite/sys_vars/r/innodb_file_format_max_basic.result b/mysql-test/suite/sys_vars/r/innodb_file_format_max_basic.result
index d9d067c2cf9..32b2262c091 100644
--- a/mysql-test/suite/sys_vars/r/innodb_file_format_max_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_file_format_max_basic.result
@@ -1 +1,65 @@
-XtraDB extension
+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
diff --git a/mysql-test/suite/sys_vars/r/innodb_file_per_table_basic.result b/mysql-test/suite/sys_vars/r/innodb_file_per_table_basic.result
index 163eb31f686..ecf11351cd9 100644
--- a/mysql-test/suite/sys_vars/r/innodb_file_per_table_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_file_per_table_basic.result
@@ -1,13 +1,29 @@
+SET @start_global_value = @@global.innodb_file_per_table;
+SELECT @start_global_value;
+@start_global_value
+0
'#---------------------BS_STVARS_028_01----------------------#'
SELECT COUNT(@@GLOBAL.innodb_file_per_table);
COUNT(@@GLOBAL.innodb_file_per_table)
1
1 Expected
'#---------------------BS_STVARS_028_02----------------------#'
-SELECT COUNT(@@GLOBAL.innodb_file_per_table);
-COUNT(@@GLOBAL.innodb_file_per_table)
+SET @@global.innodb_file_per_table = 0;
+SELECT @@global.innodb_file_per_table;
+@@global.innodb_file_per_table
+0
+SET @@global.innodb_file_per_table ='On' ;
+SELECT @@global.innodb_file_per_table;
+@@global.innodb_file_per_table
+1
+SET @@global.innodb_file_per_table ='Off' ;
+SELECT @@global.innodb_file_per_table;
+@@global.innodb_file_per_table
+0
+SET @@global.innodb_file_per_table = 1;
+SELECT @@global.innodb_file_per_table;
+@@global.innodb_file_per_table
1
-1 Expected
'#---------------------BS_STVARS_028_03----------------------#'
SELECT IF(@@GLOBAL.innodb_file_per_table,'ON','OFF') = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
@@ -47,4 +63,7 @@ COUNT(@@GLOBAL.innodb_file_per_table)
1 Expected
SELECT innodb_file_per_table = @@SESSION.innodb_file_per_table;
ERROR 42S22: Unknown column 'innodb_file_per_table' in 'field list'
-Expected error 'Readonly variable'
+SET @@global.innodb_file_per_table = @start_global_value;
+SELECT @@global.innodb_file_per_table;
+@@global.innodb_file_per_table
+0
diff --git a/mysql-test/suite/sys_vars/r/innodb_force_load_corrupted_basic.result b/mysql-test/suite/sys_vars/r/innodb_force_load_corrupted_basic.result
new file mode 100644
index 00000000000..bc9b7019eb8
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_force_load_corrupted_basic.result
@@ -0,0 +1,53 @@
+'#---------------------BS_STVARS_031_01----------------------#'
+SELECT COUNT(@@GLOBAL.innodb_force_load_corrupted);
+COUNT(@@GLOBAL.innodb_force_load_corrupted)
+1
+1 Expected
+'#---------------------BS_STVARS_031_02----------------------#'
+SET @@GLOBAL.innodb_force_load_corrupted=1;
+ERROR HY000: Variable 'innodb_force_load_corrupted' is a read only variable
+Expected error 'Read only variable'
+SELECT COUNT(@@GLOBAL.innodb_force_load_corrupted);
+COUNT(@@GLOBAL.innodb_force_load_corrupted)
+1
+1 Expected
+'#---------------------BS_STVARS_031_03----------------------#'
+SELECT IF(@@GLOBAL.innodb_force_load_corrupted, "ON", "OFF") = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_force_load_corrupted';
+IF(@@GLOBAL.innodb_force_load_corrupted, "ON", "OFF") = VARIABLE_VALUE
+1
+1 Expected
+SELECT COUNT(@@GLOBAL.innodb_force_load_corrupted);
+COUNT(@@GLOBAL.innodb_force_load_corrupted)
+1
+1 Expected
+SELECT COUNT(VARIABLE_VALUE)
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_force_load_corrupted';
+COUNT(VARIABLE_VALUE)
+1
+1 Expected
+'#---------------------BS_STVARS_031_04----------------------#'
+SELECT @@innodb_force_load_corrupted = @@GLOBAL.innodb_force_load_corrupted;
+@@innodb_force_load_corrupted = @@GLOBAL.innodb_force_load_corrupted
+1
+1 Expected
+'#---------------------BS_STVARS_031_05----------------------#'
+SELECT COUNT(@@innodb_force_load_corrupted);
+COUNT(@@innodb_force_load_corrupted)
+1
+1 Expected
+SELECT COUNT(@@local.innodb_force_load_corrupted);
+ERROR HY000: Variable 'innodb_force_load_corrupted' is a GLOBAL variable
+Expected error 'Variable is a GLOBAL variable'
+SELECT COUNT(@@SESSION.innodb_force_load_corrupted);
+ERROR HY000: Variable 'innodb_force_load_corrupted' is a GLOBAL variable
+Expected error 'Variable is a GLOBAL variable'
+SELECT COUNT(@@GLOBAL.innodb_force_load_corrupted);
+COUNT(@@GLOBAL.innodb_force_load_corrupted)
+1
+1 Expected
+SELECT innodb_force_load_corrupted = @@SESSION.innodb_force_load_corrupted;
+ERROR 42S22: Unknown column 'innodb_force_load_corrupted' in 'field list'
+Expected error 'Readonly variable'
diff --git a/mysql-test/suite/sys_vars/r/innodb_large_prefix_basic.result b/mysql-test/suite/sys_vars/r/innodb_large_prefix_basic.result
index d9d067c2cf9..adb56b347cd 100644
--- a/mysql-test/suite/sys_vars/r/innodb_large_prefix_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_large_prefix_basic.result
@@ -1 +1,92 @@
-XtraDB extension
+SET @start_global_value = @@global.innodb_large_prefix;
+SELECT @start_global_value;
+@start_global_value
+0
+Valid values are 'ON' and 'OFF'
+select @@global.innodb_large_prefix in (0, 1);
+@@global.innodb_large_prefix in (0, 1)
+1
+select @@global.innodb_large_prefix;
+@@global.innodb_large_prefix
+0
+select @@session.innodb_large_prefix;
+ERROR HY000: Variable 'innodb_large_prefix' is a GLOBAL variable
+show global variables like 'innodb_large_prefix';
+Variable_name Value
+innodb_large_prefix OFF
+show session variables like 'innodb_large_prefix';
+Variable_name Value
+innodb_large_prefix OFF
+select * from information_schema.global_variables where variable_name='innodb_large_prefix';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_LARGE_PREFIX OFF
+select * from information_schema.session_variables where variable_name='innodb_large_prefix';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_LARGE_PREFIX OFF
+set global innodb_large_prefix='OFF';
+select @@global.innodb_large_prefix;
+@@global.innodb_large_prefix
+0
+select * from information_schema.global_variables where variable_name='innodb_large_prefix';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_LARGE_PREFIX OFF
+select * from information_schema.session_variables where variable_name='innodb_large_prefix';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_LARGE_PREFIX OFF
+set @@global.innodb_large_prefix=1;
+select @@global.innodb_large_prefix;
+@@global.innodb_large_prefix
+1
+select * from information_schema.global_variables where variable_name='innodb_large_prefix';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_LARGE_PREFIX ON
+select * from information_schema.session_variables where variable_name='innodb_large_prefix';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_LARGE_PREFIX ON
+set global innodb_large_prefix=0;
+select @@global.innodb_large_prefix;
+@@global.innodb_large_prefix
+0
+select * from information_schema.global_variables where variable_name='innodb_large_prefix';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_LARGE_PREFIX OFF
+select * from information_schema.session_variables where variable_name='innodb_large_prefix';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_LARGE_PREFIX OFF
+set @@global.innodb_large_prefix='ON';
+select @@global.innodb_large_prefix;
+@@global.innodb_large_prefix
+1
+select * from information_schema.global_variables where variable_name='innodb_large_prefix';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_LARGE_PREFIX ON
+select * from information_schema.session_variables where variable_name='innodb_large_prefix';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_LARGE_PREFIX ON
+set session innodb_large_prefix='OFF';
+ERROR HY000: Variable 'innodb_large_prefix' is a GLOBAL variable and should be set with SET GLOBAL
+set @@session.innodb_large_prefix='ON';
+ERROR HY000: Variable 'innodb_large_prefix' is a GLOBAL variable and should be set with SET GLOBAL
+set global innodb_large_prefix=1.1;
+ERROR 42000: Incorrect argument type to variable 'innodb_large_prefix'
+set global innodb_large_prefix=1e1;
+ERROR 42000: Incorrect argument type to variable 'innodb_large_prefix'
+set global innodb_large_prefix=2;
+ERROR 42000: Variable 'innodb_large_prefix' can't be set to the value of '2'
+NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
+set global innodb_large_prefix=-3;
+select @@global.innodb_large_prefix;
+@@global.innodb_large_prefix
+1
+select * from information_schema.global_variables where variable_name='innodb_large_prefix';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_LARGE_PREFIX ON
+select * from information_schema.session_variables where variable_name='innodb_large_prefix';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_LARGE_PREFIX ON
+set global innodb_large_prefix='AUTO';
+ERROR 42000: Variable 'innodb_large_prefix' can't be set to the value of 'AUTO'
+SET @@global.innodb_large_prefix = @start_global_value;
+SELECT @@global.innodb_large_prefix;
+@@global.innodb_large_prefix
+0
diff --git a/mysql-test/suite/sys_vars/r/innodb_lock_wait_timeout_basic.result b/mysql-test/suite/sys_vars/r/innodb_lock_wait_timeout_basic.result
index 89960e5860f..1dcc2d554ce 100644
--- a/mysql-test/suite/sys_vars/r/innodb_lock_wait_timeout_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_lock_wait_timeout_basic.result
@@ -1,13 +1,21 @@
+SET @start_global_value=@@global.innodb_lock_wait_timeout;
+SELECT @start_global_value;
+@start_global_value
+50
'#---------------------BS_STVARS_032_01----------------------#'
SELECT COUNT(@@GLOBAL.innodb_lock_wait_timeout);
COUNT(@@GLOBAL.innodb_lock_wait_timeout)
1
1 Expected
'#---------------------BS_STVARS_032_02----------------------#'
-SELECT COUNT(@@GLOBAL.innodb_lock_wait_timeout);
-COUNT(@@GLOBAL.innodb_lock_wait_timeout)
-1
-1 Expected
+SET global innodb_lock_wait_timeout=60;
+SELECT @@global.innodb_lock_wait_timeout;
+@@global.innodb_lock_wait_timeout
+60
+SET session innodb_lock_wait_timeout=60;
+SELECT @@session.innodb_lock_wait_timeout;
+@@session.innodb_lock_wait_timeout
+60
'#---------------------BS_STVARS_032_03----------------------#'
SELECT @@GLOBAL.innodb_lock_wait_timeout = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
@@ -47,4 +55,7 @@ COUNT(@@GLOBAL.innodb_lock_wait_timeout)
1 Expected
SELECT innodb_lock_wait_timeout = @@SESSION.innodb_lock_wait_timeout;
ERROR 42S22: Unknown column 'innodb_lock_wait_timeout' in 'field list'
-Expected error 'Readonly variable'
+SET @@global.innodb_lock_wait_timeout = @start_global_value;
+SELECT @@global.innodb_lock_wait_timeout;
+@@global.innodb_lock_wait_timeout
+50
diff --git a/mysql-test/suite/sys_vars/r/innodb_random_read_ahead_basic.result b/mysql-test/suite/sys_vars/r/innodb_random_read_ahead_basic.result
new file mode 100644
index 00000000000..d627aa92ba7
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_random_read_ahead_basic.result
@@ -0,0 +1,92 @@
+SET @start_global_value = @@global.innodb_random_read_ahead;
+SELECT @start_global_value;
+@start_global_value
+0
+Valid values are 'ON' and 'OFF'
+select @@global.innodb_random_read_ahead in (0, 1);
+@@global.innodb_random_read_ahead in (0, 1)
+1
+select @@global.innodb_random_read_ahead;
+@@global.innodb_random_read_ahead
+0
+select @@session.innodb_random_read_ahead;
+ERROR HY000: Variable 'innodb_random_read_ahead' is a GLOBAL variable
+show global variables like 'innodb_random_read_ahead';
+Variable_name Value
+innodb_random_read_ahead OFF
+show session variables like 'innodb_random_read_ahead';
+Variable_name Value
+innodb_random_read_ahead OFF
+select * from information_schema.global_variables where variable_name='innodb_random_read_ahead';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_RANDOM_READ_AHEAD OFF
+select * from information_schema.session_variables where variable_name='innodb_random_read_ahead';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_RANDOM_READ_AHEAD OFF
+set global innodb_random_read_ahead='ON';
+select @@global.innodb_random_read_ahead;
+@@global.innodb_random_read_ahead
+1
+select * from information_schema.global_variables where variable_name='innodb_random_read_ahead';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_RANDOM_READ_AHEAD ON
+select * from information_schema.session_variables where variable_name='innodb_random_read_ahead';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_RANDOM_READ_AHEAD ON
+set @@global.innodb_random_read_ahead=0;
+select @@global.innodb_random_read_ahead;
+@@global.innodb_random_read_ahead
+0
+select * from information_schema.global_variables where variable_name='innodb_random_read_ahead';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_RANDOM_READ_AHEAD OFF
+select * from information_schema.session_variables where variable_name='innodb_random_read_ahead';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_RANDOM_READ_AHEAD OFF
+set global innodb_random_read_ahead=1;
+select @@global.innodb_random_read_ahead;
+@@global.innodb_random_read_ahead
+1
+select * from information_schema.global_variables where variable_name='innodb_random_read_ahead';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_RANDOM_READ_AHEAD ON
+select * from information_schema.session_variables where variable_name='innodb_random_read_ahead';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_RANDOM_READ_AHEAD ON
+set @@global.innodb_random_read_ahead='OFF';
+select @@global.innodb_random_read_ahead;
+@@global.innodb_random_read_ahead
+0
+select * from information_schema.global_variables where variable_name='innodb_random_read_ahead';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_RANDOM_READ_AHEAD OFF
+select * from information_schema.session_variables where variable_name='innodb_random_read_ahead';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_RANDOM_READ_AHEAD OFF
+set session innodb_random_read_ahead='OFF';
+ERROR HY000: Variable 'innodb_random_read_ahead' is a GLOBAL variable and should be set with SET GLOBAL
+set @@session.innodb_random_read_ahead='ON';
+ERROR HY000: Variable 'innodb_random_read_ahead' is a GLOBAL variable and should be set with SET GLOBAL
+set global innodb_random_read_ahead=1.1;
+ERROR 42000: Incorrect argument type to variable 'innodb_random_read_ahead'
+set global innodb_random_read_ahead=1e1;
+ERROR 42000: Incorrect argument type to variable 'innodb_random_read_ahead'
+set global innodb_random_read_ahead=2;
+ERROR 42000: Variable 'innodb_random_read_ahead' can't be set to the value of '2'
+NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
+set global innodb_random_read_ahead=-3;
+select @@global.innodb_random_read_ahead;
+@@global.innodb_random_read_ahead
+1
+select * from information_schema.global_variables where variable_name='innodb_random_read_ahead';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_RANDOM_READ_AHEAD ON
+select * from information_schema.session_variables where variable_name='innodb_random_read_ahead';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_RANDOM_READ_AHEAD ON
+set global innodb_random_read_ahead='AUTO';
+ERROR 42000: Variable 'innodb_random_read_ahead' can't be set to the value of 'AUTO'
+SET @@global.innodb_random_read_ahead = @start_global_value;
+SELECT @@global.innodb_random_read_ahead;
+@@global.innodb_random_read_ahead
+0
diff --git a/mysql-test/suite/sys_vars/r/innodb_rollback_segments_basic.result b/mysql-test/suite/sys_vars/r/innodb_rollback_segments_basic.result
index d9d067c2cf9..a8d392eee38 100644
--- a/mysql-test/suite/sys_vars/r/innodb_rollback_segments_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_rollback_segments_basic.result
@@ -1 +1,64 @@
-XtraDB extension
+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
diff --git a/mysql-test/suite/sys_vars/r/innodb_stats_method_basic.result b/mysql-test/suite/sys_vars/r/innodb_stats_method_basic.result
index d9d067c2cf9..6599ca9edb6 100644
--- a/mysql-test/suite/sys_vars/r/innodb_stats_method_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_stats_method_basic.result
@@ -1 +1,83 @@
-XtraDB extension
+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
diff --git a/mysql-test/suite/sys_vars/r/max_join_size_func.result b/mysql-test/suite/sys_vars/r/max_join_size_func.result
index bf535579433..0bf4f507b0c 100644
--- a/mysql-test/suite/sys_vars/r/max_join_size_func.result
+++ b/mysql-test/suite/sys_vars/r/max_join_size_func.result
@@ -41,7 +41,7 @@ id name id name
SET @@session.max_join_size=8;
## Since total joins are more than max_join_size value so error will occur ##
SELECT * FROM t1 INNER JOIN t2 ON t1.id = t2.id;
-ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
+ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
'#--------------------FN_DYNVARS_079_03-------------------------#'
## Setting global value of variable ##
SET @@global.max_join_size=8;
@@ -52,7 +52,7 @@ SELECT @@global.max_join_size;
8
## Since total joins are more than max_join_size value so error will occur ##
SELECT * FROM t1 INNER JOIN t2 ON t1.id = t2.id;
-ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
+ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
## Dropping both the tables ##
Drop table t1, t2;
## Restoring values ##
diff --git a/mysql-test/suite/sys_vars/r/plugin_dir_basic.result b/mysql-test/suite/sys_vars/r/plugin_dir_basic.result
index c18f4cd2a1d..a5f36de73fa 100644
--- a/mysql-test/suite/sys_vars/r/plugin_dir_basic.result
+++ b/mysql-test/suite/sys_vars/r/plugin_dir_basic.result
@@ -1,20 +1,20 @@
select @@global.plugin_dir;
@@global.plugin_dir
-MYSQL_LIBDIR/plugins
+MYSQL_TMP_DIR
select @@session.plugin_dir;
ERROR HY000: Variable 'plugin_dir' is a GLOBAL variable
show global variables like 'plugin_dir';
Variable_name Value
-plugin_dir MYSQL_LIBDIR/plugins
+plugin_dir MYSQL_TMP_DIR
show session variables like 'plugin_dir';
Variable_name Value
-plugin_dir MYSQL_LIBDIR/plugins
+plugin_dir MYSQL_TMP_DIR
select * from information_schema.global_variables where variable_name='plugin_dir';
VARIABLE_NAME VARIABLE_VALUE
-PLUGIN_DIR MYSQL_LIBDIR/plugins
+PLUGIN_DIR MYSQL_TMP_DIR
select * from information_schema.session_variables where variable_name='plugin_dir';
VARIABLE_NAME VARIABLE_VALUE
-PLUGIN_DIR MYSQL_LIBDIR/plugins
+PLUGIN_DIR MYSQL_TMP_DIR
set global plugin_dir=1;
ERROR HY000: Variable 'plugin_dir' is a read only variable
set session plugin_dir=1;
diff --git a/mysql-test/suite/sys_vars/r/sql_big_selects_func.result b/mysql-test/suite/sys_vars/r/sql_big_selects_func.result
index 72631dbb1d5..ceac0ce539d 100644
--- a/mysql-test/suite/sys_vars/r/sql_big_selects_func.result
+++ b/mysql-test/suite/sys_vars/r/sql_big_selects_func.result
@@ -21,7 +21,7 @@ INSERT INTO t2 VALUES('aa4','bb');
'#--------------------FN_DYNVARS_154_01-------------------------#'
Expected error "Too big select"
SELECT * FROM t1 INNER JOIN t2 ON t1.a = t2.a;
-ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
+ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
Expected error The SELECT would examine more than MAX_JOIN_SIZE rows.
'#--------------------FN_DYNVARS_154_02-------------------------#'
SET SESSION SQL_BIG_SELECTS = 1;
diff --git a/mysql-test/suite/sys_vars/r/sql_max_join_size_func.result b/mysql-test/suite/sys_vars/r/sql_max_join_size_func.result
index 0dc85925c6b..377c2c9c4ca 100644
--- a/mysql-test/suite/sys_vars/r/sql_max_join_size_func.result
+++ b/mysql-test/suite/sys_vars/r/sql_max_join_size_func.result
@@ -19,7 +19,7 @@ SET SESSION sql_max_join_size=9;
Warnings:
Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MySQL 7.0. Please use '@@max_join_size' instead
SELECT * FROM t1 INNER JOIN t2 ON t1.a = t2.a;
-ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
+ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
Expected error The SELECT would examine more than MAX_JOIN_SIZE rows.
'#--------------------FN_DYNVARS_161_02-------------------------#'
SET SESSION SQL_BIG_SELECTS = 1;
diff --git a/mysql-test/suite/sys_vars/t/binlog_dbug_fsync_sleep_basic.test b/mysql-test/suite/sys_vars/t/binlog_dbug_fsync_sleep_basic.test
index f4e1161aa07..8e9f4651929 100644
--- a/mysql-test/suite/sys_vars/t/binlog_dbug_fsync_sleep_basic.test
+++ b/mysql-test/suite/sys_vars/t/binlog_dbug_fsync_sleep_basic.test
@@ -1,3 +1,5 @@
+--source include/have_debug.inc
+
# ulong global
SET @start_global_value = @@global.binlog_dbug_fsync_sleep;
diff --git a/mysql-test/suite/sys_vars/t/debug_crc_break_basic.test b/mysql-test/suite/sys_vars/t/debug_crc_break_basic.test
index f7d17a8e5ad..6e37a47c5b8 100644
--- a/mysql-test/suite/sys_vars/t/debug_crc_break_basic.test
+++ b/mysql-test/suite/sys_vars/t/debug_crc_break_basic.test
@@ -1,3 +1,4 @@
+--source include/have_debug.inc
# ulong global
SET @start_global_value = @@global.debug_crc_break;
diff --git a/mysql-test/suite/sys_vars/t/disabled.def b/mysql-test/suite/sys_vars/t/disabled.def
index 888298bbb09..133754ed6ce 100644
--- a/mysql-test/suite/sys_vars/t/disabled.def
+++ b/mysql-test/suite/sys_vars/t/disabled.def
@@ -9,3 +9,6 @@
# Do not use any TAB characters for whitespace.
#
##############################################################################
+
+innodb_force_load_corrupted_basic : not in XtraDB (yet?)
+innodb_random_read_ahead_basic : not in XtraDB (yet?)
diff --git a/mysql-test/suite/sys_vars/t/innodb_autoinc_lock_mode_basic.test b/mysql-test/suite/sys_vars/t/innodb_autoinc_lock_mode_basic.test
index 5b6fa943bbe..e07234a9152 100644
--- a/mysql-test/suite/sys_vars/t/innodb_autoinc_lock_mode_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_autoinc_lock_mode_basic.test
@@ -1,8 +1,7 @@
################# mysql-test\t\innodb_autoinc_lock_mode_basic.test ############
# #
# Variable Name: innodb_autoinc_lock_mode #
-# Scope: GLOBAL #
-# Access Type: Dynamic #
+# Access Type: Static #
# Data Type: Numeric #
# Default Value: 1 #
# Range: 0,1,2 #
diff --git a/mysql-test/suite/sys_vars/t/innodb_fast_shutdown_basic.test b/mysql-test/suite/sys_vars/t/innodb_fast_shutdown_basic.test
index 636309a3088..e1b62046313 100644
--- a/mysql-test/suite/sys_vars/t/innodb_fast_shutdown_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_fast_shutdown_basic.test
@@ -3,9 +3,9 @@
# Variable Name: innodb_fast_shutdown #
# Scope: GLOBAL #
# Access Type: Dynamic #
-# Data Type: boolean #
+# Data Type: numeric #
# Default Value: 1 #
-# Valid Values: 0,1 #
+# Valid Values: 0,1,2 #
# #
# #
# Creation Date: 2008-02-20 #
diff --git a/mysql-test/suite/sys_vars/t/innodb_file_format_check_basic.test b/mysql-test/suite/sys_vars/t/innodb_file_format_check_basic.test
index cbf25af2442..f9f61b9380c 100644
--- a/mysql-test/suite/sys_vars/t/innodb_file_format_check_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_file_format_check_basic.test
@@ -1,55 +1,95 @@
-
-
-# 2010-01-25 - Added
#
+# 2011-08-02 - Added
+#
+
--source include/not_embedded.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;
#
# 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;
+--echo Valid values are 'ON' and 'OFF'
+SELECT @@global.innodb_file_format_check in (0, 1);
+SELECT @@global.innodb_file_format_check;
+
+--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';
+
+#
+# show that it's read only
+#
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SET @@global.innodb_file_format_check='Off';
+--echo Expected error 'Read only variable'
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SET @@global.innodb_file_format_check=1;
+--echo Expected error 'Read only variable'
+
--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';
+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
-set session innodb_file_format_max='Salmon';
+SET session innodb_large_prefix='OFF';
--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';
+
+SELECT IF(@@GLOBAL.innodb_file_format_check, "ON", "OFF") = VARIABLE_VALUE
+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
#
-# Cleanup
+# 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
-SET @@global.innodb_file_format_max = @start_global_value;
-SELECT @@global.innodb_file_format_max;
+--Error ER_BAD_FIELD_ERROR
+SELECT innodb_file_format_check = @@SESSION.innodb_file_format_check;
+--echo Expected error 'Readonly variable'
diff --git a/mysql-test/suite/sys_vars/t/innodb_file_format_max_basic-master.opt b/mysql-test/suite/sys_vars/t/innodb_file_format_max_basic-master.opt
new file mode 100644
index 00000000000..cef79bc8585
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_file_format_max_basic-master.opt
@@ -0,0 +1 @@
+--force-restart
diff --git a/mysql-test/suite/sys_vars/t/innodb_file_format_max_basic.test b/mysql-test/suite/sys_vars/t/innodb_file_format_max_basic.test
index 00aa476e8d2..c2cb4cb47bb 100644
--- a/mysql-test/suite/sys_vars/t/innodb_file_format_max_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_file_format_max_basic.test
@@ -1 +1,60 @@
---echo XtraDB extension
+#
+# 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;
diff --git a/mysql-test/suite/sys_vars/t/innodb_file_per_table_basic.test b/mysql-test/suite/sys_vars/t/innodb_file_per_table_basic.test
index 76a50df8879..1478d6df2e9 100644
--- a/mysql-test/suite/sys_vars/t/innodb_file_per_table_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_file_per_table_basic.test
@@ -4,7 +4,7 @@
# #
# Variable Name: innodb_file_per_table #
# Scope: Global #
-# Access Type: Static #
+# Access Type: Dynamic #
# Data Type: boolean #
# #
# #
@@ -24,6 +24,10 @@
--source include/have_innodb.inc
+SET @start_global_value = @@global.innodb_file_per_table;
+SELECT @start_global_value;
+
+
--echo '#---------------------BS_STVARS_028_01----------------------#'
####################################################################
# Displaying default value #
@@ -37,11 +41,17 @@ SELECT COUNT(@@GLOBAL.innodb_file_per_table);
# Check if Value can set #
####################################################################
-SELECT COUNT(@@GLOBAL.innodb_file_per_table);
---echo 1 Expected
+SET @@global.innodb_file_per_table = 0;
+SELECT @@global.innodb_file_per_table;
+SET @@global.innodb_file_per_table ='On' ;
+SELECT @@global.innodb_file_per_table;
+SET @@global.innodb_file_per_table ='Off' ;
+SELECT @@global.innodb_file_per_table;
+SET @@global.innodb_file_per_table = 1;
+SELECT @@global.innodb_file_per_table;
--echo '#---------------------BS_STVARS_028_03----------------------#'
#################################################################
@@ -93,6 +103,10 @@ SELECT COUNT(@@GLOBAL.innodb_file_per_table);
--Error ER_BAD_FIELD_ERROR
SELECT innodb_file_per_table = @@SESSION.innodb_file_per_table;
---echo Expected error 'Readonly variable'
+#
+# Cleanup
+#
+SET @@global.innodb_file_per_table = @start_global_value;
+SELECT @@global.innodb_file_per_table;
diff --git a/mysql-test/suite/sys_vars/t/innodb_force_load_corrupted_basic.test b/mysql-test/suite/sys_vars/t/innodb_force_load_corrupted_basic.test
new file mode 100644
index 00000000000..1726b320f47
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_force_load_corrupted_basic.test
@@ -0,0 +1,102 @@
+
+
+################## mysql-test\t\innodb_force_load_corrupted_basic.test #####
+# #
+# Variable Name: innodb_force_load_corrupted #
+# Scope: Global #
+# Access Type: Static #
+# Data Type: boolean #
+# #
+# #
+# Creation Date: 2008-02-07 #
+# Author : Sharique Abdullah #
+# #
+# #
+# Description:Test Cases of Dynamic System Variable innodb_force_load_corrupted#
+# that checks the behavior of this variable in the following ways #
+# * Value Check #
+# * Scope Check #
+# #
+# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
+# server-system-variables.html #
+# #
+###############################################################################
+
+--source include/have_innodb.inc
+
+--echo '#---------------------BS_STVARS_031_01----------------------#'
+####################################################################
+# Displaying default value #
+####################################################################
+SELECT COUNT(@@GLOBAL.innodb_force_load_corrupted);
+--echo 1 Expected
+
+
+--echo '#---------------------BS_STVARS_031_02----------------------#'
+####################################################################
+# Check if Value can set #
+####################################################################
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SET @@GLOBAL.innodb_force_load_corrupted=1;
+--echo Expected error 'Read only variable'
+
+SELECT COUNT(@@GLOBAL.innodb_force_load_corrupted);
+--echo 1 Expected
+
+
+
+
+--echo '#---------------------BS_STVARS_031_03----------------------#'
+#################################################################
+# Check if the value in GLOBAL Table matches value in variable #
+#################################################################
+
+SELECT IF(@@GLOBAL.innodb_force_load_corrupted, "ON", "OFF") = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_force_load_corrupted';
+--echo 1 Expected
+
+SELECT COUNT(@@GLOBAL.innodb_force_load_corrupted);
+--echo 1 Expected
+
+SELECT COUNT(VARIABLE_VALUE)
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_force_load_corrupted';
+--echo 1 Expected
+
+
+
+--echo '#---------------------BS_STVARS_031_04----------------------#'
+################################################################################
+# Check if accessing variable with and without GLOBAL point to same variable #
+################################################################################
+SELECT @@innodb_force_load_corrupted = @@GLOBAL.innodb_force_load_corrupted;
+--echo 1 Expected
+
+
+
+--echo '#---------------------BS_STVARS_031_05----------------------#'
+################################################################################
+# Check if innodb_force_load_corrupted can be accessed with and without @@ sign #
+################################################################################
+
+SELECT COUNT(@@innodb_force_load_corrupted);
+--echo 1 Expected
+
+--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SELECT COUNT(@@local.innodb_force_load_corrupted);
+--echo Expected error 'Variable is a GLOBAL variable'
+
+--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SELECT COUNT(@@SESSION.innodb_force_load_corrupted);
+--echo Expected error 'Variable is a GLOBAL variable'
+
+SELECT COUNT(@@GLOBAL.innodb_force_load_corrupted);
+--echo 1 Expected
+
+--Error ER_BAD_FIELD_ERROR
+SELECT innodb_force_load_corrupted = @@SESSION.innodb_force_load_corrupted;
+--echo Expected error 'Readonly variable'
+
+
diff --git a/mysql-test/suite/sys_vars/t/innodb_io_capacity_basic.test b/mysql-test/suite/sys_vars/t/innodb_io_capacity_basic.test
index 3f00b50cf08..0ced5800d4b 100644
--- a/mysql-test/suite/sys_vars/t/innodb_io_capacity_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_io_capacity_basic.test
@@ -54,5 +54,9 @@ select * from information_schema.global_variables where variable_name='innodb_io
set global innodb_io_capacity=100;
select @@global.innodb_io_capacity;
+#
+# cleanup
+#
+
SET @@global.innodb_io_capacity = @start_global_value;
SELECT @@global.innodb_io_capacity;
diff --git a/mysql-test/suite/sys_vars/t/innodb_large_prefix_basic.test b/mysql-test/suite/sys_vars/t/innodb_large_prefix_basic.test
index 00aa476e8d2..582e9ffbee8 100644
--- a/mysql-test/suite/sys_vars/t/innodb_large_prefix_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_large_prefix_basic.test
@@ -1 +1,70 @@
---echo XtraDB extension
+
+
+# 2010-01-25 - Added
+#
+
+--source include/have_innodb.inc
+
+SET @start_global_value = @@global.innodb_large_prefix;
+SELECT @start_global_value;
+
+#
+# exists as global only
+#
+--echo Valid values are 'ON' and 'OFF'
+select @@global.innodb_large_prefix in (0, 1);
+select @@global.innodb_large_prefix;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.innodb_large_prefix;
+show global variables like 'innodb_large_prefix';
+show session variables like 'innodb_large_prefix';
+select * from information_schema.global_variables where variable_name='innodb_large_prefix';
+select * from information_schema.session_variables where variable_name='innodb_large_prefix';
+
+#
+# show that it's writable
+#
+set global innodb_large_prefix='OFF';
+select @@global.innodb_large_prefix;
+select * from information_schema.global_variables where variable_name='innodb_large_prefix';
+select * from information_schema.session_variables where variable_name='innodb_large_prefix';
+set @@global.innodb_large_prefix=1;
+select @@global.innodb_large_prefix;
+select * from information_schema.global_variables where variable_name='innodb_large_prefix';
+select * from information_schema.session_variables where variable_name='innodb_large_prefix';
+set global innodb_large_prefix=0;
+select @@global.innodb_large_prefix;
+select * from information_schema.global_variables where variable_name='innodb_large_prefix';
+select * from information_schema.session_variables where variable_name='innodb_large_prefix';
+set @@global.innodb_large_prefix='ON';
+select @@global.innodb_large_prefix;
+select * from information_schema.global_variables where variable_name='innodb_large_prefix';
+select * from information_schema.session_variables where variable_name='innodb_large_prefix';
+--error ER_GLOBAL_VARIABLE
+set session innodb_large_prefix='OFF';
+--error ER_GLOBAL_VARIABLE
+set @@session.innodb_large_prefix='ON';
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global innodb_large_prefix=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global innodb_large_prefix=1e1;
+--error ER_WRONG_VALUE_FOR_VAR
+set global innodb_large_prefix=2;
+--echo NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
+set global innodb_large_prefix=-3;
+select @@global.innodb_large_prefix;
+select * from information_schema.global_variables where variable_name='innodb_large_prefix';
+select * from information_schema.session_variables where variable_name='innodb_large_prefix';
+--error ER_WRONG_VALUE_FOR_VAR
+set global innodb_large_prefix='AUTO';
+
+#
+# Cleanup
+#
+
+SET @@global.innodb_large_prefix = @start_global_value;
+SELECT @@global.innodb_large_prefix;
diff --git a/mysql-test/suite/sys_vars/t/innodb_lock_wait_timeout_basic.test b/mysql-test/suite/sys_vars/t/innodb_lock_wait_timeout_basic.test
index 8cfd23fd6e7..f80b8e48736 100644
--- a/mysql-test/suite/sys_vars/t/innodb_lock_wait_timeout_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_lock_wait_timeout_basic.test
@@ -3,13 +3,13 @@
################## mysql-test\t\innodb_lock_wait_timeout_basic.test ###########
# #
# Variable Name: innodb_lock_wait_timeout #
-# Scope: Global #
-# Access Type: Static #
+# Scope: Global , Session #
+# Access Type: Dynamic #
# Data Type: numeric #
# #
# #
# Creation Date: 2008-02-07 #
-# Author : Sharique Abdullah #
+# Author : Sharique Abdullah #
# #
# #
# Description:Test Cases of Dynamic System Variable innodb_lock_wait_timeout #
@@ -24,6 +24,9 @@
--source include/have_innodb.inc
+SET @start_global_value=@@global.innodb_lock_wait_timeout;
+SELECT @start_global_value;
+
--echo '#---------------------BS_STVARS_032_01----------------------#'
####################################################################
# Displaying default value #
@@ -37,11 +40,10 @@ SELECT COUNT(@@GLOBAL.innodb_lock_wait_timeout);
# Check if Value can set #
####################################################################
-SELECT COUNT(@@GLOBAL.innodb_lock_wait_timeout);
---echo 1 Expected
-
-
-
+SET global innodb_lock_wait_timeout=60;
+SELECT @@global.innodb_lock_wait_timeout;
+SET session innodb_lock_wait_timeout=60;
+SELECT @@session.innodb_lock_wait_timeout;
--echo '#---------------------BS_STVARS_032_03----------------------#'
#################################################################
@@ -89,6 +91,10 @@ SELECT COUNT(@@GLOBAL.innodb_lock_wait_timeout);
--Error ER_BAD_FIELD_ERROR
SELECT innodb_lock_wait_timeout = @@SESSION.innodb_lock_wait_timeout;
---echo Expected error 'Readonly variable'
+#
+# Cleanup
+#
+SET @@global.innodb_lock_wait_timeout = @start_global_value;
+SELECT @@global.innodb_lock_wait_timeout;
diff --git a/mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_basic.test b/mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_basic.test
index 38c3acd92a2..7e70ed11351 100644
--- a/mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_basic.test
@@ -4,8 +4,8 @@
# Scope: GLOBAL #
# Access Type: Dynamic #
# Data Type: Numeric #
-# Default Value: 90 #
-# Range: 0-1000 #
+# Default Value: 75 #
+# Range: 0-99 #
# #
# #
# Creation Date: 2008-02-07 #
diff --git a/mysql-test/suite/sys_vars/t/innodb_random_read_ahead_basic.test b/mysql-test/suite/sys_vars/t/innodb_random_read_ahead_basic.test
new file mode 100644
index 00000000000..f78223bad02
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_random_read_ahead_basic.test
@@ -0,0 +1,70 @@
+
+
+# 2010-01-25 - Added
+#
+
+--source include/have_innodb.inc
+
+SET @start_global_value = @@global.innodb_random_read_ahead;
+SELECT @start_global_value;
+
+#
+# exists as global only
+#
+--echo Valid values are 'ON' and 'OFF'
+select @@global.innodb_random_read_ahead in (0, 1);
+select @@global.innodb_random_read_ahead;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.innodb_random_read_ahead;
+show global variables like 'innodb_random_read_ahead';
+show session variables like 'innodb_random_read_ahead';
+select * from information_schema.global_variables where variable_name='innodb_random_read_ahead';
+select * from information_schema.session_variables where variable_name='innodb_random_read_ahead';
+
+#
+# show that it's writable
+#
+set global innodb_random_read_ahead='ON';
+select @@global.innodb_random_read_ahead;
+select * from information_schema.global_variables where variable_name='innodb_random_read_ahead';
+select * from information_schema.session_variables where variable_name='innodb_random_read_ahead';
+set @@global.innodb_random_read_ahead=0;
+select @@global.innodb_random_read_ahead;
+select * from information_schema.global_variables where variable_name='innodb_random_read_ahead';
+select * from information_schema.session_variables where variable_name='innodb_random_read_ahead';
+set global innodb_random_read_ahead=1;
+select @@global.innodb_random_read_ahead;
+select * from information_schema.global_variables where variable_name='innodb_random_read_ahead';
+select * from information_schema.session_variables where variable_name='innodb_random_read_ahead';
+set @@global.innodb_random_read_ahead='OFF';
+select @@global.innodb_random_read_ahead;
+select * from information_schema.global_variables where variable_name='innodb_random_read_ahead';
+select * from information_schema.session_variables where variable_name='innodb_random_read_ahead';
+--error ER_GLOBAL_VARIABLE
+set session innodb_random_read_ahead='OFF';
+--error ER_GLOBAL_VARIABLE
+set @@session.innodb_random_read_ahead='ON';
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global innodb_random_read_ahead=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global innodb_random_read_ahead=1e1;
+--error ER_WRONG_VALUE_FOR_VAR
+set global innodb_random_read_ahead=2;
+--echo NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
+set global innodb_random_read_ahead=-3;
+select @@global.innodb_random_read_ahead;
+select * from information_schema.global_variables where variable_name='innodb_random_read_ahead';
+select * from information_schema.session_variables where variable_name='innodb_random_read_ahead';
+--error ER_WRONG_VALUE_FOR_VAR
+set global innodb_random_read_ahead='AUTO';
+
+#
+# Cleanup
+#
+
+SET @@global.innodb_random_read_ahead = @start_global_value;
+SELECT @@global.innodb_random_read_ahead;
diff --git a/mysql-test/suite/sys_vars/t/innodb_rollback_segments_basic.test b/mysql-test/suite/sys_vars/t/innodb_rollback_segments_basic.test
index 00aa476e8d2..9f0b70a528f 100644
--- a/mysql-test/suite/sys_vars/t/innodb_rollback_segments_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_rollback_segments_basic.test
@@ -1 +1,58 @@
---echo XtraDB extension
+#
+# 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;
diff --git a/mysql-test/suite/sys_vars/t/innodb_stats_method_basic.test b/mysql-test/suite/sys_vars/t/innodb_stats_method_basic.test
index 00aa476e8d2..f01574c3683 100644
--- a/mysql-test/suite/sys_vars/t/innodb_stats_method_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_stats_method_basic.test
@@ -1 +1,72 @@
---echo XtraDB extension
+#
+# 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;
diff --git a/mysql-test/suite/sys_vars/t/mutex_deadlock_detector_basic.test b/mysql-test/suite/sys_vars/t/mutex_deadlock_detector_basic.test
index 03b7743a7aa..98f5af90cac 100644
--- a/mysql-test/suite/sys_vars/t/mutex_deadlock_detector_basic.test
+++ b/mysql-test/suite/sys_vars/t/mutex_deadlock_detector_basic.test
@@ -1,3 +1,4 @@
+--source include/have_debug.inc
# bool readonly
#
diff --git a/mysql-test/suite/sys_vars/t/plugin_dir_basic-master.opt b/mysql-test/suite/sys_vars/t/plugin_dir_basic-master.opt
new file mode 100644
index 00000000000..69a9f0def2a
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/plugin_dir_basic-master.opt
@@ -0,0 +1 @@
+--plugin-dir=$MYSQL_TMP_DIR
diff --git a/mysql-test/suite/sys_vars/t/plugin_dir_basic.test b/mysql-test/suite/sys_vars/t/plugin_dir_basic.test
index 8bb231c2c5e..59889f7ecb2 100644
--- a/mysql-test/suite/sys_vars/t/plugin_dir_basic.test
+++ b/mysql-test/suite/sys_vars/t/plugin_dir_basic.test
@@ -3,22 +3,20 @@
#
#
-# on windows it's <basedir>/lib/plugin
-# on unix it's <basedir>/lib/mysql/plugin
-# unless mtr sets it to $MYSQL_TEST_DIR/var/plugins
+# Don't rely on being able to guess the correct default.
+# -master.opt file for this test sets plugin_dir to a known directory
#
-let plugindir=$MYSQLTEST_VARDIR;
---replace_result $plugindir MYSQL_LIBDIR $MYSQL_LIBDIR MYSQL_LIBDIR /mysql/ /
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR /mysql/ /
select @@global.plugin_dir;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
select @@session.plugin_dir;
---replace_result $plugindir MYSQL_LIBDIR $MYSQL_LIBDIR MYSQL_LIBDIR /mysql/ /
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR /mysql/ /
show global variables like 'plugin_dir';
---replace_result $plugindir MYSQL_LIBDIR $MYSQL_LIBDIR MYSQL_LIBDIR /mysql/ /
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR /mysql/ /
show session variables like 'plugin_dir';
---replace_result $plugindir MYSQL_LIBDIR $MYSQL_LIBDIR MYSQL_LIBDIR /mysql/ /
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR /mysql/ /
select * from information_schema.global_variables where variable_name='plugin_dir';
---replace_result $plugindir MYSQL_LIBDIR $MYSQL_LIBDIR MYSQL_LIBDIR /mysql/ /
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR /mysql/ /
select * from information_schema.session_variables where variable_name='plugin_dir';
#