~linuxjedi/drizzle/trunk-bug-667053

« back to all changes in this revision

Viewing changes to mysql-test/suite/rpl/t/rpl_incident.test

  • Committer: brian
  • Date: 2008-06-25 05:29:13 UTC
  • Revision ID: brian@localhost.localdomain-20080625052913-6upwo0jsrl4lnapl
clean slate

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--source include/master-slave.inc
 
2
--source include/have_debug.inc
 
3
 
 
4
--echo **** On Master ****
 
5
CREATE TABLE t1 (a INT);
 
6
 
 
7
INSERT INTO t1 VALUES (1),(2),(3);
 
8
SELECT * FROM t1;
 
9
 
 
10
# This will generate an incident log event and store it in the binary
 
11
# log before the replace statement.
 
12
REPLACE INTO t1 VALUES (4);
 
13
--save_master_pos
 
14
SELECT * FROM t1;
 
15
 
 
16
connection slave;
 
17
--wait_for_slave_to_stop
 
18
 
 
19
# The 4 should not be inserted into the table, since the incident log
 
20
# event should have stop the slave.
 
21
--echo **** On Slave ****
 
22
SELECT * FROM t1;
 
23
 
 
24
--replace_result $MASTER_MYPORT MASTER_PORT
 
25
--replace_column 1 # 6 # 7 # 8 # 9 # 22 # 23 # 33 #
 
26
--query_vertical SHOW SLAVE STATUS
 
27
 
 
28
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
 
29
START SLAVE;
 
30
--sync_with_master
 
31
 
 
32
# Now, we should have inserted the row into the table and the slave
 
33
# should be running. We should also have rotated to a new binary log.
 
34
 
 
35
SELECT * FROM t1;
 
36
--replace_result $MASTER_MYPORT MASTER_PORT
 
37
--replace_column 1 # 6 # 7 # 8 # 9 # 22 # 23 # 33 #
 
38
--query_vertical SHOW SLAVE STATUS
 
39
 
 
40
connection master;
 
41
DROP TABLE t1;
 
42
--sync_slave_with_master