Description:
Conflict info didn't write into exception table for “Same timestamp wins” conflict resolution if we create exception table with wrong column type.
How to repeat:
1: Create exception like:
create table `test`.`t1$EX`
(
server_id tinyint,
master_server_id int unsigned,
master_epoch bigint unsigned,
count int unsigned,
a int not null,
d varchar(9) not null,
primary key(server_id, master_server_id, master_epoch, count)) engine ndb;
2: run MTR
./mysql-test-run.pl --do-test=rpl_ndb_conflict_old
3: Got wrong conflict info
*** slave - check conflict info, change depends on calling test
SELECT VARIABLE_VALUE-@init_ndb_conflict_fn_max FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME LIKE "NDB_CONFL
ICT_FN_MAX";
VARIABLE_VALUE-@init_ndb_conflict_fn_max
0
SELECT VARIABLE_VALUE-@init_ndb_conflict_fn_old FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME LIKE "NDB_CONFL
ICT_FN_OLD";
VARIABLE_VALUE-@init_ndb_conflict_fn_old
5
SELECT * FROM `t1$EX` ORDER BY server_id, master_server_id, master_epoch, count;
server_id master_server_id master_epoch count a d
SELECT * FROM `t1$EX` ORDER BY a, d;
server_id master_server_id master_epoch count a d
SELECT * FROM `t2$EX` ORDER BY server_id, master_server_id, master_epoch, count;
SELECT * FROM `t2$EX` ORDER BY a, d;
Suggested fix:
Check the type of required columns.