| 1 |
--source include/have_ndb.inc |
| 2 |
# Test case currently fails for statement-based replication, as BUG#22045 is |
| 3 |
# not fixed in the replication slave thread. |
| 4 |
--source include/have_binlog_format_mixed_or_row.inc |
| 5 |
--source suite/ndb_rpl/ndb_master-slave.inc |
| 6 |
|
| 7 |
# BUG#22045: Got error 839 'Illegal null attribute' from NDBCLUSTER when 'Replace Into'. |
| 8 |
# Check that REPLACE INTO replicates correctly with partial value list and with/without blobs. |
| 9 |
connection master; |
| 10 |
create table t1 (a int primary key, |
| 11 |
b varchar(100) default 'b', |
| 12 |
c varchar(100)) engine=ndbcluster; |
| 13 |
insert into t1 values (1, 'b1', 'c1'); |
| 14 |
insert into t1 (a) values (2); |
| 15 |
insert into t1 (a, b) values (3, 'b3'); |
| 16 |
replace into t1 values (5, 'b5', 'c5'); |
| 17 |
replace into t1 (a) values (6); |
| 18 |
replace into t1 (a, c) values (7, 'c7'); |
| 19 |
select * from t1 order by a; |
| 20 |
|
| 21 |
--sync_slave_with_master |
| 22 |
select * from t1 order by a; |
| 23 |
|
| 24 |
connection master; |
| 25 |
replace into t1 (a) values (1); |
| 26 |
replace into t1 (a, b) values (2, 'b2x'); |
| 27 |
replace into t1 (a, c) values (3, 'c3x'); |
| 28 |
replace into t1 (a, b, c) values (5, 'b5x', 'c5x'); |
| 29 |
replace into t1 (a) values (6); |
| 30 |
replace into t1 (a) values (7); |
| 31 |
select * from t1 order by a; |
| 32 |
|
| 33 |
--sync_slave_with_master |
| 34 |
select * from t1 order by a; |
| 35 |
|
| 36 |
--connection master |
| 37 |
drop table t1; |
| 38 |
create table t1 (a int primary key, |
| 39 |
b varchar(100) default 'b', |
| 40 |
c varchar(100), |
| 41 |
d text, |
| 42 |
e text) engine=ndbcluster; |
| 43 |
insert into t1 values (1, 'b1', 'c1', 'd1', 'e1'); |
| 44 |
insert into t1 (a) values (2); |
| 45 |
insert into t1 (a, b, d) values (3, 'b3', 'd3'); |
| 46 |
replace into t1 values (5, 'b5', 'c5', 'd5', 'e5'); |
| 47 |
replace into t1 (a) values (6); |
| 48 |
replace into t1 (a, c, e) values (7, 'c7', 'e7'); |
| 49 |
select * from t1 order by a; |
| 50 |
|
| 51 |
--sync_slave_with_master |
| 52 |
select * from t1 order by a; |
| 53 |
|
| 54 |
connection master; |
| 55 |
replace into t1 (a) values (1); |
| 56 |
replace into t1 (a, b, d) values (2, 'b2x', 'd2x'); |
| 57 |
replace into t1 (a, c, e) values (3, 'c3x', 'e3x'); |
| 58 |
replace into t1 (a, b, c, d, e) values (5, 'b5x', 'c5x', 'd5x', 'e5x'); |
| 59 |
replace into t1 (a) values (6); |
| 60 |
replace into t1 (a, e) values (7, 'e7x'); |
| 61 |
select * from t1 order by a; |
| 62 |
|
| 63 |
--sync_slave_with_master |
| 64 |
select * from t1 order by a; |
| 65 |
|
| 66 |
--connection master |
| 67 |
drop table t1; |
| 68 |
|
| 69 |
-- source include/rpl_end.inc |