Connection
Date: 2016-03-08

com.mysql.jdbc

## Interface Connection

- All Superinterfaces:
    java.lang.AutoCloseable, java.sql.Connection, ConnectionProperties, java.sql.Wrapper
  All Known Subinterfaces:
    JDBC4MySQLConnection, LoadBalancedConnection, MySQLConnection
  All Known Implementing Classes:
    ConnectionImpl, JDBC4Connection, JDBC4LoadBalancedMySQLConnection, JDBC4MultiHostMySQLConnection, LoadBalancedMySQLConnection, MultiHostMySQLConnection

      public interface Connection
      extends java.sql.Connection, ConnectionProperties

  This interface contains methods that are considered the "vendor extension" to the JDBC API for MySQL's implementation of java.sql.Connection. For those looking further into the driver implementation, it is not an API that is used for plugability of implementations inside our driver (which is why there are still references to ConnectionImpl throughout the code).

- - ### Field Summary

    - ### Fields inherited from interface java.sql.Connection

      `TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `abort(java.util.concurrent.Executor executor)`
    `void` | `abortInternal()`
    `void` | `changeUser(java.lang.String userName, java.lang.String newPassword)` Changes the user on this connection by performing a re-authentication.
    `void` | `checkClosed()`
    `void` | `clearHasTriedMaster()` Deprecated.
    `java.sql.PreparedStatement` | `clientPrepareStatement(java.lang.String sql)` Prepares a statement on the client, using client-side emulation (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
    `java.sql.PreparedStatement` | `clientPrepareStatement(java.lang.String sql, int autoGenKeyIndex)` Prepares a statement on the client, using client-side emulation (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
    `java.sql.PreparedStatement` | `clientPrepareStatement(java.lang.String sql, int[] autoGenKeyIndexes)` Prepares a statement on the client, using client-side emulation (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
    `java.sql.PreparedStatement` | `clientPrepareStatement(java.lang.String sql, int resultSetType, int resultSetConcurrency)` Prepares a statement on the client, using client-side emulation (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
    `java.sql.PreparedStatement` | `clientPrepareStatement(java.lang.String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)` Prepares a statement on the client, using client-side emulation (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
    `java.sql.PreparedStatement` | `clientPrepareStatement(java.lang.String sql, java.lang.String[] autoGenKeyColNames)` Prepares a statement on the client, using client-side emulation (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
    `int` | `getActiveStatementCount()` Returns the number of statements active on this connection, which haven't been .close()d.
    `int` | `getAutoIncrementIncrement()` Returns the -session- value of 'auto_increment_increment' from the server if it exists, or '1' if not.
    `java.lang.Object` | `getConnectionMutex()`
    `java.lang.String` | `getHost()`
    `long` | `getIdleFor()` Reports how long this connection has been idle.
    `com.mysql.jdbc.log.Log` | `getLog()` Returns the log mechanism that should be used to log information from/for this Connection.
    `int` | `getNetworkTimeout()`
    `java.util.Properties` | `getProperties()` Returns the parsed and passed in properties for this connection.
    `java.lang.String` | `getSchema()`
    `java.lang.String` | `getServerCharacterEncoding()` Deprecated. replaced by `Connection.getServerCharset()`
    `java.lang.String` | `getServerCharset()` Returns the server's character set
    `java.util.TimeZone` | `getServerTimezoneTZ()` Returns the TimeZone that represents the configured timezone for the server.
    `int` | `getSessionMaxRows()`
    `java.lang.String` | `getStatementComment()` Returns the comment that will be prepended to all statements sent to the server.
    `boolean` | `hasSameProperties(Connection c)` Does this connection have the same properties as another?
    `boolean` | `hasTriedMaster()` Deprecated.
    `void` | `initializeExtension(Extension ex)`
    `boolean` | `isAbonormallyLongQuery(long millisOrNanos)`
    `boolean` | `isInGlobalTx()` Is this connection currently a participant in an XA transaction?
    `boolean` | `isMasterConnection()` Is this connection connected to the first host in the list if there is a list of servers in the URL?
    `boolean` | `isNoBackslashEscapesSet()` Is the server in a sql_mode that doesn't allow us to use \\ to escape things?
    `boolean` | `isSameResource(Connection c)` Does this connection have the same resource name as the given connection (for XA)?
    `boolean` | `isServerLocal()` Is the server this connection is connected to "local" (i.e. same host) as the application?
    `boolean` | `lowerCaseTableNames()` Is the server configured to use lower-case table names only?
    `boolean` | `parserKnowsUnicode()` Does the server this connection is connected to support unicode?
    `void` | `ping()` Detect if the connection is still good by sending a ping command to the server.
    `void` | `reportQueryTime(long millisOrNanos)`
    `void` | `resetServerState()` Resets the server-side state of this connection.
    `java.sql.PreparedStatement` | `serverPrepareStatement(java.lang.String sql)` Prepares a statement on the server (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
    `java.sql.PreparedStatement` | `serverPrepareStatement(java.lang.String sql, int autoGenKeyIndex)` Prepares a statement on the server (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
    `java.sql.PreparedStatement` | `serverPrepareStatement(java.lang.String sql, int[] autoGenKeyIndexes)` Prepares a statement on the server (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
    `java.sql.PreparedStatement` | `serverPrepareStatement(java.lang.String sql, int resultSetType, int resultSetConcurrency)` Prepares a statement on the server (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
    `java.sql.PreparedStatement` | `serverPrepareStatement(java.lang.String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)` Prepares a statement on the server (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
    `java.sql.PreparedStatement` | `serverPrepareStatement(java.lang.String sql, java.lang.String[] autoGenKeyColNames)` Prepares a statement on the server (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
    `void` | `setFailedOver(boolean flag)`
    `void` | `setInGlobalTx(boolean flag)` Set the state of being in a global (XA) transaction.
    `void` | `setNetworkTimeout(java.util.concurrent.Executor executor, int milliseconds)`
    `void` | `setPreferSlaveDuringFailover(boolean flag)` Deprecated.
    `void` | `setProxy(MySQLConnection proxy)`
    `void` | `setSchema(java.lang.String schema)`
    `void` | `setSessionMaxRows(int max)`
    `void` | `setStatementComment(java.lang.String comment)` Sets the comment that will be prepended to all statements sent to the server.
    `void` | `shutdownServer()` Used by MiniAdmin to shutdown a MySQL server
    `boolean` | `supportsIsolationLevel()` Does the server this connection is connected to support isolation levels?
    `boolean` | `supportsQuotedIdentifiers()` Does the server this connection is connected to support quoted identifiers?
    `boolean` | `supportsTransactions()` Does the server this connection is connected to support transactions?
    `boolean` | `versionMeetsMinimum(int major, int minor, int subminor)` Does the server this connection is connected to meet or exceed the given version?

    - ### Methods inherited from interface java.sql.Connection

      `clearWarnings, close, commit, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getHoldability, getMetaData, getTransactionIsolation, getTypeMap, getWarnings, isClosed, isReadOnly, isValid, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, rollback, setAutoCommit, setCatalog, setClientInfo, setClientInfo, setHoldability, setReadOnly, setSavepoint, setSavepoint, setTransactionIsolation, setTypeMap`

    - ### Methods inherited from interface java.sql.Wrapper

      `isWrapperFor, unwrap`

    - ### Methods inherited from interface com.mysql.jdbc.ConnectionProperties

      `exposeAsXml, getAllowLoadLocalInfile, getAllowMasterDownConnections, getAllowMultiQueries, getAllowNanAndInf, getAllowPublicKeyRetrieval, getAllowUrlInLocalInfile, getAlwaysSendSetIsolation, getAuthenticationPlugins, getAutoClosePStmtStreams, getAutoDeserialize, getAutoGenerateTestcaseScript, getAutoReconnectForPools, getAutoSlowLog, getBlobsAreStrings, getBlobSendChunkSize, getCacheCallableStatements, getCacheCallableStmts, getCacheDefaultTimezone, getCachePreparedStatements, getCachePrepStmts, getCacheResultSetMetadata, getCacheServerConfiguration, getCallableStatementCacheSize, getCallableStmtCacheSize, getCapitalizeTypeNames, getCharacterSetResults, getClientCertificateKeyStorePassword, getClientCertificateKeyStoreType, getClientCertificateKeyStoreUrl, getClientInfoProvider, getClobberStreamingResults, getClobCharacterEncoding, getCompensateOnDuplicateKeyUpdateCounts, getConnectionAttributes, getConnectionCollation, getConnectionLifecycleInterceptors, getConnectTimeout, getContinueBatchOnError, getCreateDatabaseIfNotExist, getDefaultAuthenticationPlugin, getDefaultFetchSize, getDetectCustomCollations, getDisabledAuthenticationPlugins, getDisconnectOnExpiredPasswords, getDontCheckOnDuplicateKeyUpdateInSQL, getDontTrackOpenResources, getDumpMetadataOnColumnNotFound, getDumpQueriesOnException, getDynamicCalendars, getElideSetAutoCommits, getEmptyStringsConvertToZero, getEmulateLocators, getEmulateUnsupportedPstmts, getEnabledSSLCipherSuites, getEnablePacketDebug, getEnableQueryTimeouts, getEncoding, getExceptionInterceptor, getExceptionInterceptors, getExplainSlowQueries, getFailOverReadOnly, getFunctionsNeverReturnBlobs, getGatherPerfMetrics, getGatherPerformanceMetrics, getGenerateSimpleParameterMetadata, getGetProceduresReturnsFunctions, getHoldResultsOpenOverStatementClose, getIgnoreNonTxTables, getIncludeInnodbStatusInDeadlockExceptions, getIncludeThreadDumpInDeadlockExceptions, getIncludeThreadNamesAsStatementComment, getInitialTimeout, getInteractiveClient, getIsInteractiveClient, getJdbcCompliantTruncation, getJdbcCompliantTruncationForReads, getLargeRowSizeThreshold, getLoadBalanceAutoCommitStatementRegex, getLoadBalanceAutoCommitStatementThreshold, getLoadBalanceBlacklistTimeout, getLoadBalanceConnectionGroup, getLoadBalanceEnableJMX, getLoadBalanceExceptionChecker, getLoadBalancePingTimeout, getLoadBalanceSQLExceptionSubclassFailover, getLoadBalanceSQLStateFailover, getLoadBalanceStrategy, getLoadBalanceValidateConnectionOnSwapServer, getLocalSocketAddress, getLocatorFetchBufferSize, getLogger, getLoggerClassName, getLogSlowQueries, getLogXaCommands, getMaintainTimeStats, getMaxAllowedPacket, getMaxQuerySizeToLog, getMaxReconnects, getMaxRows, getMetadataCacheSize, getNetTimeoutForStreamingResults, getNoAccessToProcedureBodies, getNoDatetimeStringSync, getNoTimezoneConversionForDateType, getNoTimezoneConversionForTimeType, getNullCatalogMeansCurrent, getNullNamePatternMatchesAll, getOverrideSupportsIntegrityEnhancementFacility, getPacketDebugBufferSize, getPadCharsWithSpace, getParanoid, getParseInfoCacheFactory, getPasswordCharacterEncoding, getPedantic, getPinGlobalTxToPhysicalConnection, getPopulateInsertRowWithDefaultValues, getPreparedStatementCacheSize, getPreparedStatementCacheSqlLimit, getPrepStmtCacheSize, getPrepStmtCacheSqlLimit, getProcessEscapeCodesForPrepStmts, getProfilerEventHandler, getProfileSql, getProfileSQL, getPropertiesTransform, getQueriesBeforeRetryMaster, getQueryTimeoutKillsConnection, getReadOnlyPropagatesToServer, getReconnectAtTxEnd, getRelaxAutoCommit, getReplicationEnableJMX, getReportMetricsIntervalMillis, getRequireSSL, getResourceId, getResultSetSizeThreshold, getRetainStatementAfterResultSetClose, getRetriesAllDown, getRewriteBatchedStatements, getRollbackOnPooledClose, getRoundRobinLoadBalance, getRunningCTS13, getSecondsBeforeRetryMaster, getSelfDestructOnPingMaxOperations, getSelfDestructOnPingSecondsLifetime, getServerConfigCacheFactory, getServerRSAPublicKeyFile, getServerTimezone, getSessionVariables, getSlowQueryThresholdMillis, getSlowQueryThresholdNanos, getSocketFactory, getSocketFactoryClassName, getSocketTimeout, getSocksProxyHost, getSocksProxyPort, getStatementInterceptors, getStrictFloatingPoint, getStrictUpdates, getTcpKeepAlive, getTcpNoDelay, getTcpRcvBuf, getTcpSndBuf, getTcpTrafficClass, getTinyInt1isBit, getTraceProtocol, getTransformedBitIsBoolean, getTreatUtilDateAsTimestamp, getTrustCertificateKeyStorePassword, getTrustCertificateKeyStoreType, getTrustCertificateKeyStoreUrl, getUltraDevHack, getUseAffectedRows, getUseBlobToStoreUTF8OutsideBMP, getUseColumnNamesInFindColumn, getUseCompression, getUseConfigs, getUseCursorFetch, getUseDirectRowUnpack, getUseDynamicCharsetInfo, getUseFastDateParsing, getUseFastIntParsing, getUseGmtMillisForDatetimes, getUseHostsInPrivileges, getUseInformationSchema, getUseJDBCCompliantTimezoneShift, getUseJvmCharsetConverters, getUseLegacyDatetimeCode, getUseLocalSessionState, getUseLocalTransactionState, getUseNanosForElapsedTime, getUseOldAliasMetadataBehavior, getUseOldUTF8Behavior, getUseOnlyServerErrorMessages, getUseReadAheadInput, getUseServerPreparedStmts, getUseServerPrepStmts, getUseSqlStateCodes, getUseSSL, getUseSSPSCompatibleTimezoneShift, getUseStreamLengthsInPrepStmts, getUseTimezone, getUseUltraDevWorkAround, getUseUnbufferedInput, getUseUnicode, getUseUsageAdvisor, getUtf8OutsideBmpExcludedColumnNamePattern, getUtf8OutsideBmpIncludedColumnNamePattern, getVerifyServerCertificate, getYearIsDateType, getZeroDateTimeBehavior, setAllowLoadLocalInfile, setAllowMasterDownConnections, setAllowMultiQueries, setAllowNanAndInf, setAllowPublicKeyRetrieval, setAllowUrlInLocalInfile, setAlwaysSendSetIsolation, setAuthenticationPlugins, setAutoClosePStmtStreams, setAutoDeserialize, setAutoGenerateTestcaseScript, setAutoReconnect, setAutoReconnectForConnectionPools, setAutoReconnectForPools, setAutoSlowLog, setBlobsAreStrings, setBlobSendChunkSize, setCacheCallableStatements, setCacheCallableStmts, setCacheDefaultTimezone, setCachePreparedStatements, setCachePrepStmts, setCacheResultSetMetadata, setCacheServerConfiguration, setCallableStatementCacheSize, setCallableStmtCacheSize, setCapitalizeDBMDTypes, setCapitalizeTypeNames, setCharacterEncoding, setCharacterSetResults, setClientCertificateKeyStorePassword, setClientCertificateKeyStoreType, setClientCertificateKeyStoreUrl, setClientInfoProvider, setClobberStreamingResults, setClobCharacterEncoding, setCompensateOnDuplicateKeyUpdateCounts, setConnectionCollation, setConnectionLifecycleInterceptors, setConnectTimeout, setContinueBatchOnError, setCreateDatabaseIfNotExist, setDefaultAuthenticationPlugin, setDefaultFetchSize, setDetectCustomCollations, setDetectServerPreparedStmts, setDisabledAuthenticationPlugins, setDisconnectOnExpiredPasswords, setDontCheckOnDuplicateKeyUpdateInSQL, setDontTrackOpenResources, setDumpMetadataOnColumnNotFound, setDumpQueriesOnException, setDynamicCalendars, setElideSetAutoCommits, setEmptyStringsConvertToZero, setEmulateLocators, setEmulateUnsupportedPstmts, setEnabledSSLCipherSuites, setEnablePacketDebug, setEnableQueryTimeouts, setEncoding, setExceptionInterceptors, setExplainSlowQueries, setFailOverReadOnly, setFunctionsNeverReturnBlobs, setGatherPerfMetrics, setGatherPerformanceMetrics, setGenerateSimpleParameterMetadata, setGetProceduresReturnsFunctions, setHoldResultsOpenOverStatementClose, setIgnoreNonTxTables, setIncludeInnodbStatusInDeadlockExceptions, setIncludeThreadDumpInDeadlockExceptions, setIncludeThreadNamesAsStatementComment, setInitialTimeout, setInteractiveClient, setIsInteractiveClient, setJdbcCompliantTruncation, setJdbcCompliantTruncationForReads, setLargeRowSizeThreshold, setLoadBalanceAutoCommitStatementRegex, setLoadBalanceAutoCommitStatementThreshold, setLoadBalanceBlacklistTimeout, setLoadBalanceConnectionGroup, setLoadBalanceEnableJMX, setLoadBalanceExceptionChecker, setLoadBalancePingTimeout, setLoadBalanceSQLExceptionSubclassFailover, setLoadBalanceSQLStateFailover, setLoadBalanceStrategy, setLoadBalanceValidateConnectionOnSwapServer, setLocalSocketAddress, setLocatorFetchBufferSize, setLogger, setLoggerClassName, setLogSlowQueries, setLogXaCommands, setMaintainTimeStats, setMaxQuerySizeToLog, setMaxReconnects, setMaxRows, setMetadataCacheSize, setNetTimeoutForStreamingResults, setNoAccessToProcedureBodies, setNoDatetimeStringSync, setNoTimezoneConversionForDateType, setNoTimezoneConversionForTimeType, setNullCatalogMeansCurrent, setNullNamePatternMatchesAll, setOverrideSupportsIntegrityEnhancementFacility, setPacketDebugBufferSize, setPadCharsWithSpace, setParanoid, setParseInfoCacheFactory, setPasswordCharacterEncoding, setPedantic, setPinGlobalTxToPhysicalConnection, setPopulateInsertRowWithDefaultValues, setPreparedStatementCacheSize, setPreparedStatementCacheSqlLimit, setPrepStmtCacheSize, setPrepStmtCacheSqlLimit, setProcessEscapeCodesForPrepStmts, setProfilerEventHandler, setProfileSql, setProfileSQL, setPropertiesTransform, setQueriesBeforeRetryMaster, setQueryTimeoutKillsConnection, setReadOnlyPropagatesToServer, setReconnectAtTxEnd, setRelaxAutoCommit, setReplicationEnableJMX, setReportMetricsIntervalMillis, setRequireSSL, setResourceId, setResultSetSizeThreshold, setRetainStatementAfterResultSetClose, setRetriesAllDown, setRewriteBatchedStatements, setRollbackOnPooledClose, setRoundRobinLoadBalance, setRunningCTS13, setSecondsBeforeRetryMaster, setSelfDestructOnPingMaxOperations, setSelfDestructOnPingSecondsLifetime, setServerConfigCacheFactory, setServerRSAPublicKeyFile, setServerTimezone, setSessionVariables, setSlowQueryThresholdMillis, setSlowQueryThresholdNanos, setSocketFactory, setSocketFactoryClassName, setSocketTimeout, setSocksProxyHost, setSocksProxyPort, setStatementInterceptors, setStrictFloatingPoint, setStrictUpdates, setTcpKeepAlive, setTcpNoDelay, setTcpRcvBuf, setTcpSndBuf, setTcpTrafficClass, setTinyInt1isBit, setTraceProtocol, setTransformedBitIsBoolean, setTreatUtilDateAsTimestamp, setTrustCertificateKeyStorePassword, setTrustCertificateKeyStoreType, setTrustCertificateKeyStoreUrl, setUltraDevHack, setUseAffectedRows, setUseBlobToStoreUTF8OutsideBMP, setUseColumnNamesInFindColumn, setUseCompression, setUseConfigs, setUseCursorFetch, setUseDirectRowUnpack, setUseDynamicCharsetInfo, setUseFastDateParsing, setUseFastIntParsing, setUseGmtMillisForDatetimes, setUseHostsInPrivileges, setUseInformationSchema, setUseJDBCCompliantTimezoneShift, setUseJvmCharsetConverters, setUseLegacyDatetimeCode, setUseLocalSessionState, setUseLocalTransactionState, setUseNanosForElapsedTime, setUseOldAliasMetadataBehavior, setUseOldUTF8Behavior, setUseOnlyServerErrorMessages, setUseReadAheadInput, setUseServerPreparedStmts, setUseServerPrepStmts, setUseSqlStateCodes, setUseSSL, setUseSSPSCompatibleTimezoneShift, setUseStreamLengthsInPrepStmts, setUseTimezone, setUseUltraDevWorkAround, setUseUnbufferedInput, setUseUnicode, setUseUsageAdvisor, setUtf8OutsideBmpExcludedColumnNamePattern, setUtf8OutsideBmpIncludedColumnNamePattern, setVerifyServerCertificate, setYearIsDateType, setZeroDateTimeBehavior, useUnbufferedInput`

- - ### Method Detail

    - #### changeUser

          void changeUser(java.lang.String userName,
                        java.lang.String newPassword)
                          throws java.sql.SQLException

      Changes the user on this connection by performing a re-authentication. If authentication fails, the connection will remain under the context of the current user.
      Parameters:
        `userName` - the username to authenticate with
        `newPassword` - the password to authenticate with
      Throws:
        `java.sql.SQLException` - if authentication fails, or some other error occurs while performing the command.

    - #### clearHasTriedMaster

          @Deprecated
          void clearHasTriedMaster()

      Deprecated.

    - #### clientPrepareStatement

          java.sql.PreparedStatement clientPrepareStatement(java.lang.String sql)
                                                            throws java.sql.SQLException

      Prepares a statement on the client, using client-side emulation (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
      Throws:
        `java.sql.SQLException`
      See Also:
        `Connection.prepareStatement(String)`

    - #### clientPrepareStatement

          java.sql.PreparedStatement clientPrepareStatement(java.lang.String sql,
                                                          int autoGenKeyIndex)
                                                            throws java.sql.SQLException

      Prepares a statement on the client, using client-side emulation (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
      Throws:
        `java.sql.SQLException`
      See Also:
        `Connection.prepareStatement(String, int)`

    - #### clientPrepareStatement

          java.sql.PreparedStatement clientPrepareStatement(java.lang.String sql,
                                                          int resultSetType,
                                                          int resultSetConcurrency)
                                                            throws java.sql.SQLException

      Prepares a statement on the client, using client-side emulation (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
      Throws:
        `java.sql.SQLException`
      See Also:
        `Connection.prepareStatement(String, int, int)`

    - #### clientPrepareStatement

          java.sql.PreparedStatement clientPrepareStatement(java.lang.String sql,
                                                          int[] autoGenKeyIndexes)
                                                            throws java.sql.SQLException

      Prepares a statement on the client, using client-side emulation (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
      Throws:
        `java.sql.SQLException`
      See Also:
        `Connection.prepareStatement(String, int[])`

    - #### clientPrepareStatement

          java.sql.PreparedStatement clientPrepareStatement(java.lang.String sql,
                                                          int resultSetType,
                                                          int resultSetConcurrency,
                                                          int resultSetHoldability)
                                                            throws java.sql.SQLException

      Prepares a statement on the client, using client-side emulation (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
      Throws:
        `java.sql.SQLException`
      See Also:
        `Connection.prepareStatement(String, int, int, int)`

    - #### clientPrepareStatement

          java.sql.PreparedStatement clientPrepareStatement(java.lang.String sql,
                                                          java.lang.String[] autoGenKeyColNames)
                                                            throws java.sql.SQLException

      Prepares a statement on the client, using client-side emulation (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
      Throws:
        `java.sql.SQLException`
      See Also:
        `Connection.prepareStatement(String, String[])`

    - #### getActiveStatementCount

          int getActiveStatementCount()

      Returns the number of statements active on this connection, which haven't been .close()d.

    - #### getIdleFor

          long getIdleFor()

      Reports how long this connection has been idle. This time (reported in milliseconds) is updated once a query has completed.
      Returns:
        number of ms that this connection has been idle, 0 if the driver is busy retrieving results.

    - #### getLog

          com.mysql.jdbc.log.Log getLog()
                                        throws java.sql.SQLException

      Returns the log mechanism that should be used to log information from/for this Connection.
      Returns:
        the Log instance to use for logging messages.
      Throws:
        `java.sql.SQLException` - if an error occurs

    - #### getServerCharacterEncoding

          @Deprecated
          java.lang.String getServerCharacterEncoding()

      Deprecated. replaced by `Connection.getServerCharset()`
      Returns the server's character set
      Returns:
        the server's character set.

    - #### getServerCharset

          java.lang.String getServerCharset()

      Returns the server's character set
      Returns:
        the server's character set.

    - #### getServerTimezoneTZ

          java.util.TimeZone getServerTimezoneTZ()

      Returns the TimeZone that represents the configured timezone for the server.

    - #### getStatementComment

          java.lang.String getStatementComment()

      Returns the comment that will be prepended to all statements sent to the server.
      Returns:
        the comment that will be prepended to all statements sent to the server.

    - #### hasTriedMaster

          @Deprecated
          boolean hasTriedMaster()

      Deprecated.
      Has this connection tried to execute a query on the "master" server (first host in a multiple host list).

    - #### isInGlobalTx

          boolean isInGlobalTx()

      Is this connection currently a participant in an XA transaction?

    - #### setInGlobalTx

          void setInGlobalTx(boolean flag)

      Set the state of being in a global (XA) transaction.
      Parameters:
        `flag` -

    - #### isMasterConnection

          boolean isMasterConnection()

      Is this connection connected to the first host in the list if there is a list of servers in the URL?
      Returns:
        true if this connection is connected to the first in the list.

    - #### isNoBackslashEscapesSet

          boolean isNoBackslashEscapesSet()

      Is the server in a sql_mode that doesn't allow us to use \\ to escape things?
      Returns:
        Returns the noBackslashEscapes.

    - #### isSameResource

          boolean isSameResource(Connection c)

      Does this connection have the same resource name as the given connection (for XA)?
      Parameters:
        `c` -

    - #### lowerCaseTableNames

          boolean lowerCaseTableNames()

      Is the server configured to use lower-case table names only?
      Returns:
        true if lower_case_table_names is 'on'

    - #### parserKnowsUnicode

          boolean parserKnowsUnicode()

      Does the server this connection is connected to support unicode?

    - #### ping

          void ping()
                    throws java.sql.SQLException

      Detect if the connection is still good by sending a ping command to the server.
      Throws:
        `java.sql.SQLException` - if the ping fails

    - #### resetServerState

          void resetServerState()
                                throws java.sql.SQLException

      Resets the server-side state of this connection. Doesn't work for MySQL versions older than 4.0.6 or if isParanoid() is set (it will become a no-op in these cases). Usually only used from connection pooling code.
      Throws:
        `java.sql.SQLException` - if the operation fails while resetting server state.

    - #### serverPrepareStatement

          java.sql.PreparedStatement serverPrepareStatement(java.lang.String sql)
                                                            throws java.sql.SQLException

      Prepares a statement on the server (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
      Throws:
        `java.sql.SQLException`
      See Also:
        `Connection.prepareStatement(String)`

    - #### serverPrepareStatement

          java.sql.PreparedStatement serverPrepareStatement(java.lang.String sql,
                                                          int autoGenKeyIndex)
                                                            throws java.sql.SQLException

      Prepares a statement on the server (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
      Throws:
        `java.sql.SQLException`
      See Also:
        `Connection.prepareStatement(String, int)`

    - #### serverPrepareStatement

          java.sql.PreparedStatement serverPrepareStatement(java.lang.String sql,
                                                          int resultSetType,
                                                          int resultSetConcurrency)
                                                            throws java.sql.SQLException

      Prepares a statement on the server (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
      Throws:
        `java.sql.SQLException`
      See Also:
        `Connection.prepareStatement(String, int, int)`

    - #### serverPrepareStatement

          java.sql.PreparedStatement serverPrepareStatement(java.lang.String sql,
                                                          int resultSetType,
                                                          int resultSetConcurrency,
                                                          int resultSetHoldability)
                                                            throws java.sql.SQLException

      Prepares a statement on the server (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
      Throws:
        `java.sql.SQLException`
      See Also:
        `Connection.prepareStatement(String, int, int, int)`

    - #### serverPrepareStatement

          java.sql.PreparedStatement serverPrepareStatement(java.lang.String sql,
                                                          int[] autoGenKeyIndexes)
                                                            throws java.sql.SQLException

      Prepares a statement on the server (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
      Throws:
        `java.sql.SQLException`
      See Also:
        `Connection.prepareStatement(String, int[])`

    - #### serverPrepareStatement

          java.sql.PreparedStatement serverPrepareStatement(java.lang.String sql,
                                                          java.lang.String[] autoGenKeyColNames)
                                                            throws java.sql.SQLException

      Prepares a statement on the server (irregardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.
      Throws:
        `java.sql.SQLException`
      See Also:
        `Connection.prepareStatement(String, String[])`

    - #### setFailedOver

          void setFailedOver(boolean flag)

      Parameters:
        `failedOver` - The failedOver to set.

    - #### setPreferSlaveDuringFailover

          @Deprecated
          void setPreferSlaveDuringFailover(boolean flag)

      Deprecated.
      Parameters:
        `preferSlaveDuringFailover` - The preferSlaveDuringFailover to set.

    - #### setStatementComment

          void setStatementComment(java.lang.String comment)

      Sets the comment that will be prepended to all statements sent to the server. Do not use slash-star or star-slash tokens in the comment as these will be added by the driver itself.
      Parameters:
        `comment` - the comment that will be prepended to all statements sent to the server.

    - #### shutdownServer

          void shutdownServer()
                              throws java.sql.SQLException

      Used by MiniAdmin to shutdown a MySQL server
      Throws:
        `java.sql.SQLException` - if the command can not be issued.

    - #### supportsIsolationLevel

          boolean supportsIsolationLevel()

      Does the server this connection is connected to support isolation levels?

    - #### supportsQuotedIdentifiers

          boolean supportsQuotedIdentifiers()

      Does the server this connection is connected to support quoted identifiers?

    - #### supportsTransactions

          boolean supportsTransactions()

      Does the server this connection is connected to support transactions?

    - #### versionMeetsMinimum

          boolean versionMeetsMinimum(int major,
                                    int minor,
                                    int subminor)
                                      throws java.sql.SQLException

      Does the server this connection is connected to meet or exceed the given version?
      Throws:
        `java.sql.SQLException`

    - #### reportQueryTime

          void reportQueryTime(long millisOrNanos)

    - #### isAbonormallyLongQuery

          boolean isAbonormallyLongQuery(long millisOrNanos)

    - #### initializeExtension

          void initializeExtension(Extension ex)
                                   throws java.sql.SQLException

      Throws:
        `java.sql.SQLException`

    - #### getAutoIncrementIncrement

          int getAutoIncrementIncrement()

      Returns the -session- value of 'auto_increment_increment' from the server if it exists, or '1' if not.

    - #### hasSameProperties

          boolean hasSameProperties(Connection c)

      Does this connection have the same properties as another?

    - #### getProperties

          java.util.Properties getProperties()

      Returns the parsed and passed in properties for this connection.

    - #### getHost

          java.lang.String getHost()

    - #### setProxy

          void setProxy(MySQLConnection proxy)

    - #### isServerLocal

          boolean isServerLocal()
                                throws java.sql.SQLException

      Is the server this connection is connected to "local" (i.e. same host) as the application?
      Throws:
        `java.sql.SQLException`

    - #### getSessionMaxRows

          int getSessionMaxRows()

    - #### setSessionMaxRows

          void setSessionMaxRows(int max)
                                 throws java.sql.SQLException

      Throws:
        `java.sql.SQLException`

    - #### setSchema

          void setSchema(java.lang.String schema)
                         throws java.sql.SQLException

      Specified by:
        `setSchema` in interface `java.sql.Connection`
      Throws:
        `java.sql.SQLException`

    - #### getSchema

          java.lang.String getSchema()
                                     throws java.sql.SQLException

      Specified by:
        `getSchema` in interface `java.sql.Connection`
      Throws:
        `java.sql.SQLException`

    - #### abort

          void abort(java.util.concurrent.Executor executor)
                     throws java.sql.SQLException

      Specified by:
        `abort` in interface `java.sql.Connection`
      Throws:
        `java.sql.SQLException`

    - #### setNetworkTimeout

          void setNetworkTimeout(java.util.concurrent.Executor executor,
                               int milliseconds)
                                 throws java.sql.SQLException

      Specified by:
        `setNetworkTimeout` in interface `java.sql.Connection`
      Throws:
        `java.sql.SQLException`

    - #### getNetworkTimeout

          int getNetworkTimeout()
                                throws java.sql.SQLException

      Specified by:
        `getNetworkTimeout` in interface `java.sql.Connection`
      Throws:
        `java.sql.SQLException`

    - #### abortInternal

          void abortInternal()
                             throws java.sql.SQLException

      Throws:
        `java.sql.SQLException`

    - #### checkClosed

          void checkClosed()
                           throws java.sql.SQLException

      Throws:
        `java.sql.SQLException`

    - #### getConnectionMutex

          java.lang.Object getConnectionMutex()