~ubuntu-branches/ubuntu/karmic/mysql-dfsg-5.1/karmic

« back to all changes in this revision

Viewing changes to mysql-test/extra/rpl_tests/rpl_log.test

  • Committer: Bazaar Package Importer
  • Author(s): Mathias Gug
  • Date: 2009-06-25 12:55:45 UTC
  • mfrom: (0.2.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 9.
  • Revision ID: james.westby@ubuntu.com-20090625125545-v27uqh8rlsj8uh2y
Tags: upstream-5.1.34
ImportĀ upstreamĀ versionĀ 5.1.34

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
# test the slave immediately writes DROP TEMPORARY TABLE this_old_table).
10
10
# We wait for the slave to have written all he wants to the binlog
11
11
# (otherwise RESET MASTER may come too early).
12
 
save_master_pos;
13
 
connection slave;
14
 
sync_with_master;
15
 
stop slave;
 
12
sync_slave_with_master;
 
13
source include/stop_slave.inc;
16
14
--source include/wait_for_slave_to_stop.inc
17
15
reset master;
18
16
reset slave;
25
23
eval create table t1(n int not null auto_increment primary key)ENGINE=$engine_type;
26
24
insert into t1 values (NULL);
27
25
drop table t1;
 
26
let $LOAD_FILE= ../../std_data/words.dat;
 
27
if (!`SELECT length(load_file('$LOAD_FILE'))`){
 
28
  let $LOAD_FILE= ../$LOAD_FILE;
 
29
}
28
30
eval create table t1 (word char(20) not null)ENGINE=$engine_type;
29
 
load data infile '../std_data_ln/words.dat' into table t1 ignore 1 lines;
 
31
--replace_result $LOAD_FILE LOAD_FILE
 
32
eval load data infile '$LOAD_FILE' into table t1 ignore 1 lines;
30
33
select count(*) from t1;
31
34
--replace_result $VERSION VERSION
32
35
--replace_column 2 # 5 #
67
70
connection master;
68
71
select * from t1 order by 1 asc;
69
72
 
70
 
save_master_pos;
71
 
connection slave;
72
 
# Note that the above 'slave start' will cause a 3rd rotate event (a fake one)
73
 
# to go into the relay log (the master always sends a fake one when replication
74
 
# starts). 
75
 
let $result_pattern= '%127.0.0.1%root%master-bin.000002%slave-relay-bin.000005%Yes%Yes%0%0%None%';
76
 
--source include/wait_slave_status.inc
77
 
sync_with_master;
 
73
sync_slave_with_master;
 
74
 
78
75
#check t1 on slave to ensure whether it's identical with on master
79
76
select * from t1 order by 1 asc;
80
77
flush logs;
81
 
stop slave;
82
 
--source include/wait_for_slave_to_stop.inc
 
78
source include/stop_slave.inc;
 
79
source include/start_slave.inc;
83
80
connection master;
84
81
 
85
82
# Create some entries for second log
92
89
--replace_column 2 # 5 #
93
90
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
94
91
show binlog events in 'master-bin.000002';
 
92
--replace_column 2 #
95
93
show binary logs;
96
 
save_master_pos;
97
 
connection slave;
98
 
start slave;
 
94
sync_slave_with_master;
99
95
--source include/wait_for_slave_to_start.inc
100
 
sync_with_master;
 
96
--replace_column 2 #
101
97
show binary logs;
102
98
--replace_result $MASTER_MYPORT MASTER_PORT $VERSION VERSION
103
99
--replace_column 2 # 5 #
133
129
# Bug #6880: LAST_INSERT_ID() within a statement
134
130
#
135
131
 
 
132
# Reset binlog so that show binlog events will not show the tests
 
133
# above.
 
134
source include/master-slave-reset.inc;
 
135
connection master;
 
136
 
136
137
create table t1(a int auto_increment primary key, b int);
137
138
insert into t1 values (NULL, 1);
138
 
reset master;
139
139
set insert_id=5;
140
140
insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id());
141
141
source include/show_binlog_events.inc;
145
145
# End of 4.1 tests
146
146
 
147
147
sync_slave_with_master;
148