| 1 |
use test; |
| 2 |
create table test.t1 ( |
| 3 |
a varchar(20) not null, |
| 4 |
b varchar(20) not null, |
| 5 |
c varchar(20) not null, |
| 6 |
d varchar(20), |
| 7 |
primary key(a,b) |
| 8 |
) engine=ndb; |
| 9 |
insert into test.t1 values |
| 10 |
("1a","1b","1c","1d"), |
| 11 |
("2a","2b","2c","2d"), |
| 12 |
("3a","3b","3c","3d"); |
| 13 |
Stall backup completion *after* table is scanned. |
| 14 |
... We will still collect log entries on table updates. |
| 15 |
|
| 16 |
Run backup |
| 17 |
Starting backup |
| 18 |
Backup started |
| 19 |
Update 'a' to a 'compared as equal'-value |
| 20 |
update test.t1 set a="1A" where a="1a"; |
| 21 |
Create log entries with insert and delete as well |
| 22 |
insert into test.t1 values("6a","6b","6c","6d"); |
| 23 |
delete from test.t1 where a="2a"; |
| 24 |
Now allow backup to complete... |
| 25 |
|
| 26 |
Waiting for backup to complete |
| 27 |
Backup completed |
| 28 |
truncate t1; |
| 29 |
Run restore |
| 30 |
Restored table should show 'a=1a' updated to "1A" |
| 31 |
, as well as '2a' deleted and '6a' inserted . |
| 32 |
select * from test.t1 order by b; |
| 33 |
a b c d |
| 34 |
1A 1b 1c 1d |
| 35 |
3a 3b 3c 3d |
| 36 |
6a 6b 6c 6d |
| 37 |
drop table test.t1; |