mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
merge with mysql-5.5.21
This commit is contained in:
@@ -3,7 +3,6 @@ create table t2 (variable_name text);
|
||||
load data infile "MYSQLTEST_VARDIR/tmp/sys_vars.all_vars.txt" into table t1;
|
||||
insert into t2 select variable_name from information_schema.global_variables;
|
||||
insert into t2 select variable_name from information_schema.session_variables;
|
||||
delete from t2 where variable_name='innodb_change_buffering_debug';
|
||||
update t2 set variable_name= replace(variable_name, "PERFORMANCE_SCHEMA_", "PFS_");
|
||||
select distinct variable_name as `there should be *no* long test name listed below:` from t2
|
||||
where length(variable_name) > 50;
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
select @@global.character_sets_dir;
|
||||
@@global.character_sets_dir
|
||||
MYSQL_CHARSETSDIR/
|
||||
MYSQL_CHARSETSDIR
|
||||
select @@session.character_sets_dir;
|
||||
ERROR HY000: Variable 'character_sets_dir' is a GLOBAL variable
|
||||
show global variables like 'character_sets_dir';
|
||||
Variable_name Value
|
||||
character_sets_dir MYSQL_CHARSETSDIR/
|
||||
character_sets_dir MYSQL_CHARSETSDIR
|
||||
show session variables like 'character_sets_dir';
|
||||
Variable_name Value
|
||||
character_sets_dir MYSQL_CHARSETSDIR/
|
||||
character_sets_dir MYSQL_CHARSETSDIR
|
||||
select * from information_schema.global_variables where variable_name='character_sets_dir';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
CHARACTER_SETS_DIR MYSQL_CHARSETSDIR/
|
||||
CHARACTER_SETS_DIR MYSQL_CHARSETSDIR
|
||||
select * from information_schema.session_variables where variable_name='character_sets_dir';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
CHARACTER_SETS_DIR MYSQL_CHARSETSDIR/
|
||||
CHARACTER_SETS_DIR MYSQL_CHARSETSDIR
|
||||
set global character_sets_dir="foo";
|
||||
ERROR HY000: Variable 'character_sets_dir' is a read only variable
|
||||
set session character_sets_dir="foo";
|
||||
|
||||
@@ -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
|
||||
@@ -1,20 +1,20 @@
|
||||
select @@global.plugin_dir;
|
||||
@@global.plugin_dir
|
||||
MYSQL_TMP_DIR
|
||||
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_TMP_DIR
|
||||
plugin_dir MYSQL_TMP_DIR/
|
||||
show session variables like 'plugin_dir';
|
||||
Variable_name Value
|
||||
plugin_dir MYSQL_TMP_DIR
|
||||
plugin_dir MYSQL_TMP_DIR/
|
||||
select * from information_schema.global_variables where variable_name='plugin_dir';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
PLUGIN_DIR MYSQL_TMP_DIR
|
||||
PLUGIN_DIR MYSQL_TMP_DIR/
|
||||
select * from information_schema.session_variables where variable_name='plugin_dir';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
PLUGIN_DIR MYSQL_TMP_DIR
|
||||
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;
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
# Saving initial value of stored_program_cache in a temporary variable
|
||||
SET @start_value = @@global.stored_program_cache;
|
||||
SELECT @start_value;
|
||||
@start_value
|
||||
256
|
||||
# Display the DEFAULT value of stored_program_cache
|
||||
SET @@global.stored_program_cache = DEFAULT;
|
||||
SELECT @@global.stored_program_cache;
|
||||
@@global.stored_program_cache
|
||||
256
|
||||
# Verify default value of variable
|
||||
SELECT @@global.stored_program_cache = 256;
|
||||
@@global.stored_program_cache = 256
|
||||
1
|
||||
# Change the value of stored_program_cache to a valid value
|
||||
SET @@global.stored_program_cache = 512;
|
||||
SELECT @@global.stored_program_cache;
|
||||
@@global.stored_program_cache
|
||||
512
|
||||
# Change the value of stored_program_cache to invalid value
|
||||
SET @@global.stored_program_cache = -1;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect stored_program_cache value: '-1'
|
||||
SELECT @@global.stored_program_cache;
|
||||
@@global.stored_program_cache
|
||||
256
|
||||
SET @@global.stored_program_cache =100000000000;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect stored_program_cache value: '100000000000'
|
||||
SELECT @@global.stored_program_cache;
|
||||
@@global.stored_program_cache
|
||||
524288
|
||||
SET @@global.stored_program_cache = 0;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect stored_program_cache value: '0'
|
||||
SELECT @@global.stored_program_cache;
|
||||
@@global.stored_program_cache
|
||||
256
|
||||
SET @@global.stored_program_cache = 10000.01;
|
||||
ERROR 42000: Incorrect argument type to variable 'stored_program_cache'
|
||||
SET @@global.stored_program_cache = ON;
|
||||
ERROR 42000: Incorrect argument type to variable 'stored_program_cache'
|
||||
SET @@global.stored_program_cache= 'test';
|
||||
ERROR 42000: Incorrect argument type to variable 'stored_program_cache'
|
||||
SET @@global.stored_program_cache = '';
|
||||
ERROR 42000: Incorrect argument type to variable 'stored_program_cache'
|
||||
# Test if accessing session stored_program_cache gives error
|
||||
SET @@session.stored_program_cache = 0;
|
||||
ERROR HY000: Variable 'stored_program_cache' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
# 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;
|
||||
@@stored_program_cache = @@global.stored_program_cache
|
||||
1
|
||||
# Restore initial value
|
||||
SET @@global.stored_program_cache = @start_value;
|
||||
SELECT @@global.stored_program_cache;
|
||||
@@global.stored_program_cache
|
||||
256
|
||||
Reference in New Issue
Block a user