chiranjeevineo / tungsten-replicator

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

When using Row replication, session variables are not replicated, which can bring errors #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Here is an example of the stack trace that can result. 

INFO | jvm 1 | 2011/02/18 16:58:37 | 2011-02-18 16:58:37,125 ERROR 
replicator.applier.JdbcApplier PreparedStatement failed: INSERT INTO 
`mats`.`test2` ( `i` , `j` , `v` ) VALUES ( ? , ? , ? )
INFO | jvm 1 | 2011/02/18 16:58:37 | Arguments:
INFO | jvm 1 | 2011/02/18 16:58:37 | - ROW# = 0
INFO | jvm 1 | 2011/02/18 16:58:37 | - COL(1: i) = 14
INFO | jvm 1 | 2011/02/18 16:58:37 | - COL(2: j) = 12
INFO | jvm 1 | 2011/02/18 16:58:37 | - COL(3: v) = [B@187b287
INFO | jvm 1 | 2011/02/18 16:58:37 | 2011-02-18 16:58:37,125 ERROR 
replicator.pipeline.SingleThreadStageTask [q-to-dbms] Event application failed: 
seqno=1 fragno=0 
message=com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViol
ationException: Cannot add or update a child row: a foreign key constraint 
fails (`mats`.`test2`, CONSTRAINT `test2_ibfk_1` FOREIGN KEY (`j`) REFERENCES 
`test` (`i`))
INFO | jvm 1 | 2011/02/18 16:58:37 | 
com.continuent.tungsten.replicator.applier.ApplierException: 
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: 
Cannot add or update a child row: a foreign key constraint
 fails (`mats`.`test2`, CONSTRAINT `test2_ibfk_1` FOREIGN KEY (`j`) REFERENCES `test` (`i`))
INFO | jvm 1 | 2011/02/18 16:58:37 | at 
com.continuent.tungsten.replicator.applier.JdbcApplier.applyOneRowChangePrepared
(JdbcApplier.java:943)
INFO | jvm 1 | 2011/02/18 16:58:37 | at 
com.continuent.tungsten.replicator.applier.JdbcApplier.applyRowChangeData(JdbcAp
plier.java:1050)
INFO | jvm 1 | 2011/02/18 16:58:37 | at 
com.continuent.tungsten.replicator.applier.JdbcApplier.apply(JdbcApplier.java:11
16)
INFO | jvm 1 | 2011/02/18 16:58:37 | at 
com.continuent.tungsten.replicator.applier.ApplierWrapper.apply(ApplierWrapper.j
ava:90)
INFO | jvm 1 | 2011/02/18 16:58:37 | at 
com.continuent.tungsten.replicator.pipeline.SingleThreadStageTask.runTask(Single
ThreadStageTask.java:375)
INFO | jvm 1 | 2011/02/18 16:58:37 | at 
com.continuent.tungsten.replicator.pipeline.SingleThreadStageTask.run(SingleThre
adStageTask.java:119)
INFO | jvm 1 | 2011/02/18 16:58:37 | at java.lang.Thread.run(Thread.java:619)
INFO | jvm 1 | 2011/02/18 16:58:37 | Caused by: 
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: 
Cannot add or update a child row: a foreign key constraint fails 
(`mats`.`test2`, CONSTRAINT `test2_ibfk_1`
FOREIGN KEY (`j`) REFERENCES `test` (`i`))
INFO | jvm 1 | 2011/02/18 16:58:37 | at 
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
INFO | jvm 1 | 2011/02/18 16:58:37 | at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorI
mpl.java:39)
INFO | jvm 1 | 2011/02/18 16:58:37 | at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorA
ccessorImpl.java:27)
INFO | jvm 1 | 2011/02/18 16:58:37 | at 
java.lang.reflect.Constructor.newInstance(Constructor.java:513)
INFO | jvm 1 | 2011/02/18 16:58:37 | at 
com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
INFO | jvm 1 | 2011/02/18 16:58:37 | at 
com.mysql.jdbc.Util.getInstance(Util.java:384)
INFO | jvm 1 | 2011/02/18 16:58:37 | at 
com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1041)
INFO | jvm 1 | 2011/02/18 16:58:37 | at 
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3566)
INFO | jvm 1 | 2011/02/18 16:58:37 | at 
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3498)
INFO | jvm 1 | 2011/02/18 16:58:37 | at 
com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959)
INFO | jvm 1 | 2011/02/18 16:58:37 | at 
com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2113)
INFO | jvm 1 | 2011/02/18 16:58:37 | at 
com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2568)
INFO | jvm 1 | 2011/02/18 16:58:37 | at 
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2113)
INFO | jvm 1 | 2011/02/18 16:58:37 | at 
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2409)
INFO | jvm 1 | 2011/02/18 16:58:37 | at 
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2327)
INFO | jvm 1 | 2011/02/18 16:58:37 | at 
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2312)
INFO | jvm 1 | 2011/02/18 16:58:37 | at 
com.continuent.tungsten.replicator.applier.JdbcApplier.applyOneRowChangePrepared
(JdbcApplier.java:924)
INFO | jvm 1 | 2011/02/18 16:58:37 | ... 6 more

Original issue reported on code.google.com by berkeley...@gmail.com on 14 Apr 2011 at 9:16

GoogleCodeExporter commented 9 years ago
Migrated from http://forge.continuent.org/jira/browse/TUC-259. 

Original comment by berkeley...@gmail.com on 14 Apr 2011 at 9:17

GoogleCodeExporter commented 9 years ago

Original comment by Steph.Giron on 20 May 2011 at 2:15

GoogleCodeExporter commented 9 years ago

Original comment by berkeley...@gmail.com on 3 Jun 2011 at 5:54