~ubuntu-branches/ubuntu/vivid/mariadb-5.5/vivid

« back to all changes in this revision

Viewing changes to storage/tokudb/mysql-test/rpl/t/rpl_tokudb_update_unique_uc0_lookup0.test

  • Committer: Package Import Robot
  • Author(s): Otto Kekäläinen
  • Date: 2014-11-14 21:04:24 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20141114210424-xlyna0ozl11647o5
Tags: 5.5.40-0ubuntu0.14.10.1
* SECURITY UPDATE: Update to 5.5.40 to fix security issues (LP: #1391676)
  - CVE-2014-6507
  - CVE-2014-6491
  - CVE-2014-6500
  - CVE-2014-6469
  - CVE-2014-6555
  - CVE-2014-6559
  - CVE-2014-6494
  - CVE-2014-6496
  - CVE-2014-6464
* Add bsdutils as mariadb-server dependency like upstream does in 5.5.40.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# test replicated update rows log events on a table with a primary key.
 
2
 
 
3
source include/have_tokudb.inc;
 
4
let $engine=tokudb;
 
5
source include/have_binlog_format_row.inc;
 
6
source include/master-slave.inc;
 
7
 
 
8
# initialize
 
9
connection master;
 
10
disable_warnings;
 
11
drop table if exists t;
 
12
enable_warnings;
 
13
 
 
14
connection slave;
 
15
# show variables like 'read_only';
 
16
# show variables like 'tokudb_rpl_%';
 
17
 
 
18
# insert some rows
 
19
connection master;
 
20
# select @@binlog_format;
 
21
# select @@autocommit;
 
22
eval create table t (a bigint not null, b bigint not null, c bigint not null, primary key(a), unique key(c)) engine=$engine;
 
23
# show create table t;
 
24
insert into t values (1,0,-1);
 
25
insert into t values (2,0,-2),(3,0,-3);
 
26
insert into t values (4,0,-4);
 
27
 
 
28
# wait for the inserts to finish on the slave
 
29
connection master;
 
30
sync_slave_with_master;
 
31
# source include/sync_slave_sql_with_master.inc;
 
32
 
 
33
# diff tables
 
34
connection master;
 
35
--let $diff_tables= master:test.t, slave:test.t
 
36
source include/diff_tables.inc;
 
37
 
 
38
# delete a row
 
39
connection master;
 
40
update t set b=b+1 where a=2;
 
41
update t set b=b+2 where a=1;
 
42
update t set b=b+3 where a=4;
 
43
update t set b=b+4 where a=3;
 
44
update t set b=b+1 where 1<=a and a<=3;
 
45
select unix_timestamp() into @tstart;
 
46
 
 
47
# wait for the delete to finish on the slave
 
48
connection master;
 
49
sync_slave_with_master;
 
50
# source include/sync_slave_sql_with_master.inc;
 
51
connection master;
 
52
select unix_timestamp() into @tend;
 
53
select @tend-@tstart <= 5; # assert no delay in the delete time
 
54
 
 
55
connection slave;
 
56
select * from t;
 
57
 
 
58
# diff tables
 
59
--let $diff_tables= master:test.t, slave:test.t
 
60
source include/diff_tables.inc;
 
61
 
 
62
# cleanup
 
63
connection master;
 
64
drop table if exists t;
 
65
 
 
66
sync_slave_with_master;
 
67
# source include/sync_slave_sql_with_master.inc;
 
68
 
 
69
source include/rpl_end.inc;
 
70