epermana / tungsten-replicator

Automatically exported from code.google.com/p/tungsten-replicator
1 stars 0 forks source link

TIME coulmns with values larger than 24 hours are not replicated correctly with RBR #1062

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Install master/slave replication
2. set binlog_format = row
3. insert into the master some TIME values larger than 24 hours

drop table if exists times;
create table times ( id int not null primary key, time_as_time time, 
time_as_text varchar(50), remark varchar(100));

insert into times values (1,  '10:00:00',    '10:00:00', 'regular time');
insert into times values (2,  '12:00:00',    '12:00:00', 'regular time (noon)');
insert into times values (3,  '02:10:10',    '02:10:10', 'regular time at 
night');
insert into times values (4,  '16:16:16',    '16:16:16', 'regular time in the 
afternoon');
insert into times values (5,  '23:59:59',    '23:59:59', 'maximum day time');
insert into times values (6,  '00:00:00',    '00:00:00', 'minimum day time');
insert into times values (7,  '838:59:59',  '838:59:59', 'maximum absolute 
time');
insert into times values (8, '-838:59:59', '-838:59:59', 'minimum absolute 
time');

# MASTER
+----+--------------+--------------+-------------------------------+
| id | time_as_time | time_as_text | remark                        |
+----+--------------+--------------+-------------------------------+
|  1 | 10:00:00     | 10:00:00     | regular time                  |
|  2 | 12:00:00     | 12:00:00     | regular time (noon)           |
|  3 | 02:10:10     | 02:10:10     | regular time at night         |
|  4 | 16:16:16     | 16:16:16     | regular time in the afternoon |
|  5 | 23:59:59     | 23:59:59     | maximum day time              |
|  6 | 00:00:00     | 00:00:00     | minimum day time              |
|  7 | 838:59:59    | 838:59:59    | maximum absolute time         |
|  8 | -838:59:59   | -838:59:59   | minimum absolute time         |
+----+--------------+--------------+-------------------------------+

What is the expected output?

Same as the master

What do you see instead?

The oversize time values are truncated.

# SLAVE
+----+--------------+--------------+-------------------------------+
| id | time_as_time | time_as_text | remark                        |
+----+--------------+--------------+-------------------------------+
|  1 | 10:00:00     | 10:00:00     | regular time                  |
|  2 | 12:00:00     | 12:00:00     | regular time (noon)           |
|  3 | 02:10:10     | 02:10:10     | regular time at night         |
|  4 | 16:16:16     | 16:16:16     | regular time in the afternoon |
|  5 | 23:59:59     | 23:59:59     | maximum day time              |
|  6 | 00:00:00     | 00:00:00     | minimum day time              |
|  7 | 22:59:59     | 838:59:59    | maximum absolute time         |
|  8 | 23:12:57     | -838:59:59   | minimum absolute time         |
+----+--------------+--------------+-------------------------------+

What is the possible cause?

N/A

What is the proposed solution?

N/A

Original issue reported on code.google.com by g.maxia on 25 Nov 2014 at 4:32

GoogleCodeExporter commented 9 years ago
Possibly related to Issue-683 and issue-1031 ?

Original comment by g.maxia on 25 Nov 2014 at 4:35

GoogleCodeExporter commented 9 years ago
This is a great find.  Thanks Giuseppe!

Original comment by robert.h...@continuent.com on 25 Nov 2014 at 4:49

GoogleCodeExporter commented 9 years ago

Original comment by linas.vi...@continuent.com on 19 Dec 2014 at 6:59

GoogleCodeExporter commented 9 years ago

Original comment by linas.vi...@continuent.com on 19 Jan 2015 at 2:18