Browse Source
Add missing sys_vars tests for InnoDB variables.
Add missing sys_vars tests for InnoDB variables.
6 changed files with 234 additions and 6 deletions
-
2mysql-test/suite/sys_vars/r/all_vars.result
-
64mysql-test/suite/sys_vars/r/innodb_change_buffering_debug_basic.result
-
65mysql-test/suite/sys_vars/r/innodb_trx_rseg_n_slots_debug_basic.result
-
4mysql-test/suite/sys_vars/t/all_vars.test
-
52mysql-test/suite/sys_vars/t/innodb_change_buffering_debug_basic.test
-
53mysql-test/suite/sys_vars/t/innodb_trx_rseg_n_slots_debug_basic.test
@ -0,0 +1,64 @@ |
|||||
|
SET @start_global_value = @@global.innodb_change_buffering_debug; |
||||
|
SELECT @start_global_value; |
||||
|
@start_global_value |
||||
|
0 |
||||
|
select @@global.innodb_change_buffering_debug in (0, 1); |
||||
|
@@global.innodb_change_buffering_debug in (0, 1) |
||||
|
1 |
||||
|
select @@global.innodb_change_buffering_debug; |
||||
|
@@global.innodb_change_buffering_debug |
||||
|
0 |
||||
|
select @@session.innodb_change_buffering_debug; |
||||
|
ERROR HY000: Variable 'innodb_change_buffering_debug' is a GLOBAL variable |
||||
|
show global variables like 'innodb_change_buffering_debug'; |
||||
|
Variable_name Value |
||||
|
innodb_change_buffering_debug 0 |
||||
|
show session variables like 'innodb_change_buffering_debug'; |
||||
|
Variable_name Value |
||||
|
innodb_change_buffering_debug 0 |
||||
|
select * from information_schema.global_variables where variable_name='innodb_change_buffering_debug'; |
||||
|
VARIABLE_NAME VARIABLE_VALUE |
||||
|
INNODB_CHANGE_BUFFERING_DEBUG 0 |
||||
|
select * from information_schema.session_variables where variable_name='innodb_change_buffering_debug'; |
||||
|
VARIABLE_NAME VARIABLE_VALUE |
||||
|
INNODB_CHANGE_BUFFERING_DEBUG 0 |
||||
|
set global innodb_change_buffering_debug=1; |
||||
|
select @@global.innodb_change_buffering_debug; |
||||
|
@@global.innodb_change_buffering_debug |
||||
|
1 |
||||
|
select * from information_schema.global_variables where variable_name='innodb_change_buffering_debug'; |
||||
|
VARIABLE_NAME VARIABLE_VALUE |
||||
|
INNODB_CHANGE_BUFFERING_DEBUG 1 |
||||
|
select * from information_schema.session_variables where variable_name='innodb_change_buffering_debug'; |
||||
|
VARIABLE_NAME VARIABLE_VALUE |
||||
|
INNODB_CHANGE_BUFFERING_DEBUG 1 |
||||
|
set @@global.innodb_change_buffering_debug=0; |
||||
|
select @@global.innodb_change_buffering_debug; |
||||
|
@@global.innodb_change_buffering_debug |
||||
|
0 |
||||
|
select * from information_schema.global_variables where variable_name='innodb_change_buffering_debug'; |
||||
|
VARIABLE_NAME VARIABLE_VALUE |
||||
|
INNODB_CHANGE_BUFFERING_DEBUG 0 |
||||
|
select * from information_schema.session_variables where variable_name='innodb_change_buffering_debug'; |
||||
|
VARIABLE_NAME VARIABLE_VALUE |
||||
|
INNODB_CHANGE_BUFFERING_DEBUG 0 |
||||
|
set session innodb_change_buffering_debug='some'; |
||||
|
ERROR HY000: Variable 'innodb_change_buffering_debug' is a GLOBAL variable and should be set with SET GLOBAL |
||||
|
set @@session.innodb_change_buffering_debug='some'; |
||||
|
ERROR HY000: Variable 'innodb_change_buffering_debug' is a GLOBAL variable and should be set with SET GLOBAL |
||||
|
set global innodb_change_buffering_debug=1.1; |
||||
|
ERROR 42000: Incorrect argument type to variable 'innodb_change_buffering_debug' |
||||
|
set global innodb_change_buffering_debug='foo'; |
||||
|
ERROR 42000: Incorrect argument type to variable 'innodb_change_buffering_debug' |
||||
|
set global innodb_change_buffering_debug=-2; |
||||
|
Warnings: |
||||
|
Warning 1292 Truncated incorrect innodb_change_buffering_debug value: '-2' |
||||
|
set global innodb_change_buffering_debug=1e1; |
||||
|
ERROR 42000: Incorrect argument type to variable 'innodb_change_buffering_debug' |
||||
|
set global innodb_change_buffering_debug=2; |
||||
|
Warnings: |
||||
|
Warning 1292 Truncated incorrect innodb_change_buffering_debug value: '2' |
||||
|
SET @@global.innodb_change_buffering_debug = @start_global_value; |
||||
|
SELECT @@global.innodb_change_buffering_debug; |
||||
|
@@global.innodb_change_buffering_debug |
||||
|
0 |
@ -0,0 +1,65 @@ |
|||||
|
SET @start_global_value = @@global.innodb_trx_rseg_n_slots_debug; |
||||
|
SELECT @start_global_value; |
||||
|
@start_global_value |
||||
|
0 |
||||
|
select @@global.innodb_trx_rseg_n_slots_debug between 0 and 1024; |
||||
|
@@global.innodb_trx_rseg_n_slots_debug between 0 and 1024 |
||||
|
1 |
||||
|
select @@global.innodb_trx_rseg_n_slots_debug; |
||||
|
@@global.innodb_trx_rseg_n_slots_debug |
||||
|
0 |
||||
|
select @@session.innodb_trx_rseg_n_slots_debug; |
||||
|
ERROR HY000: Variable 'innodb_trx_rseg_n_slots_debug' is a GLOBAL variable |
||||
|
show global variables like 'innodb_trx_rseg_n_slots_debug'; |
||||
|
Variable_name Value |
||||
|
innodb_trx_rseg_n_slots_debug 0 |
||||
|
show session variables like 'innodb_trx_rseg_n_slots_debug'; |
||||
|
Variable_name Value |
||||
|
innodb_trx_rseg_n_slots_debug 0 |
||||
|
select * from information_schema.global_variables where variable_name='innodb_trx_rseg_n_slots_debug'; |
||||
|
VARIABLE_NAME VARIABLE_VALUE |
||||
|
INNODB_TRX_RSEG_N_SLOTS_DEBUG 0 |
||||
|
select * from information_schema.session_variables where variable_name='innodb_trx_rseg_n_slots_debug'; |
||||
|
VARIABLE_NAME VARIABLE_VALUE |
||||
|
INNODB_TRX_RSEG_N_SLOTS_DEBUG 0 |
||||
|
set global innodb_trx_rseg_n_slots_debug=1; |
||||
|
select @@global.innodb_trx_rseg_n_slots_debug; |
||||
|
@@global.innodb_trx_rseg_n_slots_debug |
||||
|
1 |
||||
|
select * from information_schema.global_variables where variable_name='innodb_trx_rseg_n_slots_debug'; |
||||
|
VARIABLE_NAME VARIABLE_VALUE |
||||
|
INNODB_TRX_RSEG_N_SLOTS_DEBUG 1 |
||||
|
select * from information_schema.session_variables where variable_name='innodb_trx_rseg_n_slots_debug'; |
||||
|
VARIABLE_NAME VARIABLE_VALUE |
||||
|
INNODB_TRX_RSEG_N_SLOTS_DEBUG 1 |
||||
|
set @@global.innodb_trx_rseg_n_slots_debug=0; |
||||
|
select @@global.innodb_trx_rseg_n_slots_debug; |
||||
|
@@global.innodb_trx_rseg_n_slots_debug |
||||
|
0 |
||||
|
select * from information_schema.global_variables where variable_name='innodb_trx_rseg_n_slots_debug'; |
||||
|
VARIABLE_NAME VARIABLE_VALUE |
||||
|
INNODB_TRX_RSEG_N_SLOTS_DEBUG 0 |
||||
|
select * from information_schema.session_variables where variable_name='innodb_trx_rseg_n_slots_debug'; |
||||
|
VARIABLE_NAME VARIABLE_VALUE |
||||
|
INNODB_TRX_RSEG_N_SLOTS_DEBUG 0 |
||||
|
set session innodb_trx_rseg_n_slots_debug='some'; |
||||
|
ERROR HY000: Variable 'innodb_trx_rseg_n_slots_debug' is a GLOBAL variable and should be set with SET GLOBAL |
||||
|
set @@session.innodb_trx_rseg_n_slots_debug='some'; |
||||
|
ERROR HY000: Variable 'innodb_trx_rseg_n_slots_debug' is a GLOBAL variable and should be set with SET GLOBAL |
||||
|
set global innodb_trx_rseg_n_slots_debug=1.1; |
||||
|
ERROR 42000: Incorrect argument type to variable 'innodb_trx_rseg_n_slots_debug' |
||||
|
set global innodb_trx_rseg_n_slots_debug='foo'; |
||||
|
ERROR 42000: Incorrect argument type to variable 'innodb_trx_rseg_n_slots_debug' |
||||
|
set global innodb_trx_rseg_n_slots_debug=-2; |
||||
|
Warnings: |
||||
|
Warning 1292 Truncated incorrect innodb_trx_rseg_n_slots_debug value: '-2' |
||||
|
set global innodb_trx_rseg_n_slots_debug=1e1; |
||||
|
ERROR 42000: Incorrect argument type to variable 'innodb_trx_rseg_n_slots_debug' |
||||
|
set global innodb_trx_rseg_n_slots_debug=1024; |
||||
|
set global innodb_trx_rseg_n_slots_debug=1025; |
||||
|
Warnings: |
||||
|
Warning 1292 Truncated incorrect innodb_trx_rseg_n_slots_debug value: '1025' |
||||
|
SET @@global.innodb_trx_rseg_n_slots_debug = @start_global_value; |
||||
|
SELECT @@global.innodb_trx_rseg_n_slots_debug; |
||||
|
@@global.innodb_trx_rseg_n_slots_debug |
||||
|
0 |
@ -0,0 +1,52 @@ |
|||||
|
--source include/have_innodb.inc |
||||
|
--source include/have_debug.inc |
||||
|
|
||||
|
SET @start_global_value = @@global.innodb_change_buffering_debug; |
||||
|
SELECT @start_global_value; |
||||
|
|
||||
|
# |
||||
|
# exists as global only |
||||
|
# |
||||
|
select @@global.innodb_change_buffering_debug in (0, 1); |
||||
|
select @@global.innodb_change_buffering_debug; |
||||
|
--error ER_INCORRECT_GLOBAL_LOCAL_VAR |
||||
|
select @@session.innodb_change_buffering_debug; |
||||
|
show global variables like 'innodb_change_buffering_debug'; |
||||
|
show session variables like 'innodb_change_buffering_debug'; |
||||
|
select * from information_schema.global_variables where variable_name='innodb_change_buffering_debug'; |
||||
|
select * from information_schema.session_variables where variable_name='innodb_change_buffering_debug'; |
||||
|
|
||||
|
# |
||||
|
# show that it's writable |
||||
|
# |
||||
|
set global innodb_change_buffering_debug=1; |
||||
|
select @@global.innodb_change_buffering_debug; |
||||
|
select * from information_schema.global_variables where variable_name='innodb_change_buffering_debug'; |
||||
|
select * from information_schema.session_variables where variable_name='innodb_change_buffering_debug'; |
||||
|
set @@global.innodb_change_buffering_debug=0; |
||||
|
select @@global.innodb_change_buffering_debug; |
||||
|
select * from information_schema.global_variables where variable_name='innodb_change_buffering_debug'; |
||||
|
select * from information_schema.session_variables where variable_name='innodb_change_buffering_debug'; |
||||
|
--error ER_GLOBAL_VARIABLE |
||||
|
set session innodb_change_buffering_debug='some'; |
||||
|
--error ER_GLOBAL_VARIABLE |
||||
|
set @@session.innodb_change_buffering_debug='some'; |
||||
|
|
||||
|
# |
||||
|
# incorrect types |
||||
|
# |
||||
|
--error ER_WRONG_TYPE_FOR_VAR |
||||
|
set global innodb_change_buffering_debug=1.1; |
||||
|
--error ER_WRONG_TYPE_FOR_VAR |
||||
|
set global innodb_change_buffering_debug='foo'; |
||||
|
set global innodb_change_buffering_debug=-2; |
||||
|
--error ER_WRONG_TYPE_FOR_VAR |
||||
|
set global innodb_change_buffering_debug=1e1; |
||||
|
set global innodb_change_buffering_debug=2; |
||||
|
|
||||
|
# |
||||
|
# Cleanup |
||||
|
# |
||||
|
|
||||
|
SET @@global.innodb_change_buffering_debug = @start_global_value; |
||||
|
SELECT @@global.innodb_change_buffering_debug; |
@ -0,0 +1,53 @@ |
|||||
|
--source include/have_innodb.inc |
||||
|
--source include/have_debug.inc |
||||
|
|
||||
|
SET @start_global_value = @@global.innodb_trx_rseg_n_slots_debug; |
||||
|
SELECT @start_global_value; |
||||
|
|
||||
|
# |
||||
|
# exists as global only |
||||
|
# |
||||
|
select @@global.innodb_trx_rseg_n_slots_debug between 0 and 1024; |
||||
|
select @@global.innodb_trx_rseg_n_slots_debug; |
||||
|
--error ER_INCORRECT_GLOBAL_LOCAL_VAR |
||||
|
select @@session.innodb_trx_rseg_n_slots_debug; |
||||
|
show global variables like 'innodb_trx_rseg_n_slots_debug'; |
||||
|
show session variables like 'innodb_trx_rseg_n_slots_debug'; |
||||
|
select * from information_schema.global_variables where variable_name='innodb_trx_rseg_n_slots_debug'; |
||||
|
select * from information_schema.session_variables where variable_name='innodb_trx_rseg_n_slots_debug'; |
||||
|
|
||||
|
# |
||||
|
# show that it's writable |
||||
|
# |
||||
|
set global innodb_trx_rseg_n_slots_debug=1; |
||||
|
select @@global.innodb_trx_rseg_n_slots_debug; |
||||
|
select * from information_schema.global_variables where variable_name='innodb_trx_rseg_n_slots_debug'; |
||||
|
select * from information_schema.session_variables where variable_name='innodb_trx_rseg_n_slots_debug'; |
||||
|
set @@global.innodb_trx_rseg_n_slots_debug=0; |
||||
|
select @@global.innodb_trx_rseg_n_slots_debug; |
||||
|
select * from information_schema.global_variables where variable_name='innodb_trx_rseg_n_slots_debug'; |
||||
|
select * from information_schema.session_variables where variable_name='innodb_trx_rseg_n_slots_debug'; |
||||
|
--error ER_GLOBAL_VARIABLE |
||||
|
set session innodb_trx_rseg_n_slots_debug='some'; |
||||
|
--error ER_GLOBAL_VARIABLE |
||||
|
set @@session.innodb_trx_rseg_n_slots_debug='some'; |
||||
|
|
||||
|
# |
||||
|
# incorrect types |
||||
|
# |
||||
|
--error ER_WRONG_TYPE_FOR_VAR |
||||
|
set global innodb_trx_rseg_n_slots_debug=1.1; |
||||
|
--error ER_WRONG_TYPE_FOR_VAR |
||||
|
set global innodb_trx_rseg_n_slots_debug='foo'; |
||||
|
set global innodb_trx_rseg_n_slots_debug=-2; |
||||
|
--error ER_WRONG_TYPE_FOR_VAR |
||||
|
set global innodb_trx_rseg_n_slots_debug=1e1; |
||||
|
set global innodb_trx_rseg_n_slots_debug=1024; |
||||
|
set global innodb_trx_rseg_n_slots_debug=1025; |
||||
|
|
||||
|
# |
||||
|
# Cleanup |
||||
|
# |
||||
|
|
||||
|
SET @@global.innodb_trx_rseg_n_slots_debug = @start_global_value; |
||||
|
SELECT @@global.innodb_trx_rseg_n_slots_debug; |
Write
Preview
Loading…
Cancel
Save
Reference in new issue