Skip to content

Commit 76c6634

Browse files
committed
Do not reset row index on error
1 parent 2a582a8 commit 76c6634

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/main/java/org/duckdb/DuckDBAppender.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,10 @@ public long flush() throws SQLException {
220220
throw new SQLException(createErrMsg(e.getMessage()), e);
221221
}
222222

223-
return rowIdx;
224-
} finally {
223+
long ret = rowIdx;
225224
rowIdx = 0;
225+
return ret;
226+
} finally {
226227
appenderRefLock.unlock();
227228
}
228229
}

0 commit comments

Comments
 (0)