mirror of
https://github.com/MariaDB/server.git
synced 2026-10-23 18:49:29 +03:00
merge with mysql-5.5.21
This commit is contained in:
@@ -47,9 +47,6 @@ eval load data infile "$MYSQLTEST_VARDIR/tmp/sys_vars.all_vars.txt" into table t
|
||||
insert into t2 select variable_name from information_schema.global_variables;
|
||||
insert into t2 select variable_name from information_schema.session_variables;
|
||||
|
||||
# This is only present in debug builds.
|
||||
delete from t2 where variable_name='innodb_change_buffering_debug';
|
||||
|
||||
# Performance schema variables are too long for files named
|
||||
# 'mysql-test/suite/sys_vars/t/' ...
|
||||
# ... 'performance_schema_events_waits_history_long_size_basic-master.opt'
|
||||
|
||||
@@ -2,17 +2,26 @@
|
||||
#
|
||||
# show the global and session values;
|
||||
#
|
||||
--replace_result $MYSQL_CHARSETSDIR MYSQL_CHARSETSDIR
|
||||
|
||||
# workaround to adjust for the directory separators being different in
|
||||
# different OSes : slash on unixes and backslash or slash on windows.
|
||||
# TODO: fix with a proper comparison in mysqltest
|
||||
let $rcd= `SELECT REPLACE('$MYSQL_CHARSETSDIR', '\\\\\', '.')`;
|
||||
let $rcd= `SELECT REPLACE('$rcd', '/', '.')`;
|
||||
let $regex_charsetdir= `SELECT '/$rcd[\\\\\/\\\\\]/MYSQL_CHARSETSDIR/'`;
|
||||
|
||||
--replace_regex $regex_charsetdir
|
||||
select @@global.character_sets_dir;
|
||||
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.character_sets_dir;
|
||||
--replace_result $MYSQL_CHARSETSDIR MYSQL_CHARSETSDIR
|
||||
--replace_regex $regex_charsetdir
|
||||
show global variables like 'character_sets_dir';
|
||||
--replace_result $MYSQL_CHARSETSDIR MYSQL_CHARSETSDIR
|
||||
--replace_regex $regex_charsetdir
|
||||
show session variables like 'character_sets_dir';
|
||||
--replace_result $MYSQL_CHARSETSDIR MYSQL_CHARSETSDIR
|
||||
--replace_regex $regex_charsetdir
|
||||
select * from information_schema.global_variables where variable_name='character_sets_dir';
|
||||
--replace_result $MYSQL_CHARSETSDIR MYSQL_CHARSETSDIR
|
||||
--replace_regex $regex_charsetdir
|
||||
select * from information_schema.session_variables where variable_name='character_sets_dir';
|
||||
|
||||
#
|
||||
|
||||
@@ -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,58 @@
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_debug.inc
|
||||
|
||||
if (`select plugin_auth_version <= "1.1.8-24.1" from information_schema.plugins where plugin_name='innodb'`)
|
||||
{
|
||||
--skip Not supported by XtraDB 1.1.8-24.1 or earlier
|
||||
}
|
||||
|
||||
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;
|
||||
59
mysql-test/suite/sys_vars/t/stored_program_cache_basic.test
Normal file
59
mysql-test/suite/sys_vars/t/stored_program_cache_basic.test
Normal file
@@ -0,0 +1,59 @@
|
||||
# Variable Name: stored_program_cache
|
||||
# Scope: GLOBAL
|
||||
# Access Type: Dynamic
|
||||
# Data Type: numeric
|
||||
# Default Value: 256
|
||||
# Range: 256-524288
|
||||
|
||||
--source include/load_sysvars.inc
|
||||
|
||||
--echo # Saving initial value of stored_program_cache in a temporary variable
|
||||
SET @start_value = @@global.stored_program_cache;
|
||||
SELECT @start_value;
|
||||
|
||||
--echo # Display the DEFAULT value of stored_program_cache
|
||||
SET @@global.stored_program_cache = DEFAULT;
|
||||
SELECT @@global.stored_program_cache;
|
||||
|
||||
--echo # Verify default value of variable
|
||||
SELECT @@global.stored_program_cache = 256;
|
||||
|
||||
--echo # Change the value of stored_program_cache to a valid value
|
||||
SET @@global.stored_program_cache = 512;
|
||||
SELECT @@global.stored_program_cache;
|
||||
|
||||
--echo # Change the value of stored_program_cache to invalid value
|
||||
SET @@global.stored_program_cache = -1;
|
||||
SELECT @@global.stored_program_cache;
|
||||
|
||||
SET @@global.stored_program_cache =100000000000;
|
||||
SELECT @@global.stored_program_cache;
|
||||
|
||||
SET @@global.stored_program_cache = 0;
|
||||
SELECT @@global.stored_program_cache;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.stored_program_cache = 10000.01;
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.stored_program_cache = ON;
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.stored_program_cache= 'test';
|
||||
|
||||
--Error ER_WRONG_TYPE_FOR_VAR
|
||||
SET @@global.stored_program_cache = '';
|
||||
|
||||
--echo # Test if accessing session stored_program_cache gives error
|
||||
|
||||
--Error ER_GLOBAL_VARIABLE
|
||||
SET @@session.stored_program_cache = 0;
|
||||
|
||||
--echo # Check if accessing variable without SCOPE points to same global variable
|
||||
|
||||
SET @@global.stored_program_cache = 512;
|
||||
SELECT @@stored_program_cache = @@global.stored_program_cache;
|
||||
|
||||
--echo # Restore initial value
|
||||
|
||||
SET @@global.stored_program_cache = @start_value;
|
||||
SELECT @@global.stored_program_cache;
|
||||
Reference in New Issue
Block a user