Skip to content

Commit

Permalink
0001036: Error is not getting recorded in outgoing batch if there isn…
Browse files Browse the repository at this point in the history
…'t a line number
  • Loading branch information
chenson42 committed Feb 7, 2013
1 parent 24da7d3 commit ee0bc6c
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -97,6 +97,9 @@ public void ack(final BatchAck batch) {
outgoingBatch.setNetworkMillis(batch.getNetworkMillis());
outgoingBatch.setFilterMillis(batch.getFilterMillis());
outgoingBatch.setLoadMillis(batch.getDatabaseMillis());
outgoingBatch.setSqlCode(batch.getSqlCode());
outgoingBatch.setSqlState(batch.getSqlState());
outgoingBatch.setSqlMessage(batch.getSqlMessage());

if (!batch.isOk() && batch.getErrorLine() != 0) {
List<Number> ids = sqlTemplate.query(getSql("selectDataIdSql"),
Expand All @@ -105,9 +108,6 @@ public void ack(final BatchAck batch) {
outgoingBatch.setFailedDataId(ids.get((int) batch.getErrorLine() - 1)
.longValue());
}
outgoingBatch.setSqlCode(batch.getSqlCode());
outgoingBatch.setSqlState(batch.getSqlState());
outgoingBatch.setSqlMessage(batch.getSqlMessage());
}

if (status == Status.ER) {
Expand Down

0 comments on commit ee0bc6c

Please sign in to comment.