Closed GoogleCodeExporter closed 9 years ago
Oop should note MySQL version is Percona 5.5.31-rel30.3.520
Original comment by bran...@seibelnet.ca
on 22 Aug 2013 at 8:54
Thanks for your report!
This is possibly a regression of Issue#381
How to reproduce:
use test;
drop table if exists test_datetime;
drop table if exists test_timestamp;
create table test_datetime(id int not null primary key, dt datetime);
create table test_timestamp(id int not null primary key, ts timestamp);
set binlog_format=statement;
insert into test_datetime values (1, '0000-00-00 00:00:00' );
insert into test_timestamp values (1, '0000-00-00 00:00:00' );
set binlog_format=row;
insert into test_datetime values (2, '0000-00-00 00:00:00' );
insert into test_timestamp values (2, '0000-00-00 00:00:00' );
select * from test_datetime;
select * from test_timestamp;
Original comment by g.maxia
on 22 Aug 2013 at 9:29
Original comment by linas.vi...@continuent.com
on 23 Aug 2013 at 10:06
First clues (need more investigation):
the RowsLogEvent changes done by the r1508 backport *didn't* overwrite the
logic that has been added to address the Issue 381 previously. In fact, the new
MySQL 5.6 binary log field types MysqlBinlog.MYSQL_TYPE_TIMESTAMP2 and
MYSQL_TYPE_DATE2 has that zero-handling logic too.
The exception itself is a bit different from Issue 381.
Previous exception: SQLDataException: Incorrect datetime value: '1969-12-31
16:00:00' for column 'myTimeStamp' at row 1
Current exception: Integer cannot be cast to java.sql.Timestamp
While the code that handles zero-dates looks like this is still in-place:
637 if (i32 == 0)
638 {
639 value.setValue(Integer.valueOf(0));
640 }
Conclusion: the fix of Issue 381 is there, but the zero integer can't be
applied in this case. We need to find the reason why.
Original comment by linas.vi...@continuent.com
on 23 Aug 2013 at 10:22
The failure occurs regardless of the MySQL version (tested with 5.1, 5.5, and
5.6).
The same failure happens for both DATETIME and TIMESTAMP
Original comment by g.maxia
on 23 Aug 2013 at 10:36
A one-liner fix is provided in r1616. Needs QA verification.
Original comment by linas.vi...@continuent.com
on 23 Aug 2013 at 1:44
After this fix, the extractor fails.
INFO | jvm 1 | 2013/08/24 09:36:37 | 2013-08-24 09:36:36,980 [cookbook -
binlog-to-q-0] INFO pipeline.SingleThreadStageTask Last successfully processed
event prior to termination: seqno=6 eventid=mysql-bin.000002:0000000000001600;0
INFO | jvm 1 | 2013/08/24 09:36:37 | 2013-08-24 09:36:36,981 [cookbook -
binlog-to-q-0] INFO pipeline.SingleThreadStageTask Task event count: 7
INFO | jvm 1 | 2013/08/24 09:36:37 | 2013-08-24 09:36:36,981 [cookbook -
pool-2-thread-1] ERROR management.OpenReplicatorManager Received error
notification, shutting down services :
INFO | jvm 1 | 2013/08/24 09:36:37 | Event extraction failed
INFO | jvm 1 | 2013/08/24 09:36:37 |
com.continuent.tungsten.replicator.extractor.ExtractorException: Unexpected
failure while extracting event mysql-bin.000002 (1810)
INFO | jvm 1 | 2013/08/24 09:36:37 | at
com.continuent.tungsten.replicator.extractor.mysql.MySQLExtractor.extractEvent(M
ySQLExtractor.java:1062)
INFO | jvm 1 | 2013/08/24 09:36:37 | at
com.continuent.tungsten.replicator.extractor.mysql.MySQLExtractor.extract(MySQLE
xtractor.java:1086)
INFO | jvm 1 | 2013/08/24 09:36:37 | at
com.continuent.tungsten.replicator.extractor.ExtractorWrapper.extract(ExtractorW
rapper.java:96)
INFO | jvm 1 | 2013/08/24 09:36:37 | at
com.continuent.tungsten.replicator.extractor.ExtractorWrapper.extract(ExtractorW
rapper.java:56)
INFO | jvm 1 | 2013/08/24 09:36:37 | at
com.continuent.tungsten.replicator.pipeline.SingleThreadStageTask.runTask(Single
ThreadStageTask.java:238)
INFO | jvm 1 | 2013/08/24 09:36:37 | at
com.continuent.tungsten.replicator.pipeline.SingleThreadStageTask.run(SingleThre
adStageTask.java:169)
INFO | jvm 1 | 2013/08/24 09:36:37 | at
java.lang.Thread.run(Thread.java:724)
INFO | jvm 1 | 2013/08/24 09:36:37 | Caused by:
java.lang.ArrayIndexOutOfBoundsException: 43
INFO | jvm 1 | 2013/08/24 09:36:37 | at
com.continuent.tungsten.replicator.extractor.mysql.conversion.BigEndianConversio
n.convertNBytesToLong(BigEndianConversion.java:111)
INFO | jvm 1 | 2013/08/24 09:36:37 | at
com.continuent.tungsten.replicator.extractor.mysql.RowsLogEvent.extractValue(Row
sLogEvent.java:628)
INFO | jvm 1 | 2013/08/24 09:36:37 | at
com.continuent.tungsten.replicator.extractor.mysql.RowsLogEvent.processExtracted
EventRow(RowsLogEvent.java:1202)
INFO | jvm 1 | 2013/08/24 09:36:37 | at
com.continuent.tungsten.replicator.extractor.mysql.WriteRowsLogEvent.processExtr
actedEvent(WriteRowsLogEvent.java:88)
INFO | jvm 1 | 2013/08/24 09:36:37 | at
com.continuent.tungsten.replicator.extractor.mysql.MySQLExtractor.extractEvent(M
ySQLExtractor.java:897)
INFO | jvm 1 | 2013/08/24 09:36:37 | ... 6 more
INFO | jvm 1 | 2013/08/24 09:36:37 | 2013-08-24 09:36:36,984 [cookbook -
pool-2-thread-1] WARN management.OpenReplicatorManager Performing emergency
service shutdown
INFO | jvm 1 | 2013/08/24 09:36:37 | 2013-08-24 09:36:36,984 [cookbook -
pool-2-thread-1] INFO pipeline.Pipeline Shutting down pipeline: master
INFO | jvm 1 | 2013/08/24 09:36:37 | 2013-08-24 09:36:36,984 [cookbook -
q-to-thl-0] WARN pipeline.SingleThreadStageTask Received unexpected interrupt
in stage task: q-to-thl
INFO | jvm 1 | 2013/08/24 09:36:37 | 2013-08-24 09:36:36,985 [cookbook -
q-to-thl-0] INFO pipeline.SingleThreadStageTask Terminating processing for
stage task thread
INFO | jvm 1 | 2013/08/24 09:36:37 | 2013-08-24 09:36:36,985 [cookbook -
q-to-thl-0] INFO pipeline.SingleThreadStageTask Last successfully processed
event prior to termination: seqno=6 eventid=mysql-bin.000002:0000000000001600;0
how to reproduce:
use test;
drop table if exists boundaries;
create table boundaries(id int not null primary key, c char(20),
ti time,
d date,
dt datetime,
ts timestamp
) engine=innodb;
set binlog_format=row;
insert into boundaries values (1, 'all valid', '10:10:10', '2013-08-24',
'2013-08-24 10:10:10', '2013-08-24 10:10:10');
insert into boundaries values (2, 'zero time', '00:00:00', '2013-08-24',
'2013-08-24 10:10:10', '2013-08-24 10:10:10');
insert into boundaries values (3, 'zero date', '10:10:10', '0000-00-00',
'2013-08-24 10:10:10', '2013-08-24 10:10:10');
insert into boundaries values (4, 'zero datetime', '10:10:10', '2013-08-24',
'0000-00-00 00:00:00', '2013-08-24 10:10:10'); ## extractor breaks here
insert into boundaries values (5, 'zero timestamp', '10:10:10', '2013-08-24',
'2013-08-24 10:10:10', '0000-00-00 00:00:00');
Original comment by g.maxia
on 24 Aug 2013 at 8:38
This issue should be fixed now.
Original comment by stephane...@continuent.com
on 24 Aug 2013 at 11:21
Original comment by linas.vi...@continuent.com
on 25 Aug 2013 at 7:41
This issue is fixed. Build 2.1.2-23 passes the test
Original comment by g.maxia
on 26 Aug 2013 at 6:26
An entry has been added to the release notes for 2.1.2.
Original comment by mc.br...@continuent.com
on 28 Aug 2013 at 11:32
Thanks for the quick turn around on this guys!
Original comment by bran...@seibelnet.ca
on 28 Aug 2013 at 11:57
Original issue reported on code.google.com by
bran...@seibelnet.ca
on 22 Aug 2013 at 8:50