Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
Recently, MySQL at Facebook (Harrison F) have analyzed the overhead of the JDBC connection creation, also for MariaDB JDBC (https://www.facebook.com/notes/mysql-at-facebook/jdbc-connection-overheads/10152027251270933 ) He found that this driver issues 3 calls upon. One of them ("USE test") was fixed recently in CONJ-93. Attached patch eliminated the remaining two
1. The extra "set autocommit" is a bug (typo), it should be issued if
ServerStatus.AUTOCOMMIT is not set, but due to the typo was issued
when autocommit was already set.
(Note though, that there is currently a server bug http://bugs.mysql.com/bug.php?id=66884 about this flag incorrectly set if global value of autocommit=0. This should be not a big problem, I think)
2. It it not necessary to retrieve sql_mode just to check whether NO_BACKSLASH_ESCAPES is set, there is a corresponding flag in the OK/EOF packets.
So this patch also removed the need in fastConnect option, because currently it will be fast in any case.