Skip to content

Commit d884ecb

Browse files
committed
fix innodb timeout to seconds
issue #367
1 parent 41a3d9e commit d884ecb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

r2dbc-mysql/src/main/java/JasyncClientConnection.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class JasyncClientConnection(
5050
.map { this.isolationLevel = isolationLevel ; it }
5151
}
5252
definition.getAttribute(TransactionDefinition.LOCK_WAIT_TIMEOUT)?.let { timeout ->
53-
future = future.flatMap { jasyncConnection.sendQuery("SET innodb_lock_wait_timeout=$timeout") }
53+
future = future.flatMap { jasyncConnection.sendQuery("SET innodb_lock_wait_timeout=${timeout.toSeconds()}") }
5454
}
5555
future = future.flatMap { jasyncConnection.sendQuery("SET AUTOCOMMIT = 0") }
5656
future.toMono().then()
@@ -70,7 +70,7 @@ class JasyncClientConnection(
7070
}
7171

7272
override fun setLockWaitTimeout(timeout: Duration): Publisher<Void> {
73-
return executeVoid("SET innodb_lock_wait_timeout=$timeout")
73+
return executeVoid("SET innodb_lock_wait_timeout=${timeout.toSeconds()}")
7474
}
7575

7676
override fun setStatementTimeout(timeout: Duration): Publisher<Void> {

0 commit comments

Comments
 (0)