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

[PATCH] minimize connection overhead

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • None
    • 1.1.8
    • 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.

      Attachments

        1. diff.diff
          3 kB
          Vladislav Vaintroub

        Activity

          People

            georg Georg Richter
            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.