mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
fixes for sys_vars and pbxt suites
This commit is contained in:
@ -266,13 +266,10 @@ The following options may be given as the first argument:
|
||||
use --general-log/--general-log-file instead).
|
||||
--log-basename=name Basename for all log files and the .pid file. This sets
|
||||
all log file names at once (in 'datadir') and is normally
|
||||
the only option you need for specifying log files. This
|
||||
is especially recommend to be set if you are using
|
||||
replication as it ensures that your log file names are
|
||||
not depending on your host name. Sets names for
|
||||
--log-bin, --log-bin-index, --relay-log,
|
||||
the only option you need for specifying log files. Sets
|
||||
names for --log-bin, --log-bin-index, --relay-log,
|
||||
--relay-log-index, --general-log-file,
|
||||
--log-slow-query-log-file, --log-error-file and
|
||||
--log-slow-query-log-file, --log-error-file, and
|
||||
--pid-file
|
||||
--log-bin[=name] Log update queries in binary format. Optional argument
|
||||
should be name for binary log. If not given
|
||||
|
@ -138,17 +138,6 @@ unlock tables;
|
||||
unlock tables;
|
||||
drop table t1,t2;
|
||||
End of 5.0 tests
|
||||
create table t1 (i int);
|
||||
lock table t1 read;
|
||||
update t1 set i= 10;
|
||||
select * from t1;
|
||||
Timeout in wait_condition.inc for select count(*) = 1 from information_schema.processlist
|
||||
where state = "Table Lock" and info = "select * from t1"
|
||||
kill query ID;
|
||||
i
|
||||
ERROR 70100: Query execution was interrupted
|
||||
unlock tables;
|
||||
drop table t1;
|
||||
drop table if exists t1;
|
||||
create table t1 (i int);
|
||||
connection: default
|
||||
|
@ -416,41 +416,6 @@ drop table t1,t2;
|
||||
--echo End of 5.0 tests
|
||||
|
||||
|
||||
#
|
||||
# Bug#21281 Pending write lock is incorrectly removed when its
|
||||
# statement being KILLed
|
||||
#
|
||||
create table t1 (i int);
|
||||
connection locker;
|
||||
lock table t1 read;
|
||||
connection writer;
|
||||
send
|
||||
update t1 set i= 10;
|
||||
connection reader;
|
||||
let $wait_condition=
|
||||
select count(*) = 1 from information_schema.processlist
|
||||
where state = "Table Lock" and info = "update t1 set i= 10";
|
||||
--source include/wait_condition.inc
|
||||
send
|
||||
select * from t1;
|
||||
connection default;
|
||||
let $wait_condition=
|
||||
select count(*) = 1 from information_schema.processlist
|
||||
where state = "Table Lock" and info = "select * from t1";
|
||||
--source include/wait_condition.inc
|
||||
let $ID= `select id from information_schema.processlist where state = "Table Lock" and info = "update t1 set i= 10"`;
|
||||
--replace_result $ID ID
|
||||
eval kill query $ID;
|
||||
connection reader;
|
||||
--reap
|
||||
connection writer;
|
||||
--error ER_QUERY_INTERRUPTED
|
||||
--reap
|
||||
connection locker;
|
||||
unlock tables;
|
||||
connection default;
|
||||
drop table t1;
|
||||
|
||||
# Disconnect sessions used in many subtests above
|
||||
disconnect locker;
|
||||
disconnect reader;
|
||||
|
@ -5,22 +5,11 @@ 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
|
||||
select distinct variable_name as `there should be *no* long test name listed below:` from t2
|
||||
where length(variable_name) > 50;
|
||||
There should be *no* long test name listed below:
|
||||
select distinct variable_name as `There should be *no* variables listed below:` from t2
|
||||
there should be *no* long test name listed below:
|
||||
select distinct variable_name as `there should be *no* variables listed below:` from t2
|
||||
left join t1 on variable_name=test_name where test_name is null;
|
||||
There should be *no* variables listed below:
|
||||
BINLOG_ANNOTATE_ROWS_EVENTS
|
||||
BINLOG_DBUG_FSYNC_SLEEP
|
||||
BINLOG_OPTIMIZE_THREAD_SCHEDULING
|
||||
IN_TRANSACTION
|
||||
JOIN_BUFFER_SPACE_LIMIT
|
||||
LOG_BASENAME
|
||||
MYISAM_BLOCK_SIZE
|
||||
PROGRESS_REPORT_TIME
|
||||
QUERY_CACHE_STRIP_COMMENTS
|
||||
REPLICATE_ANNOTATE_ROWS_EVENTS
|
||||
THREAD_ALARM
|
||||
there should be *no* variables listed below:
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
|
@ -0,0 +1,50 @@
|
||||
SET @start_global_value = @@global.binlog_annotate_rows_events;
|
||||
select @@global.binlog_annotate_rows_events;
|
||||
@@global.binlog_annotate_rows_events
|
||||
0
|
||||
select @@session.binlog_annotate_rows_events;
|
||||
@@session.binlog_annotate_rows_events
|
||||
0
|
||||
show global variables like 'binlog_annotate_rows_events';
|
||||
Variable_name Value
|
||||
binlog_annotate_rows_events OFF
|
||||
show session variables like 'binlog_annotate_rows_events';
|
||||
Variable_name Value
|
||||
binlog_annotate_rows_events OFF
|
||||
select * from information_schema.global_variables where variable_name='binlog_annotate_rows_events';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
BINLOG_ANNOTATE_ROWS_EVENTS OFF
|
||||
select * from information_schema.session_variables where variable_name='binlog_annotate_rows_events';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
BINLOG_ANNOTATE_ROWS_EVENTS OFF
|
||||
set global binlog_annotate_rows_events=ON;
|
||||
select @@global.binlog_annotate_rows_events;
|
||||
@@global.binlog_annotate_rows_events
|
||||
1
|
||||
set global binlog_annotate_rows_events=OFF;
|
||||
select @@global.binlog_annotate_rows_events;
|
||||
@@global.binlog_annotate_rows_events
|
||||
0
|
||||
set global binlog_annotate_rows_events=1;
|
||||
select @@global.binlog_annotate_rows_events;
|
||||
@@global.binlog_annotate_rows_events
|
||||
1
|
||||
set session binlog_annotate_rows_events=ON;
|
||||
select @@session.binlog_annotate_rows_events;
|
||||
@@session.binlog_annotate_rows_events
|
||||
1
|
||||
set session binlog_annotate_rows_events=OFF;
|
||||
select @@session.binlog_annotate_rows_events;
|
||||
@@session.binlog_annotate_rows_events
|
||||
0
|
||||
set session binlog_annotate_rows_events=1;
|
||||
select @@session.binlog_annotate_rows_events;
|
||||
@@session.binlog_annotate_rows_events
|
||||
1
|
||||
set global binlog_annotate_rows_events=1.1;
|
||||
ERROR 42000: Incorrect argument type to variable 'binlog_annotate_rows_events'
|
||||
set session binlog_annotate_rows_events=1e1;
|
||||
ERROR 42000: Incorrect argument type to variable 'binlog_annotate_rows_events'
|
||||
set session binlog_annotate_rows_events="foo";
|
||||
ERROR 42000: Variable 'binlog_annotate_rows_events' can't be set to the value of 'foo'
|
||||
SET @@global.binlog_annotate_rows_events = @start_global_value;
|
@ -0,0 +1,21 @@
|
||||
select @@global.binlog_optimize_thread_scheduling;
|
||||
@@global.binlog_optimize_thread_scheduling
|
||||
1
|
||||
select @@session.binlog_optimize_thread_scheduling;
|
||||
ERROR HY000: Variable 'binlog_optimize_thread_scheduling' is a GLOBAL variable
|
||||
show global variables like 'binlog_optimize_thread_scheduling';
|
||||
Variable_name Value
|
||||
binlog_optimize_thread_scheduling ON
|
||||
show session variables like 'binlog_optimize_thread_scheduling';
|
||||
Variable_name Value
|
||||
binlog_optimize_thread_scheduling ON
|
||||
select * from information_schema.global_variables where variable_name='binlog_optimize_thread_scheduling';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
BINLOG_OPTIMIZE_THREAD_SCHEDULING ON
|
||||
select * from information_schema.session_variables where variable_name='binlog_optimize_thread_scheduling';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
BINLOG_OPTIMIZE_THREAD_SCHEDULING ON
|
||||
set global binlog_optimize_thread_scheduling=1;
|
||||
ERROR HY000: Variable 'binlog_optimize_thread_scheduling' is a read only variable
|
||||
set session binlog_optimize_thread_scheduling=1;
|
||||
ERROR HY000: Variable 'binlog_optimize_thread_scheduling' is a read only variable
|
19
mysql-test/suite/sys_vars/r/in_transaction_basic.result
Normal file
19
mysql-test/suite/sys_vars/r/in_transaction_basic.result
Normal file
@ -0,0 +1,19 @@
|
||||
select @@global.in_transaction;
|
||||
ERROR HY000: Variable 'in_transaction' is a SESSION variable
|
||||
select @@session.in_transaction;
|
||||
@@session.in_transaction
|
||||
0
|
||||
show global variables like 'in_transaction';
|
||||
Variable_name Value
|
||||
show session variables like 'in_transaction';
|
||||
Variable_name Value
|
||||
in_transaction 0
|
||||
select * from information_schema.global_variables where variable_name='in_transaction';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
select * from information_schema.session_variables where variable_name='in_transaction';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
IN_TRANSACTION 0
|
||||
set global in_transaction=1;
|
||||
ERROR HY000: Variable 'in_transaction' is a read only variable
|
||||
set session in_transaction=1;
|
||||
ERROR HY000: Variable 'in_transaction' is a read only variable
|
@ -0,0 +1,57 @@
|
||||
SET @start_global_value = @@global.join_buffer_space_limit;
|
||||
select @@global.join_buffer_space_limit;
|
||||
@@global.join_buffer_space_limit
|
||||
2097152
|
||||
select @@session.join_buffer_space_limit;
|
||||
@@session.join_buffer_space_limit
|
||||
2097152
|
||||
show global variables like 'join_buffer_space_limit';
|
||||
Variable_name Value
|
||||
join_buffer_space_limit 2097152
|
||||
show session variables like 'join_buffer_space_limit';
|
||||
Variable_name Value
|
||||
join_buffer_space_limit 2097152
|
||||
select * from information_schema.global_variables where variable_name='join_buffer_space_limit';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
JOIN_BUFFER_SPACE_LIMIT 2097152
|
||||
select * from information_schema.session_variables where variable_name='join_buffer_space_limit';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
JOIN_BUFFER_SPACE_LIMIT 2097152
|
||||
set global join_buffer_space_limit=10;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect join_buffer_space_limit value: '10'
|
||||
select @@global.join_buffer_space_limit;
|
||||
@@global.join_buffer_space_limit
|
||||
2048
|
||||
set session join_buffer_space_limit=10;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect join_buffer_space_limit value: '10'
|
||||
select @@session.join_buffer_space_limit;
|
||||
@@session.join_buffer_space_limit
|
||||
2048
|
||||
set global join_buffer_space_limit=1.1;
|
||||
ERROR 42000: Incorrect argument type to variable 'join_buffer_space_limit'
|
||||
set session join_buffer_space_limit=1e1;
|
||||
ERROR 42000: Incorrect argument type to variable 'join_buffer_space_limit'
|
||||
set global join_buffer_space_limit="foo";
|
||||
ERROR 42000: Incorrect argument type to variable 'join_buffer_space_limit'
|
||||
set global join_buffer_space_limit=0;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect join_buffer_space_limit value: '0'
|
||||
select @@global.join_buffer_space_limit;
|
||||
@@global.join_buffer_space_limit
|
||||
2048
|
||||
set global join_buffer_space_limit=4095;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect join_buffer_space_limit value: '4095'
|
||||
select @@global.join_buffer_space_limit;
|
||||
@@global.join_buffer_space_limit
|
||||
2048
|
||||
set session join_buffer_space_limit=cast(-1 as unsigned int);
|
||||
Warnings:
|
||||
Warning 1105 Cast to unsigned converted negative integer to it's positive complement
|
||||
Warning 1292 Truncated incorrect join_buffer_space_limit value: '18446744073709551615'
|
||||
select @@session.join_buffer_space_limit;
|
||||
@@session.join_buffer_space_limit
|
||||
18446744073709549568
|
||||
SET @@global.join_buffer_space_limit = @start_global_value;
|
21
mysql-test/suite/sys_vars/r/myisam_block_size_basic.result
Normal file
21
mysql-test/suite/sys_vars/r/myisam_block_size_basic.result
Normal file
@ -0,0 +1,21 @@
|
||||
select @@global.myisam_block_size;
|
||||
@@global.myisam_block_size
|
||||
1024
|
||||
select @@session.myisam_block_size;
|
||||
ERROR HY000: Variable 'myisam_block_size' is a GLOBAL variable
|
||||
show global variables like 'myisam_block_size';
|
||||
Variable_name Value
|
||||
myisam_block_size 1024
|
||||
show session variables like 'myisam_block_size';
|
||||
Variable_name Value
|
||||
myisam_block_size 1024
|
||||
select * from information_schema.global_variables where variable_name='myisam_block_size';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
MYISAM_BLOCK_SIZE 1024
|
||||
select * from information_schema.session_variables where variable_name='myisam_block_size';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
MYISAM_BLOCK_SIZE 1024
|
||||
set global myisam_block_size=1;
|
||||
ERROR HY000: Variable 'myisam_block_size' is a read only variable
|
||||
set session myisam_block_size=1;
|
||||
ERROR HY000: Variable 'myisam_block_size' is a read only variable
|
@ -0,0 +1,44 @@
|
||||
SET @start_global_value = @@global.progress_report_time;
|
||||
select @@global.progress_report_time;
|
||||
@@global.progress_report_time
|
||||
56
|
||||
select @@session.progress_report_time;
|
||||
@@session.progress_report_time
|
||||
56
|
||||
show global variables like 'progress_report_time';
|
||||
Variable_name Value
|
||||
progress_report_time 56
|
||||
show session variables like 'progress_report_time';
|
||||
Variable_name Value
|
||||
progress_report_time 56
|
||||
select * from information_schema.global_variables where variable_name='progress_report_time';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
PROGRESS_REPORT_TIME 56
|
||||
select * from information_schema.session_variables where variable_name='progress_report_time';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
PROGRESS_REPORT_TIME 56
|
||||
set global progress_report_time=10;
|
||||
select @@global.progress_report_time;
|
||||
@@global.progress_report_time
|
||||
10
|
||||
set session progress_report_time=10;
|
||||
select @@session.progress_report_time;
|
||||
@@session.progress_report_time
|
||||
10
|
||||
set global progress_report_time=1.1;
|
||||
ERROR 42000: Incorrect argument type to variable 'progress_report_time'
|
||||
set session progress_report_time=1e1;
|
||||
ERROR 42000: Incorrect argument type to variable 'progress_report_time'
|
||||
set global progress_report_time="foo";
|
||||
ERROR 42000: Incorrect argument type to variable 'progress_report_time'
|
||||
set global progress_report_time=0;
|
||||
select @@global.progress_report_time;
|
||||
@@global.progress_report_time
|
||||
0
|
||||
set session progress_report_time=cast(-1 as unsigned int);
|
||||
Warnings:
|
||||
Warning 1105 Cast to unsigned converted negative integer to it's positive complement
|
||||
select @@session.progress_report_time;
|
||||
@@session.progress_report_time
|
||||
18446744073709551615
|
||||
SET @@global.progress_report_time = @start_global_value;
|
@ -0,0 +1,39 @@
|
||||
SET @start_global_value = @@global.query_cache_strip_comments;
|
||||
select @@global.query_cache_strip_comments;
|
||||
@@global.query_cache_strip_comments
|
||||
0
|
||||
select @@session.query_cache_strip_comments;
|
||||
ERROR HY000: Variable 'query_cache_strip_comments' is a GLOBAL variable
|
||||
show global variables like 'query_cache_strip_comments';
|
||||
Variable_name Value
|
||||
query_cache_strip_comments OFF
|
||||
show session variables like 'query_cache_strip_comments';
|
||||
Variable_name Value
|
||||
query_cache_strip_comments OFF
|
||||
select * from information_schema.global_variables where variable_name='query_cache_strip_comments';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
QUERY_CACHE_STRIP_COMMENTS OFF
|
||||
select * from information_schema.session_variables where variable_name='query_cache_strip_comments';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
QUERY_CACHE_STRIP_COMMENTS OFF
|
||||
set global query_cache_strip_comments=ON;
|
||||
select @@global.query_cache_strip_comments;
|
||||
@@global.query_cache_strip_comments
|
||||
1
|
||||
set global query_cache_strip_comments=OFF;
|
||||
select @@global.query_cache_strip_comments;
|
||||
@@global.query_cache_strip_comments
|
||||
0
|
||||
set global query_cache_strip_comments=1;
|
||||
select @@global.query_cache_strip_comments;
|
||||
@@global.query_cache_strip_comments
|
||||
1
|
||||
set session query_cache_strip_comments=1;
|
||||
ERROR HY000: Variable 'query_cache_strip_comments' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
set global query_cache_strip_comments=1.1;
|
||||
ERROR 42000: Incorrect argument type to variable 'query_cache_strip_comments'
|
||||
set global query_cache_strip_comments=1e1;
|
||||
ERROR 42000: Incorrect argument type to variable 'query_cache_strip_comments'
|
||||
set global query_cache_strip_comments="foo";
|
||||
ERROR 42000: Variable 'query_cache_strip_comments' can't be set to the value of 'foo'
|
||||
SET @@global.query_cache_strip_comments = @start_global_value;
|
@ -0,0 +1,21 @@
|
||||
select @@global.replicate_annotate_rows_events;
|
||||
@@global.replicate_annotate_rows_events
|
||||
0
|
||||
select @@session.replicate_annotate_rows_events;
|
||||
ERROR HY000: Variable 'replicate_annotate_rows_events' is a GLOBAL variable
|
||||
show global variables like 'replicate_annotate_rows_events';
|
||||
Variable_name Value
|
||||
replicate_annotate_rows_events OFF
|
||||
show session variables like 'replicate_annotate_rows_events';
|
||||
Variable_name Value
|
||||
replicate_annotate_rows_events OFF
|
||||
select * from information_schema.global_variables where variable_name='replicate_annotate_rows_events';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
REPLICATE_ANNOTATE_ROWS_EVENTS OFF
|
||||
select * from information_schema.session_variables where variable_name='replicate_annotate_rows_events';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
REPLICATE_ANNOTATE_ROWS_EVENTS OFF
|
||||
set global replicate_annotate_rows_events=1;
|
||||
ERROR HY000: Variable 'replicate_annotate_rows_events' is a read only variable
|
||||
set session replicate_annotate_rows_events=1;
|
||||
ERROR HY000: Variable 'replicate_annotate_rows_events' is a read only variable
|
21
mysql-test/suite/sys_vars/r/thread_alarm_basic.result
Normal file
21
mysql-test/suite/sys_vars/r/thread_alarm_basic.result
Normal file
@ -0,0 +1,21 @@
|
||||
select @@global.thread_alarm;
|
||||
@@global.thread_alarm
|
||||
1
|
||||
select @@session.thread_alarm;
|
||||
ERROR HY000: Variable 'thread_alarm' is a GLOBAL variable
|
||||
show global variables like 'thread_alarm';
|
||||
Variable_name Value
|
||||
thread_alarm ON
|
||||
show session variables like 'thread_alarm';
|
||||
Variable_name Value
|
||||
thread_alarm ON
|
||||
select * from information_schema.global_variables where variable_name='thread_alarm';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
THREAD_ALARM ON
|
||||
select * from information_schema.session_variables where variable_name='thread_alarm';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
THREAD_ALARM ON
|
||||
set global thread_alarm=1;
|
||||
ERROR HY000: Variable 'thread_alarm' is a read only variable
|
||||
set session thread_alarm=1;
|
||||
ERROR HY000: Variable 'thread_alarm' is a read only variable
|
@ -74,10 +74,12 @@ delete from t2 where variable_name='innodb_change_buffering_debug';
|
||||
update t2 set variable_name= replace(variable_name, "PERFORMANCE_SCHEMA_", "PFS_");
|
||||
|
||||
--sorted_result
|
||||
--lowercase_result
|
||||
select distinct variable_name as `There should be *no* long test name listed below:` from t2
|
||||
where length(variable_name) > 50;
|
||||
|
||||
--sorted_result
|
||||
--lowercase_result
|
||||
select distinct variable_name as `There should be *no* variables listed below:` from t2
|
||||
left join t1 on variable_name=test_name where test_name is null;
|
||||
|
||||
|
@ -0,0 +1,39 @@
|
||||
# bool session
|
||||
|
||||
SET @start_global_value = @@global.binlog_annotate_rows_events;
|
||||
|
||||
select @@global.binlog_annotate_rows_events;
|
||||
select @@session.binlog_annotate_rows_events;
|
||||
show global variables like 'binlog_annotate_rows_events';
|
||||
show session variables like 'binlog_annotate_rows_events';
|
||||
select * from information_schema.global_variables where variable_name='binlog_annotate_rows_events';
|
||||
select * from information_schema.session_variables where variable_name='binlog_annotate_rows_events';
|
||||
|
||||
#
|
||||
# show that it's writable
|
||||
#
|
||||
set global binlog_annotate_rows_events=ON;
|
||||
select @@global.binlog_annotate_rows_events;
|
||||
set global binlog_annotate_rows_events=OFF;
|
||||
select @@global.binlog_annotate_rows_events;
|
||||
set global binlog_annotate_rows_events=1;
|
||||
select @@global.binlog_annotate_rows_events;
|
||||
|
||||
set session binlog_annotate_rows_events=ON;
|
||||
select @@session.binlog_annotate_rows_events;
|
||||
set session binlog_annotate_rows_events=OFF;
|
||||
select @@session.binlog_annotate_rows_events;
|
||||
set session binlog_annotate_rows_events=1;
|
||||
select @@session.binlog_annotate_rows_events;
|
||||
#
|
||||
# incorrect types
|
||||
#
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global binlog_annotate_rows_events=1.1;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set session binlog_annotate_rows_events=1e1;
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
set session binlog_annotate_rows_events="foo";
|
||||
|
||||
SET @@global.binlog_annotate_rows_events = @start_global_value;
|
||||
|
@ -0,0 +1,46 @@
|
||||
# ulong global
|
||||
|
||||
SET @start_global_value = @@global.binlog_dbug_fsync_sleep;
|
||||
|
||||
#
|
||||
# exists as global only
|
||||
#
|
||||
select @@global.binlog_dbug_fsync_sleep;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.binlog_dbug_fsync_sleep;
|
||||
show global variables like 'binlog_dbug_fsync_sleep';
|
||||
show session variables like 'binlog_dbug_fsync_sleep';
|
||||
select * from information_schema.global_variables where variable_name='binlog_dbug_fsync_sleep';
|
||||
select * from information_schema.session_variables where variable_name='binlog_dbug_fsync_sleep';
|
||||
|
||||
#
|
||||
# show that it's writable
|
||||
#
|
||||
set global binlog_dbug_fsync_sleep=200;
|
||||
select @@global.binlog_dbug_fsync_sleep;
|
||||
--error ER_GLOBAL_VARIABLE
|
||||
set session binlog_dbug_fsync_sleep=1;
|
||||
|
||||
#
|
||||
# incorrect types
|
||||
#
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global binlog_dbug_fsync_sleep=1.1;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global binlog_dbug_fsync_sleep=1e1;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global binlog_dbug_fsync_sleep="foo";
|
||||
|
||||
#
|
||||
# min/max values, block size
|
||||
#
|
||||
set global binlog_dbug_fsync_sleep=1;
|
||||
select @@global.binlog_dbug_fsync_sleep;
|
||||
set global binlog_dbug_fsync_sleep=@@global.binlog_dbug_fsync_sleep + 100 - 1;
|
||||
select @@global.binlog_dbug_fsync_sleep;
|
||||
set global binlog_dbug_fsync_sleep=@@global.binlog_dbug_fsync_sleep + 100;
|
||||
select @@global.binlog_dbug_fsync_sleep;
|
||||
set global binlog_dbug_fsync_sleep=cast(-1 as unsigned int);
|
||||
select @@global.binlog_dbug_fsync_sleep;
|
||||
|
||||
SET @@global.binlog_dbug_fsync_sleep = @start_global_value;
|
@ -0,0 +1,21 @@
|
||||
# bool readonly
|
||||
|
||||
#
|
||||
# show values;
|
||||
#
|
||||
select @@global.binlog_optimize_thread_scheduling;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.binlog_optimize_thread_scheduling;
|
||||
show global variables like 'binlog_optimize_thread_scheduling';
|
||||
show session variables like 'binlog_optimize_thread_scheduling';
|
||||
select * from information_schema.global_variables where variable_name='binlog_optimize_thread_scheduling';
|
||||
select * from information_schema.session_variables where variable_name='binlog_optimize_thread_scheduling';
|
||||
|
||||
#
|
||||
# show that it's read-only
|
||||
#
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set global binlog_optimize_thread_scheduling=1;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set session binlog_optimize_thread_scheduling=1;
|
||||
|
21
mysql-test/suite/sys_vars/t/in_transaction_basic.test
Normal file
21
mysql-test/suite/sys_vars/t/in_transaction_basic.test
Normal file
@ -0,0 +1,21 @@
|
||||
# bool readonly
|
||||
|
||||
#
|
||||
# show values;
|
||||
#
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@global.in_transaction;
|
||||
select @@session.in_transaction;
|
||||
show global variables like 'in_transaction';
|
||||
show session variables like 'in_transaction';
|
||||
select * from information_schema.global_variables where variable_name='in_transaction';
|
||||
select * from information_schema.session_variables where variable_name='in_transaction';
|
||||
|
||||
#
|
||||
# show that it's read-only
|
||||
#
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set global in_transaction=1;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set session in_transaction=1;
|
||||
|
@ -0,0 +1,44 @@
|
||||
# ulonglong session
|
||||
|
||||
SET @start_global_value = @@global.join_buffer_space_limit;
|
||||
|
||||
#
|
||||
# exists as global and session
|
||||
#
|
||||
select @@global.join_buffer_space_limit;
|
||||
select @@session.join_buffer_space_limit;
|
||||
show global variables like 'join_buffer_space_limit';
|
||||
show session variables like 'join_buffer_space_limit';
|
||||
select * from information_schema.global_variables where variable_name='join_buffer_space_limit';
|
||||
select * from information_schema.session_variables where variable_name='join_buffer_space_limit';
|
||||
|
||||
#
|
||||
# show that it's writable
|
||||
#
|
||||
set global join_buffer_space_limit=10;
|
||||
select @@global.join_buffer_space_limit;
|
||||
set session join_buffer_space_limit=10;
|
||||
select @@session.join_buffer_space_limit;
|
||||
|
||||
#
|
||||
# incorrect types
|
||||
#
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global join_buffer_space_limit=1.1;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set session join_buffer_space_limit=1e1;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global join_buffer_space_limit="foo";
|
||||
|
||||
#
|
||||
# min/max values, block size
|
||||
#
|
||||
set global join_buffer_space_limit=0;
|
||||
select @@global.join_buffer_space_limit;
|
||||
set global join_buffer_space_limit=4095;
|
||||
select @@global.join_buffer_space_limit;
|
||||
set session join_buffer_space_limit=cast(-1 as unsigned int);
|
||||
select @@session.join_buffer_space_limit;
|
||||
|
||||
SET @@global.join_buffer_space_limit = @start_global_value;
|
||||
|
21
mysql-test/suite/sys_vars/t/myisam_block_size_basic.test
Normal file
21
mysql-test/suite/sys_vars/t/myisam_block_size_basic.test
Normal file
@ -0,0 +1,21 @@
|
||||
# ulong readonly
|
||||
|
||||
#
|
||||
# show the global and session values;
|
||||
#
|
||||
select @@global.myisam_block_size;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.myisam_block_size;
|
||||
show global variables like 'myisam_block_size';
|
||||
show session variables like 'myisam_block_size';
|
||||
select * from information_schema.global_variables where variable_name='myisam_block_size';
|
||||
select * from information_schema.session_variables where variable_name='myisam_block_size';
|
||||
|
||||
#
|
||||
# show that it's read-only
|
||||
#
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set global myisam_block_size=1;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set session myisam_block_size=1;
|
||||
|
42
mysql-test/suite/sys_vars/t/progress_report_time_basic.test
Normal file
42
mysql-test/suite/sys_vars/t/progress_report_time_basic.test
Normal file
@ -0,0 +1,42 @@
|
||||
# ulong session
|
||||
|
||||
SET @start_global_value = @@global.progress_report_time;
|
||||
|
||||
#
|
||||
# exists as global only
|
||||
#
|
||||
select @@global.progress_report_time;
|
||||
select @@session.progress_report_time;
|
||||
show global variables like 'progress_report_time';
|
||||
show session variables like 'progress_report_time';
|
||||
select * from information_schema.global_variables where variable_name='progress_report_time';
|
||||
select * from information_schema.session_variables where variable_name='progress_report_time';
|
||||
|
||||
#
|
||||
# show that it's writable
|
||||
#
|
||||
set global progress_report_time=10;
|
||||
select @@global.progress_report_time;
|
||||
set session progress_report_time=10;
|
||||
select @@session.progress_report_time;
|
||||
|
||||
#
|
||||
# incorrect types
|
||||
#
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global progress_report_time=1.1;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set session progress_report_time=1e1;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global progress_report_time="foo";
|
||||
|
||||
#
|
||||
# min/max values, block size
|
||||
#
|
||||
set global progress_report_time=0;
|
||||
select @@global.progress_report_time;
|
||||
set session progress_report_time=cast(-1 as unsigned int);
|
||||
select @@session.progress_report_time;
|
||||
|
||||
SET @@global.progress_report_time = @start_global_value;
|
||||
|
@ -0,0 +1,38 @@
|
||||
# bool global
|
||||
|
||||
SET @start_global_value = @@global.query_cache_strip_comments;
|
||||
|
||||
#
|
||||
# exists as global only
|
||||
#
|
||||
select @@global.query_cache_strip_comments;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.query_cache_strip_comments;
|
||||
show global variables like 'query_cache_strip_comments';
|
||||
show session variables like 'query_cache_strip_comments';
|
||||
select * from information_schema.global_variables where variable_name='query_cache_strip_comments';
|
||||
select * from information_schema.session_variables where variable_name='query_cache_strip_comments';
|
||||
|
||||
#
|
||||
# show that it's writable
|
||||
#
|
||||
set global query_cache_strip_comments=ON;
|
||||
select @@global.query_cache_strip_comments;
|
||||
set global query_cache_strip_comments=OFF;
|
||||
select @@global.query_cache_strip_comments;
|
||||
set global query_cache_strip_comments=1;
|
||||
select @@global.query_cache_strip_comments;
|
||||
--error ER_GLOBAL_VARIABLE
|
||||
set session query_cache_strip_comments=1;
|
||||
|
||||
#
|
||||
# incorrect types
|
||||
#
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global query_cache_strip_comments=1.1;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global query_cache_strip_comments=1e1;
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
set global query_cache_strip_comments="foo";
|
||||
|
||||
SET @@global.query_cache_strip_comments = @start_global_value;
|
@ -0,0 +1,21 @@
|
||||
# bool readonly
|
||||
|
||||
#
|
||||
# show values;
|
||||
#
|
||||
select @@global.replicate_annotate_rows_events;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.replicate_annotate_rows_events;
|
||||
show global variables like 'replicate_annotate_rows_events';
|
||||
show session variables like 'replicate_annotate_rows_events';
|
||||
select * from information_schema.global_variables where variable_name='replicate_annotate_rows_events';
|
||||
select * from information_schema.session_variables where variable_name='replicate_annotate_rows_events';
|
||||
|
||||
#
|
||||
# show that it's read-only
|
||||
#
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set global replicate_annotate_rows_events=1;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set session replicate_annotate_rows_events=1;
|
||||
|
21
mysql-test/suite/sys_vars/t/thread_alarm_basic.test
Normal file
21
mysql-test/suite/sys_vars/t/thread_alarm_basic.test
Normal file
@ -0,0 +1,21 @@
|
||||
# bool readonly
|
||||
|
||||
#
|
||||
# show values;
|
||||
#
|
||||
select @@global.thread_alarm;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.thread_alarm;
|
||||
show global variables like 'thread_alarm';
|
||||
show session variables like 'thread_alarm';
|
||||
select * from information_schema.global_variables where variable_name='thread_alarm';
|
||||
select * from information_schema.session_variables where variable_name='thread_alarm';
|
||||
|
||||
#
|
||||
# show that it's read-only
|
||||
#
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set global thread_alarm=1;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set session thread_alarm=1;
|
||||
|
Reference in New Issue
Block a user