blob: 7cc068c68c7c8a3fe5c84aba4992833c684eaa4e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
# Tests that variables work correctly (setting and showing). This
# test is like the main.variables test, but for variables not
# available in embedded mode.
source include/not_embedded.inc;
--echo ---- Init ----
# Backup global variables so they can be restored at end of test.
set @my_slave_net_timeout =@@global.slave_net_timeout;
--echo ---- Test ----
set global slave_net_timeout=100;
set global sql_slave_skip_counter=100;
# End of 4.1 tests
# BUG #7800: Add various-slave related variables to SHOW VARIABLES
show variables like 'slave_compressed_protocol';
--replace_column 2 SLAVE_LOAD_TMPDIR
show variables like 'slave_load_tmpdir';
# We just set some arbitrary values in variables-master.opt so we can test
# that a list of values works correctly
show variables like 'slave_skip_errors';
--echo ---- Clean Up ----
set global slave_net_timeout=default;
# sql_slave_skip_counter is write-only, so we can't save previous
# value and restore it here. That's ok, because it's normally 0.
set global sql_slave_skip_counter= 0;
set @@global.slave_net_timeout= @my_slave_net_timeout;
#
# Bug#28234 - global/session scope - documentation vs implementation
#
--echo
#
# Additional variables fixed from sql_repl.cc.
#
--echo #
SHOW VARIABLES like 'log_slave_updates';
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.log_slave_updates;
SELECT @@global.log_slave_updates;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@session.log_slave_updates= true;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@global.log_slave_updates= true;
#
--echo #
SHOW VARIABLES like 'relay_log';
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.relay_log;
SELECT @@global.relay_log;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@session.relay_log= 'x';
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@global.relay_log= 'x';
#
--echo #
SHOW VARIABLES like 'relay_log_index';
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.relay_log_index;
SELECT @@global.relay_log_index;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@session.relay_log_index= 'x';
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@global.relay_log_index= 'x';
#
--echo #
SHOW VARIABLES like 'relay_log_info_file';
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.relay_log_info_file;
SELECT @@global.relay_log_info_file;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@session.relay_log_info_file= 'x';
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@global.relay_log_info_file= 'x';
#
--echo #
SHOW VARIABLES like 'relay_log_space_limit';
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.relay_log_space_limit;
SELECT @@global.relay_log_space_limit;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@session.relay_log_space_limit= 7;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@global.relay_log_space_limit= 7;
#
--echo #
--replace_column 2 #
SHOW VARIABLES like 'slave_load_tmpdir';
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.slave_load_tmpdir;
--replace_column 1 #
SELECT @@global.slave_load_tmpdir;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@session.slave_load_tmpdir= 'x';
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@global.slave_load_tmpdir= 'x';
#
--echo #
SHOW VARIABLES like 'slave_skip_errors';
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.slave_skip_errors;
SELECT @@global.slave_skip_errors;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@session.slave_skip_errors= 7;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@global.slave_skip_errors= 7;
#
|