Skip to content

Commit 2239dc7

Browse files
hyejinggufmbenhassine
authored andcommitted
Fix column types in JdbcStepExecutionDao
Resolves #4648
1 parent 896b8d6 commit 2239dc7

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JdbcStepExecutionDao.java

+11-12
Original file line numberDiff line numberDiff line change
@@ -281,10 +281,9 @@ public void updateStepExecution(StepExecution stepExecution) {
281281
stepExecution.getWriteSkipCount(), stepExecution.getRollbackCount(), lastUpdated,
282282
stepExecution.getId(), stepExecution.getVersion() };
283283
int count = getJdbcTemplate().update(getQuery(UPDATE_STEP_EXECUTION), parameters,
284-
new int[] { Types.TIMESTAMP, Types.TIMESTAMP, Types.VARCHAR, Types.INTEGER, Types.INTEGER,
285-
Types.INTEGER, Types.INTEGER, Types.VARCHAR, Types.VARCHAR, Types.INTEGER, Types.INTEGER,
286-
Types.INTEGER, Types.INTEGER, Types.INTEGER, Types.TIMESTAMP, Types.BIGINT,
287-
Types.INTEGER });
284+
new int[] { Types.TIMESTAMP, Types.TIMESTAMP, Types.VARCHAR, Types.BIGINT, Types.BIGINT,
285+
Types.BIGINT, Types.BIGINT, Types.VARCHAR, Types.VARCHAR, Types.INTEGER, Types.BIGINT,
286+
Types.BIGINT, Types.BIGINT, Types.BIGINT, Types.TIMESTAMP, Types.BIGINT, Types.INTEGER });
288287

289288
// Avoid concurrent modifications...
290289
if (count == 0) {
@@ -395,15 +394,15 @@ public StepExecution mapRow(ResultSet rs, int rowNum) throws SQLException {
395394
stepExecution.setStartTime(rs.getTimestamp(3) == null ? null : rs.getTimestamp(3).toLocalDateTime());
396395
stepExecution.setEndTime(rs.getTimestamp(4) == null ? null : rs.getTimestamp(4).toLocalDateTime());
397396
stepExecution.setStatus(BatchStatus.valueOf(rs.getString(5)));
398-
stepExecution.setCommitCount(rs.getInt(6));
399-
stepExecution.setReadCount(rs.getInt(7));
400-
stepExecution.setFilterCount(rs.getInt(8));
401-
stepExecution.setWriteCount(rs.getInt(9));
397+
stepExecution.setCommitCount(rs.getLong(6));
398+
stepExecution.setReadCount(rs.getLong(7));
399+
stepExecution.setFilterCount(rs.getLong(8));
400+
stepExecution.setWriteCount(rs.getLong(9));
402401
stepExecution.setExitStatus(new ExitStatus(rs.getString(10), rs.getString(11)));
403-
stepExecution.setReadSkipCount(rs.getInt(12));
404-
stepExecution.setWriteSkipCount(rs.getInt(13));
405-
stepExecution.setProcessSkipCount(rs.getInt(14));
406-
stepExecution.setRollbackCount(rs.getInt(15));
402+
stepExecution.setReadSkipCount(rs.getLong(12));
403+
stepExecution.setWriteSkipCount(rs.getLong(13));
404+
stepExecution.setProcessSkipCount(rs.getLong(14));
405+
stepExecution.setRollbackCount(rs.getLong(15));
407406
stepExecution.setLastUpdated(rs.getTimestamp(16) == null ? null : rs.getTimestamp(16).toLocalDateTime());
408407
stepExecution.setVersion(rs.getInt(17));
409408
stepExecution.setCreateTime(rs.getTimestamp(18) == null ? null : rs.getTimestamp(18).toLocalDateTime());

0 commit comments

Comments
 (0)