From 14eaa5a7781f07762e8e6bd034f496e0499c4d1c Mon Sep 17 00:00:00 2001 From: "andrey.tarashevskiy" Date: Wed, 18 Jul 2018 15:29:36 +0300 Subject: [PATCH] Fix for Mysql rewriteBatchedStatements parameter --- .../org/jetbrains/exposed/sql/statements/InsertStatement.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/org/jetbrains/exposed/sql/statements/InsertStatement.kt b/src/main/kotlin/org/jetbrains/exposed/sql/statements/InsertStatement.kt index 2a35938de9..a26b2d5f13 100644 --- a/src/main/kotlin/org/jetbrains/exposed/sql/statements/InsertStatement.kt +++ b/src/main/kotlin/org/jetbrains/exposed/sql/statements/InsertStatement.kt @@ -83,7 +83,7 @@ open class InsertStatement(val table: Table, val isIgnore: Boolean = fa } protected open fun PreparedStatement.execInsertFunction() : Pair { - val inserted = if (arguments().count() > 1 || isAlwaysBatch) executeBatch().sum() else executeUpdate() + val inserted = if (arguments().count() > 1 || isAlwaysBatch) executeBatch().count() else executeUpdate() val rs = if (autoIncColumns.isNotEmpty()) { generatedKeys } else null return inserted to rs }