[CONJ-913] Avoid executing additional command on connection Created: 2022-01-05  Updated: 2022-01-07  Resolved: 2022-01-07

Status: Closed
Project: MariaDB Connector/J
Component/s: performance
Affects Version/s: None
Fix Version/s: 3.0.3

Type: Task Priority: Major
Reporter: Diego Dupin Assignee: Diego Dupin
Resolution: Fixed Votes: 0
Labels: None


 Description   

Java driver execute different command after creating connection.
driver force autocommit to true, sql_mode to set STRICT_TRANS_TABLES for example. Autocommit and STRICT_TRANS_TABLES are required by JDBC, but correspond to the default value of mariadb since a very long time. A better approch is to avoid sending those session value if autocommit option is not explicitly set by option, permitting having faster connection.

Same for another command "SELECT @@max_allowed_packet, @@wait_timeout".
Wait_timeout use is for internal pool only (and so must be issued only when using pool).
max_allowed_packet can be pass as option if needed.
default max_allowed_packet is 16M, en rarelly decrease. Bulk command implementation split command by 16M packet max when possible ( if a group of parameter size is more than 16M, it will be send in one specific command). So current implementation could avoid requesting this value


Generated at Thu Feb 08 03:19:14 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.