diff --git a/extensions/reactive-mysql-client/runtime/src/main/java/io/quarkus/reactive/mysql/client/runtime/DataSourceReactiveMySQLConfig.java b/extensions/reactive-mysql-client/runtime/src/main/java/io/quarkus/reactive/mysql/client/runtime/DataSourceReactiveMySQLConfig.java index b950e3d1a00075..e887b4930992df 100644 --- a/extensions/reactive-mysql-client/runtime/src/main/java/io/quarkus/reactive/mysql/client/runtime/DataSourceReactiveMySQLConfig.java +++ b/extensions/reactive-mysql-client/runtime/src/main/java/io/quarkus/reactive/mysql/client/runtime/DataSourceReactiveMySQLConfig.java @@ -53,4 +53,18 @@ public class DataSourceReactiveMySQLConfig { */ @ConfigItem(defaultValueDocumentation = "default") public Optional authenticationPlugin = Optional.empty(); + + /** + * The maximum number of inflight database commands that can be pipelined. + * By default, pipelining is disabled. + */ + @ConfigItem + public OptionalInt pipeliningLimit = OptionalInt.empty(); + + /** + * Whether to return the number of rows matched by the WHERE clause in UPDATE statements, instead of the + * number of rows actually changed. + */ + @ConfigItem(defaultValueDocumentation = "false") + public Optional useAffectedRows = Optional.empty(); } diff --git a/extensions/reactive-mysql-client/runtime/src/main/java/io/quarkus/reactive/mysql/client/runtime/MySQLPoolRecorder.java b/extensions/reactive-mysql-client/runtime/src/main/java/io/quarkus/reactive/mysql/client/runtime/MySQLPoolRecorder.java index 11921d864bfc4a..e9662b066db8d5 100644 --- a/extensions/reactive-mysql-client/runtime/src/main/java/io/quarkus/reactive/mysql/client/runtime/MySQLPoolRecorder.java +++ b/extensions/reactive-mysql-client/runtime/src/main/java/io/quarkus/reactive/mysql/client/runtime/MySQLPoolRecorder.java @@ -173,6 +173,14 @@ private MySQLConnectOptions toMySQLConnectOptions(DataSourceRuntimeConfig dataSo mysqlConnectOptions.setCollation(dataSourceReactiveMySQLConfig.collation.get()); } + if (dataSourceReactiveMySQLConfig.pipeliningLimit.isPresent()) { + mysqlConnectOptions.setPipeliningLimit(dataSourceReactiveMySQLConfig.pipeliningLimit.getAsInt()); + } + + if (dataSourceReactiveMySQLConfig.useAffectedRows.isPresent()) { + mysqlConnectOptions.setUseAffectedRows(dataSourceReactiveMySQLConfig.useAffectedRows.get()); + } + if (dataSourceReactiveMySQLConfig.sslMode.isPresent()) { final SslMode sslMode = dataSourceReactiveMySQLConfig.sslMode.get(); mysqlConnectOptions.setSslMode(sslMode);