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

Support optimized "/* ping */" queries as in Connector/J

Details

    • Task
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Won't Fix
    • 1.1.3
    • 1.1.8
    • Other
    • None

    Description

      Connector/J supports an optimized "/* ping */" query for validating a
      connection when you retrieve a connection out of a connection
      pool. This allows you to perform a ping operation at the mysql
      protocol layer, without having to actually execute a query like
      "select 1" (which in heavy applications may be too much
      overhead). This is also documented in a presentation that Mark
      Matthews once gave about high-performance with Connector/J, but I
      can't seem to find that presentation right now.

      This is documented in:

      http://dev.mysql.com/doc/refman/5.5/en/connector-j-usagenotes-j2ee-concepts-connection-pooling.html

      This is something that you would typically use in validationQuery
      parameter in a Tomcat DataSource, but unfortunately, they didn't put
      it like that in the Connector/J manual

      http://dev.mysql.com/doc/refman/5.5/en/connector-j-usagenotes-tomcat.html

      The attached patch implements this also in the MariaDB Java
      Client. The patch is sufficient to make this work for the data sources
      that I use:

      • JBoss 4.0.5
      • Apache Commons Database Pool (DBCP) 1.4. DBCP is also the underlying
        connection pool library in Tomcat.

      The patch does not implement this optimization for prepared
      statements, only for normal statements.

      Attachments

        Activity

          dverstap Davy Verstappen created issue -
          dverstap Davy Verstappen made changes -
          Field Original Value New Value
          Attachment 0001-Support-optimized-ping-requests.patch [ 22506 ]
          wlad Vladislav Vaintroub made changes -
          Assignee Rasmus Johansson [ ratzpo ] Vladislav Vaintroub [ wlad ]
          elenst Elena Stepanova made changes -
          Assignee Vladislav Vaintroub [ wlad ] Georg Richter [ georg ]
          ratzpo Rasmus Johansson (Inactive) made changes -
          Workflow defaullt [ 27815 ] MariaDB v2 [ 47812 ]
          ratzpo Rasmus Johansson (Inactive) made changes -
          Workflow MariaDB v2 [ 47812 ] MariaDB connectors [ 54897 ]
          ratzpo Rasmus Johansson (Inactive) made changes -
          Workflow MariaDB connectors [ 54897 ] MariaDB v3 [ 70281 ]
          diego dupin Diego Dupin made changes -
          Component/s Other [ 12201 ]
          Fix Version/s 1.1.8 [ 15700 ]
          Assignee Georg Richter [ georg ] diego dupin [ diego dupin ]
          Resolution Won't Fix [ 2 ]
          Status Open [ 1 ] Closed [ 6 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 70281 ] MariaDB v4 [ 128243 ]

          People

            diego dupin Diego Dupin
            dverstap Davy Verstappen
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.