-
Notifications
You must be signed in to change notification settings - Fork 608
Closed
Labels
Milestone
Description
Hi!
In com.clickhouse.jdbc.internal.ClickHouseStatementImpl#updateResult
:
...
// FIXME apparently this is not always true
if (currentUpdateCount <= 0L) {
currentUpdateCount = 1L;
}
...
Yes, this isn’t always true :)
Examples:
Statement statement = connection.createStatement();
statement.execute(sql);
int updateCount = statement.getUpdateCount();
-
String sql = “CREATE TABLE new_table(x INT) engine = Memory;”
ExpectedupdateCount
: 0
ActualupdateCount
: 1 -
String sql = "INSERT INTO new_table VALUES (1), (2), (3);"
ExpectedupdateCount
: 3
ActualupdateCount
: 1