summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/multi_source/syntax.test
blob: 12539d32a646478504112a053f7e94612e919640 (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
# Test multi master syntax

--source include/not_embedded.inc
--source include/master-slave.inc

# Check syntax of multi source replication

show slave status;
show slave '' status;
show all slaves status;

--echo #
--echo # Check error handling
--echo #

--error WARN_NO_MASTER_INFO
show slave 'qqq' status;
--error WARN_NO_MASTER_INFO
show slave 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' status;
--error ER_WRONG_ARGUMENTS
show slave 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' status;
--error ER_WRONG_ARGUMENTS
change master 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' to master_host='dummy';

--error WARN_NO_MASTER_INFO
start slave 'qqq';
--error WARN_NO_MASTER_INFO
stop slave 'qqq';
--error WARN_NO_MASTER_INFO
flush slave 'qqq';
--error WARN_NO_MASTER_INFO
reset slave 'qqq';

select master_pos_wait('master-bin.999999',0,2,'qqq');
select master_pos_wait('master-bin.999999',0,2,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc');

save_master_pos;
connection slave;
sync_with_master 0,'';
sync_with_master 0 ,'';
sync_with_master 0, '';

--echo #
--echo # checking usage of default_master_connection;
--echo #
select @@default_master_connection;

--error 1238
select @@global.default_master_connection;
--error 1228
set @@global.default_master_connection='qqq';
--error 1231
set @@default_master_connection='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc';
select @@default_master_connection;
set @@default_master_connection='qqq';
select @@default_master_connection;
show variables like "default_master_connection";

--error WARN_NO_MASTER_INFO
show slave status;
select master_pos_wait('master-bin.999999',0,2);
set @@default_master_connection='';
select master_pos_wait('master-bin.999999',0,2);

set @@default_master_connection='';

--echo #
--echo # checking variables
--echo #
show status like "Slave_running";
set @@default_master_connection='qqq';
show status like "Slave_running";
set @@default_master_connection='';

--source include/rpl_end.inc