~ubuntu-branches/ubuntu/natty/mysql-5.1/natty-proposed

« back to all changes in this revision

Viewing changes to mysql-test/suite/engines/funcs/t/rpl_row_until.test

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 08:30:45 UTC
  • mfrom: (1.4.1)
  • Revision ID: package-import@ubuntu.com-20120222083045-2rd53r4bnyx7qus4
Tags: 5.1.61-0ubuntu0.11.04.1
* SECURITY UPDATE: Update to 5.1.61 to fix multiple security issues
  (LP: #937869)
  - http://www.oracle.com/technetwork/topics/security/cpujan2012-366304.html
  - CVE-2011-2262
  - CVE-2012-0075
  - CVE-2012-0112
  - CVE-2012-0113
  - CVE-2012-0114
  - CVE-2012-0115
  - CVE-2012-0116
  - CVE-2012-0117
  - CVE-2012-0118
  - CVE-2012-0119
  - CVE-2012-0120
  - CVE-2012-0484
  - CVE-2012-0485
  - CVE-2012-0486
  - CVE-2012-0487
  - CVE-2012-0488
  - CVE-2012-0489
  - CVE-2012-0490
  - CVE-2012-0491
  - CVE-2012-0492
  - CVE-2012-0493
  - CVE-2012-0494
  - CVE-2012-0495
  - CVE-2012-0496

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
# create some events on master
19
19
create table t1(n int not null auto_increment primary key);
20
20
insert into t1 values (1),(2),(3),(4);
21
 
let $master_log_pos_1= query_get_value(SHOW MASTER STATUS, Position, 1);
22
21
drop table t1;
23
 
 
24
22
create table t2(n int not null auto_increment primary key);
25
23
insert into t2 values (1),(2);
26
 
let $master_log_pos_2= query_get_value(SHOW MASTER STATUS, Position, 1);
27
24
insert into t2 values (3),(4);
28
25
drop table t2;
29
26
 
30
27
# try to replicate all queries until drop of t1
31
28
connection slave;
32
 
--replace_result $master_log_pos_1 MASTER_LOG_POS
33
 
eval start slave until master_log_file='master-bin.000001', master_log_pos=$master_log_pos_1;
 
29
start slave until master_log_file='master-bin.000001', master_log_pos=311;
34
30
sleep 2;
35
31
wait_for_slave_to_stop;
36
32
# here table should be still not deleted
37
33
select * from t1;
38
 
--let $slave_param= Exec_Master_Log_Pos
39
 
--let $slave_param_value= $master_log_pos_1
40
 
--source include/check_slave_param.inc
 
34
--vertical_results
 
35
--replace_result $MASTER_MYPORT MASTER_MYPORT
 
36
--replace_column 1 # 7 # 9 # 11 # 22 # 23 # 33 #
 
37
show slave status;
41
38
 
42
39
# this should fail right after start
43
 
--replace_result 291 MASTER_LOG_POS
44
40
start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291;
45
41
# again this table should be still not deleted
46
42
select * from t1;
47
43
sleep 2;
48
44
wait_for_slave_to_stop;
49
 
--let $slave_param= Exec_Master_Log_Pos
50
 
--let $slave_param_value= $master_log_pos_1
51
 
--source include/check_slave_param.inc
 
45
--vertical_results
 
46
--replace_result $MASTER_MYPORT MASTER_MYPORT
 
47
--replace_column 1 # 7 # 9 # 11 # 22 # 23 # 33 #
 
48
show slave status;
52
49
 
53
50
# try replicate all up to and not including the second insert to t2;
54
 
let $master_log_pos= $master_log_pos_2;
55
 
let $relay_log_file= slave-relay-bin.000004;
56
 
--source include/get_relay_log_pos.inc
57
 
--replace_result $relay_log_pos RELAY_LOG_POS
58
 
eval start slave until relay_log_file='$relay_log_file', relay_log_pos=$relay_log_pos;
 
51
start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=728;
59
52
sleep 2;
60
53
wait_for_slave_to_stop;
61
54
select * from t2;
62
 
--let $slave_param= Exec_Master_Log_Pos
63
 
--let $slave_param_value= $master_log_pos
64
 
--source include/check_slave_param.inc
 
55
--vertical_results
 
56
--replace_result $MASTER_MYPORT MASTER_MYPORT
 
57
--replace_column 1 # 7 # 9 # 11 # 22 # 23 # 33 #
 
58
show slave status;
65
59
 
66
60
# clean up
67
61
start slave;
71
65
sync_with_master;
72
66
stop slave;
73
67
 
74
 
--let $exec_log_pos_1= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1)
75
68
# this should stop immediately as we are already there
76
 
--replace_result $master_log_pos_2 MASTER_LOG_POS
77
 
eval start slave until master_log_file='master-bin.000001', master_log_pos=$master_log_pos_2;
 
69
start slave until master_log_file='master-bin.000001', master_log_pos=740;
78
70
sleep 2;
79
71
wait_for_slave_to_stop;
80
72
# here the sql slave thread should be stopped
81
 
--let $slave_param= Exec_Master_Log_Pos
82
 
--let $slave_param_value= $exec_log_pos_1
83
 
--source include/check_slave_param.inc
 
73
--vertical_results
 
74
--replace_result $MASTER_MYPORT MASTER_MYPORT bin.000005 bin.000004 bin.000006 bin.000004 bin.000007 bin.000004
 
75
--replace_column 1 # 7 # 9 # 22 # 23 # 33 #
 
76
show slave status;
84
77
 
85
78
#testing various error conditions
86
 
--replace_result 561 MASTER_LOG_POS
87
79
--error 1277
88
80
start slave until master_log_file='master-bin', master_log_pos=561;
89
 
--replace_result 561 MASTER_LOG_POS 12 RELAY_LOG_POS
90
81
--error 1277
91
82
start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12;
92
83
--error 1277
93
84
start slave until master_log_file='master-bin.000001';
94
85
--error 1277
95
86
start slave until relay_log_file='slave-relay-bin.000002';
96
 
--replace_result 561 MASTER_LOG_POS
97
87
--error 1277
98
88
start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561;
99
89
# Warning should be given for second command
100
90
start slave sql_thread;
101
 
--replace_result 740 MASTER_LOG_POS
102
91
start slave until master_log_file='master-bin.000001', master_log_pos=740;