Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-101

[PATCH] minimize connection overhead

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1.8
    • Component/s: None
    • Labels:
      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.

        Attachments

          Activity

            People

            Assignee:
            georg Georg Richter
            Reporter:
            wlad Vladislav Vaintroub
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.