File: rpl_row_stop_middle_update.test

package info (click to toggle)
mysql-5.1 5.1.73-1%2Bdeb6u1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze-lts
  • size: 197,132 kB
  • ctags: 93,377
  • sloc: cpp: 579,952; ansic: 429,462; perl: 49,053; sh: 21,692; pascal: 21,272; yacc: 12,801; makefile: 4,545; xml: 4,114; sql: 3,297; lex: 1,265; asm: 1,023
file content (33 lines) | stat: -rw-r--r-- 1,047 bytes parent folder | download | duplicates (2)
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
-- source include/have_binlog_format_row.inc
-- source include/have_debug.inc
-- source include/master-slave.inc

# master is asked to create small Rows events: if only one event is
# created, stopping slave at the end of that one will show no bug, we
# need at least two (and stop after first); in this test we use three.

connection master;
create table t1 (words varchar(20)) engine=myisam;

load data infile '../../std_data/words.dat' into table t1 (words);
select count(*) from t1;
save_master_pos;

connection slave;

# slave will automatically stop the sql thread thanks to the .opt
# file; it will initiate the stop request after the first
# Rows_log_event (out of 3) but should wait until the last one is
# executed before stopping.

source include/wait_for_slave_sql_to_stop.inc;

# check that we inserted all rows (waited until the last Rows event)
select count(*) from t1;

connection master;
drop table t1;
connection slave; # slave SQL thread is stopped
drop table t1;
--let $rpl_only_running_threads= 1
--source include/rpl_end.inc