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

MySQLConnection class does not implement all JDBC4 methods and silently discards/ignores calls to them

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.1.5
    • Fix Version/s: 1.1.6
    • Component/s: None
    • Labels:
      None
    • Environment:
      JDK 1.7

      Description

      Hi,

      jdbc4 got the new "abort" method on a connection (the mysql jdbc driver from oracle does implement this) and i am using this in case i need to forcefully close the connection.

      Tried this with MariaDB driver and all seems fine - no exception, but the connection did leak - so i wonder.
      Looking at the source is see this:

      	public void abort(Executor arg0) throws SQLException {
      		// TODO Auto-generated method stub
      		
      	}
       
      	public int getNetworkTimeout() throws SQLException {
      		// TODO Auto-generated method stub
      		return 0;
      	}
       
      	public String getSchema() throws SQLException {
      		// TODO Auto-generated method stub
      		return null;
      	}
       
      	public void setNetworkTimeout(Executor arg0, int arg1) throws SQLException {
      		// TODO Auto-generated method stub
      		
      	}
       
      	public void setSchema(String arg0) throws SQLException {
      		// TODO Auto-generated method stub
      		
      	}

      Please - just throw an UnsupportedOperationException or a SQLException telling the user that you did not implemented this yet, but silently discard this call, leaving the caller with the wrong assumption that the operation did succeed, is imho not the way it should be.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              georg Georg Richter
              Reporter:
              tkrah Torsten Krah
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.