public class ConnectionImpl extends ConnectionPropertiesImpl implements MySQLConnection
A Connection's database is able to provide information describing its tables, its supported SQL grammar, its stored procedures, the capabilities of this connection, etc. This information is obtained with the getMetaData method.
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
ConnectionImpl.CompoundCacheKey
Used as a key for caching callable statements which (may) depend on
current catalog...In 5.0.x, they don't (currently), but stored procedure
names soon will, so current catalog is a (hidden) component of the name.
|
(package private) class |
ConnectionImpl.ExceptionInterceptorChain |
ConnectionPropertiesImpl.BooleanConnectionProperty, ConnectionPropertiesImpl.ConnectionProperty, ConnectionPropertiesImpl.IntegerConnectionProperty, ConnectionPropertiesImpl.LongConnectionProperty, ConnectionPropertiesImpl.MemorySizeConnectionProperty, ConnectionPropertiesImpl.StringConnectionProperty, ConnectionPropertiesImpl.XmlMap| Modifier and Type | Field and Description |
|---|---|
static java.util.Map<?,?> |
charsetMap
The mapping between MySQL charset names and Java charset names.
|
protected static java.lang.String |
DEFAULT_LOGGER_CLASS
Default logger class name
|
java.util.Map<java.lang.Integer,java.lang.String> |
indexToCustomMysqlCharset |
java.util.Map<java.lang.Integer,java.lang.String> |
indexToMysqlCharset
We need this 'bootstrapped', because 4.1 and newer will send fields back
with this even before we fill this dynamically from the server.
|
static java.lang.String |
JDBC_LOCAL_CHARACTER_SET_RESULTS |
protected java.util.Properties |
props
Properties for this connection specified by user
|
protected com.mysql.jdbc.util.LRUCache |
resultSetMetadataCache
Cache of ResultSet metadata
|
protected static java.util.Map<?,?> |
roundRobinStatsMap |
characterEncodingIsAliasForSjis, largeRowSizeThreshold, traceProtocol, ZERO_DATETIME_BEHAVIOR_CONVERT_TO_NULL, ZERO_DATETIME_BEHAVIOR_EXCEPTION, ZERO_DATETIME_BEHAVIOR_ROUND| Modifier | Constructor and Description |
|---|---|
protected |
ConnectionImpl()
'
For the delegate only
|
|
ConnectionImpl(java.lang.String hostToConnectTo,
int portToConnectTo,
java.util.Properties info,
java.lang.String databaseToConnectTo,
java.lang.String url)
Creates a connection to a MySQL Server.
|
| Modifier and Type | Method and Description |
|---|---|
void |
abort(java.util.concurrent.Executor executor)
Terminates an open connection.
|
void |
abortInternal()
Clobbers the physical network connection and marks
this connection as closed.
|
protected static java.sql.SQLException |
appendMessageToException(java.sql.SQLException sqlEx,
java.lang.String messageToAppend,
ExceptionInterceptor interceptor) |
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() |
void |
clearWarnings()
After this call, getWarnings returns null until a new warning is reported
for this connection.
|
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,
boolean processEscapeCodesIfNeeded) |
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.
|
void |
close()
In some cases, it is desirable to immediately release a Connection's
database and JDBC resources instead of waiting for them to be
automatically released (cant think why off the top of my head) Note:
A Connection is automatically closed when it is garbage collected.
|
void |
commit()
The method commit() makes all changes made since the previous
commit/rollback permanent and releases any database locks currently held
by the Connection.
|
void |
createNewIO(boolean isForReconnect)
Creates an IO channel to the server
|
java.sql.Statement |
createStatement()
SQL statements without parameters are normally executed using Statement
objects.
|
java.sql.Statement |
createStatement(int resultSetType,
int resultSetConcurrency)
JDBC 2.0 Same as createStatement() above, but allows the default result
set type and result set concurrency type to be overridden.
|
java.sql.Statement |
createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
void |
decachePreparedStatement(ServerPreparedStatement pstmt) |
void |
dumpTestcaseQuery(java.lang.String query) |
Connection |
duplicate() |
ResultSetInternalMethods |
execSQL(StatementImpl callingStatement,
java.lang.String sql,
int maxRows,
Buffer packet,
int resultSetType,
int resultSetConcurrency,
boolean streamResults,
java.lang.String catalog,
Field[] cachedMetadata)
Send a query to the server.
|
ResultSetInternalMethods |
execSQL(StatementImpl callingStatement,
java.lang.String sql,
int maxRows,
Buffer packet,
int resultSetType,
int resultSetConcurrency,
boolean streamResults,
java.lang.String catalog,
Field[] cachedMetadata,
boolean isBatch) |
java.lang.String |
extractSqlFromPacket(java.lang.String possibleSqlQuery,
Buffer queryPacket,
int endOfQueryPacketPosition) |
java.lang.StringBuilder |
generateConnectionCommentBlock(java.lang.StringBuilder buf) |
int |
getActiveStatementCount()
Returns the number of statements active on this connection, which
haven't been .close()d.
|
boolean |
getAutoCommit()
Gets the current auto-commit state
|
int |
getAutoIncrementIncrement()
Returns the -session- value of 'auto_increment_increment' from the server if it exists,
or '1' if not.
|
CachedResultSetMetaData |
getCachedMetaData(java.lang.String sql)
Returns cached metadata (or null if not cached) for the given query,
which must match _exactly_.
|
java.util.Calendar |
getCalendarInstanceForSessionOrNew()
Optimization to only use one calendar per-session, or calculate it for
each call, depending on user configuration
|
java.util.Timer |
getCancelTimer() |
java.lang.String |
getCatalog()
Return the connections current catalog name, or null if no catalog name
is set, or we dont support catalogs.
|
java.lang.String |
getCharacterSetMetadata() |
SingleByteCharsetConverter |
getCharsetConverter(java.lang.String javaEncodingName)
Returns the locally mapped instance of a charset converter (to avoid
overhead of static synchronization).
|
java.lang.String |
getCharsetNameForIndex(int charsetIndex)
Deprecated.
replaced by
getEncodingForIndex(int charsetIndex) |
java.lang.Object |
getConnectionMutex() |
java.util.TimeZone |
getDefaultTimeZone() |
java.lang.String |
getEncodingForIndex(int charsetIndex)
Returns the Java character encoding name for the given MySQL server
charset index
|
java.lang.String |
getErrorMessageEncoding() |
ExceptionInterceptor |
getExceptionInterceptor() |
int |
getHoldability() |
java.lang.String |
getHost() |
long |
getId() |
long |
getIdleFor()
NOT JDBC-Compliant, but clients can use this method to determine how long
this connection has been idle.
|
protected static Connection |
getInstance(java.lang.String hostToConnectTo,
int portToConnectTo,
java.util.Properties info,
java.lang.String databaseToConnectTo,
java.lang.String url)
Creates a connection instance -- We need to provide factory-style methods
so we can support both JDBC3 (and older) and JDBC4 runtimes, otherwise
the class verifier complains when it tries to load JDBC4-only interface
classes that are present in JDBC4 method signatures.
|
MysqlIO |
getIO()
Returns the IO channel to the server
|
MySQLConnection |
getLoadBalanceSafeProxy() |
com.mysql.jdbc.log.Log |
getLog()
Returns the log mechanism that should be used to log information from/for
this Connection.
|
int |
getMaxBytesPerChar(java.lang.Integer charsetIndex,
java.lang.String javaCharsetName) |
int |
getMaxBytesPerChar(java.lang.String javaCharsetName) |
java.sql.DatabaseMetaData |
getMetaData()
A connection's database is able to provide information describing its
tables, its supported SQL grammar, its stored procedures, the
capabilities of this connection, etc.
|
java.sql.Statement |
getMetadataSafeStatement() |
MySQLConnection |
getMultiHostSafeProxy() |
int |
getNetBufferLength()
Returns the packet buffer size the MySQL server reported upon connection
|
int |
getNetworkTimeout() |
protected static int |
getNextRoundRobinHostIndex(java.lang.String url,
java.util.List<?> hostList) |
com.mysql.jdbc.profiler.ProfilerEventHandler |
getProfilerEventHandlerInstance() |
java.util.Properties |
getProperties()
Returns the parsed and passed in properties for this connection.
|
boolean |
getRequiresEscapingEncoder() |
java.lang.String |
getSchema() |
java.lang.String |
getServerCharacterEncoding()
Deprecated.
replaced by
getServerCharset() |
java.lang.String |
getServerCharset()
Returns the server's character set
|
int |
getServerMajorVersion() |
int |
getServerMinorVersion() |
int |
getServerSubMinorVersion() |
java.util.TimeZone |
getServerTimezoneTZ()
Returns the TimeZone that represents the configured
timezone for the server.
|
java.lang.String |
getServerVariable(java.lang.String variableName) |
java.lang.String |
getServerVersion() |
java.util.Calendar |
getSessionLockedCalendar() |
int |
getSessionMaxRows()
Returns the sql select limit max-rows for this session.
|
java.lang.String |
getStatementComment()
Returns the comment that will be prepended to all statements
sent to the server.
|
java.util.List<StatementInterceptorV2> |
getStatementInterceptorsInstances() |
int |
getTransactionIsolation()
Get this Connection's current transaction isolation mode.
|
java.util.Map<java.lang.String,java.lang.Class<?>> |
getTypeMap()
JDBC 2.0 Get the type-map object associated with this connection.
|
java.lang.String |
getURL() |
java.lang.String |
getUser() |
java.util.Calendar |
getUtcCalendar() |
java.sql.SQLWarning |
getWarnings()
The first warning reported by calls on this Connection is returned.
|
boolean |
hasSameProperties(Connection c)
Does this connection have the same properties as another?
|
boolean |
hasTriedMaster()
Has this connection tried to execute a query on the "master"
server (first host in a multiple host list).
|
void |
incrementNumberOfPreparedExecutes() |
void |
incrementNumberOfPrepares() |
void |
incrementNumberOfResultSetsCreated() |
void |
initializeExtension(Extension ex) |
void |
initializeResultsMetadataFromCache(java.lang.String sql,
CachedResultSetMetaData cachedMetaData,
ResultSetInternalMethods resultSet)
Caches CachedResultSetMetaData that has been placed in the cache using
the given SQL as a key.
|
void |
initializeSafeStatementInterceptors() |
boolean |
isAbonormallyLongQuery(long millisOrNanos) |
boolean |
isClientTzUTC() |
boolean |
isClosed() |
boolean |
isCursorFetchEnabled() |
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 |
isProxySet() |
boolean |
isReadInfoMsgEnabled() |
boolean |
isReadOnly()
Tests to see if the connection is in Read Only Mode.
|
boolean |
isReadOnly(boolean useSessionStatus)
Tests to see if the connection is in Read Only Mode.
|
boolean |
isRunningOnJDK13() |
boolean |
isSameResource(Connection otherConnection)
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 |
isServerTzUTC() |
boolean |
lowerCaseTableNames()
Is the server configured to use lower-case table names only?
|
java.lang.String |
nativeSQL(java.lang.String sql)
A driver may convert the JDBC sql grammar into its system's native SQL
grammar prior to sending it; nativeSQL returns the native form of the
statement that the driver would have sent.
|
boolean |
parserKnowsUnicode()
Does the server this connection is connected to
support unicode?
|
void |
ping()
Detect if the connection is still good
|
void |
pingInternal(boolean checkForClosedConnection,
int timeoutMillis) |
java.sql.CallableStatement |
prepareCall(java.lang.String sql) |
java.sql.CallableStatement |
prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
JDBC 2.0 Same as prepareCall() above, but allows the default result set
type and result set concurrency type to be overridden.
|
java.sql.CallableStatement |
prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql)
A SQL statement with or without IN parameters can be pre-compiled and
stored in a PreparedStatement object.
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int autoGenKeyIndex) |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int[] autoGenKeyIndexes) |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
JDBC 2.0 Same as prepareStatement() above, but allows the default result
set type and result set concurrency type to be overridden.
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
java.lang.String[] autoGenKeyColNames) |
void |
realClose(boolean calledExplicitly,
boolean issueRollback,
boolean skipLocalTeardown,
java.lang.Throwable reason)
Closes connection and frees resources.
|
void |
recachePreparedStatement(ServerPreparedStatement pstmt) |
void |
registerQueryExecutionTime(long queryTimeMs) |
void |
registerStatement(Statement stmt)
Register a Statement instance as open.
|
void |
releaseSavepoint(java.sql.Savepoint arg0) |
protected void |
reportMetricsIfNeeded()
Reports currently collected metrics if this feature is enabled and the
timeout has passed.
|
void |
reportNumberOfTablesAccessed(int numTablesAccessed) |
void |
reportQueryTime(long millisOrNanos) |
void |
resetServerState()
Resets the server-side state of this connection.
|
void |
rollback()
The method rollback() drops all changes made since the previous
commit/rollback and releases any database locks currently held by the
Connection.
|
void |
rollback(java.sql.Savepoint savepoint) |
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.
|
boolean |
serverSupportsConvertFn() |
void |
setAutoCommit(boolean autoCommitFlag)
If a connection is in auto-commit mode, than all its SQL statements will
be executed and committed as individual transactions.
|
void |
setCatalog(java.lang.String catalog)
A sub-space of this Connection's database may be selected by setting a
catalog name.
|
void |
setFailedOver(boolean flag) |
void |
setHoldability(int arg0) |
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) |
void |
setProfilerEventHandlerInstance(com.mysql.jdbc.profiler.ProfilerEventHandler h) |
void |
setProxy(MySQLConnection proxy) |
void |
setReadInfoMsgEnabled(boolean flag) |
void |
setReadOnly(boolean readOnlyFlag)
You can put a connection in read-only mode as a hint to enable database
optimizations Note: setReadOnly cannot be called while in the
middle of a transaction
|
void |
setReadOnlyInternal(boolean readOnlyFlag) |
void |
setRealProxy(java.lang.reflect.InvocationHandler proxy) |
java.sql.Savepoint |
setSavepoint() |
java.sql.Savepoint |
setSavepoint(java.lang.String name) |
void |
setSchema(java.lang.String schema) |
void |
setSessionMaxRows(int max)
Sets the sql select limit max-rows for this session if different from current.
|
void |
setStatementComment(java.lang.String comment)
Sets the comment that will be prepended to all statements
sent to the server.
|
void |
setTransactionIsolation(int level) |
void |
setTypeMap(java.util.Map<java.lang.String,java.lang.Class<?>> map)
JDBC 2.0 Install a type-map object as the default type-map for this
connection
|
void |
shutdownServer()
Used by MiniAdmin to shutdown a MySQL server
|
boolean |
storesLowerCaseTableName() |
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?
|
void |
throwConnectionClosedException() |
void |
transactionBegun() |
void |
transactionCompleted() |
void |
unregisterStatement(Statement stmt)
Remove the given statement from the list of open statements
|
void |
unSafeStatementInterceptors() |
boolean |
useAnsiQuotedIdentifiers() |
boolean |
versionMeetsMinimum(int major,
int minor,
int subminor)
Does the server this connection is connected to
meet or exceed the given version?
|
exposeAsDriverPropertyInfo, exposeAsDriverPropertyInfoInternal, exposeAsProperties, 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, getExceptionInterceptors, getExplainSlowQueries, getFailOverReadOnly, getFunctionsNeverReturnBlobs, getGatherPerfMetrics, getGatherPerformanceMetrics, getGenerateSimpleParameterMetadata, getGetProceduresReturnsFunctions, getHighAvailability, 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, initializeFromRef, initializeProperties, postInitialization, 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, setConnectionAttributes, 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, setHighAvailability, 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, setMaxAllowedPacket, 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, storeToRef, useUnbufferedInputclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConnectionAttributescreateArrayOf, createBlob, createClob, createNClob, createSQLXML, createStruct, getClientInfo, getClientInfo, isValid, setClientInfo, setClientInfoexposeAsXml, 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, getConnectionCollation, getConnectionLifecycleInterceptors, getConnectTimeout, getContinueBatchOnError, getCreateDatabaseIfNotExist, getDefaultAuthenticationPlugin, getDefaultFetchSize, getDetectCustomCollations, getDisabledAuthenticationPlugins, getDisconnectOnExpiredPasswords, getDontCheckOnDuplicateKeyUpdateInSQL, getDontTrackOpenResources, getDumpMetadataOnColumnNotFound, getDumpQueriesOnException, getDynamicCalendars, getElideSetAutoCommits, getEmptyStringsConvertToZero, getEmulateLocators, getEmulateUnsupportedPstmts, getEnabledSSLCipherSuites, getEnablePacketDebug, getEnableQueryTimeouts, getEncoding, 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, useUnbufferedInputpublic static final java.lang.String JDBC_LOCAL_CHARACTER_SET_RESULTS
public static java.util.Map<?,?> charsetMap
protected static final java.lang.String DEFAULT_LOGGER_CLASS
protected static java.util.Map<?,?> roundRobinStatsMap
public java.util.Map<java.lang.Integer,java.lang.String> indexToMysqlCharset
public java.util.Map<java.lang.Integer,java.lang.String> indexToCustomMysqlCharset
protected java.util.Properties props
protected com.mysql.jdbc.util.LRUCache resultSetMetadataCache
protected ConnectionImpl()
public ConnectionImpl(java.lang.String hostToConnectTo,
int portToConnectTo,
java.util.Properties info,
java.lang.String databaseToConnectTo,
java.lang.String url)
throws java.sql.SQLException
hostToConnectTo - the hostname of the database serverportToConnectTo - the port number the server is listening oninfo - a Properties[] list holding the user and passworddatabaseToConnectTo - the database to connect tourl - the URL of the connectiond - the Driver instantation of the connectionjava.sql.SQLException - if a database access error occurspublic java.lang.String getHost()
getHost in interface MySQLConnectionpublic boolean isProxySet()
isProxySet in interface MySQLConnectionpublic void setProxy(MySQLConnection proxy)
setProxy in interface MySQLConnectionpublic void setRealProxy(java.lang.reflect.InvocationHandler proxy)
public MySQLConnection getLoadBalanceSafeProxy()
getLoadBalanceSafeProxy in interface MySQLConnectionpublic MySQLConnection getMultiHostSafeProxy()
getMultiHostSafeProxy in interface MySQLConnectionpublic java.lang.Object getConnectionMutex()
protected static java.sql.SQLException appendMessageToException(java.sql.SQLException sqlEx,
java.lang.String messageToAppend,
ExceptionInterceptor interceptor)
public java.util.Timer getCancelTimer()
getCancelTimer in interface MySQLConnectionprotected static Connection getInstance(java.lang.String hostToConnectTo, int portToConnectTo, java.util.Properties info, java.lang.String databaseToConnectTo, java.lang.String url) throws java.sql.SQLException
java.sql.SQLExceptionprotected static int getNextRoundRobinHostIndex(java.lang.String url,
java.util.List<?> hostList)
url - hostList - public void unSafeStatementInterceptors()
throws java.sql.SQLException
unSafeStatementInterceptors in interface MySQLConnectionjava.sql.SQLExceptionpublic void initializeSafeStatementInterceptors()
throws java.sql.SQLException
initializeSafeStatementInterceptors in interface MySQLConnectionjava.sql.SQLExceptionpublic java.util.List<StatementInterceptorV2> getStatementInterceptorsInstances()
getStatementInterceptorsInstances in interface MySQLConnectionpublic void changeUser(java.lang.String userName,
java.lang.String newPassword)
throws java.sql.SQLException
userName - the username to authenticate withnewPassword - the password to authenticate withjava.sql.SQLException - if authentication fails, or some other error occurs while
performing the command.public void checkClosed()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void throwConnectionClosedException()
throws java.sql.SQLException
throwConnectionClosedException in interface MySQLConnectionjava.sql.SQLExceptionpublic void abortInternal()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void clearHasTriedMaster()
public void clearWarnings()
throws java.sql.SQLException
clearWarnings in interface java.sql.Connectionjava.sql.SQLException - if a database access error occurspublic java.sql.PreparedStatement clientPrepareStatement(java.lang.String sql)
throws java.sql.SQLException
Connectionsql - java.sql.SQLExceptionConnection.prepareStatement(String)public java.sql.PreparedStatement clientPrepareStatement(java.lang.String sql,
int autoGenKeyIndex)
throws java.sql.SQLException
Connectionjava.sql.SQLExceptionConnection.prepareStatement(String, int)public java.sql.PreparedStatement clientPrepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
Connectionsql - resultSetType - resultSetConcurrency - java.sql.SQLExceptionConnection.prepareStatement(String, int, int)public java.sql.PreparedStatement clientPrepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
boolean processEscapeCodesIfNeeded)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.PreparedStatement clientPrepareStatement(java.lang.String sql,
int[] autoGenKeyIndexes)
throws java.sql.SQLException
Connectionjava.sql.SQLExceptionConnection.prepareStatement(String, int[])public java.sql.PreparedStatement clientPrepareStatement(java.lang.String sql,
java.lang.String[] autoGenKeyColNames)
throws java.sql.SQLException
Connectionjava.sql.SQLExceptionConnection.prepareStatement(String, String[])public java.sql.PreparedStatement clientPrepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws java.sql.SQLException
Connectionjava.sql.SQLExceptionConnection.prepareStatement(String, int, int, int)public void close()
throws java.sql.SQLException
close in interface java.lang.AutoCloseableclose in interface java.sql.Connectionjava.sql.SQLException - if a database access error occurspublic void commit()
throws java.sql.SQLException
Note: MySQL does not support transactions, so this method is a no-op.
commit in interface java.sql.Connectionjava.sql.SQLException - if a database access error occurssetAutoCommitpublic void createNewIO(boolean isForReconnect)
throws java.sql.SQLException
createNewIO in interface MySQLConnectionisForReconnect - is this request for a re-connectjava.sql.SQLException - if a database access error occursCommunicationsExceptionpublic java.sql.Statement createStatement()
throws java.sql.SQLException
createStatement in interface java.sql.Connectionjava.sql.SQLException - passed through from the constructorpublic java.sql.Statement createStatement(int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
createStatement in interface java.sql.ConnectionresultSetType - a result set type, see ResultSet.TYPE_XXXresultSetConcurrency - a concurrency type, see ResultSet.CONCUR_XXXjava.sql.SQLException - if a database-access error occurs.public java.sql.Statement createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws java.sql.SQLException
createStatement in interface java.sql.Connectionjava.sql.SQLExceptionConnection.createStatement(int, int, int)public void dumpTestcaseQuery(java.lang.String query)
dumpTestcaseQuery in interface MySQLConnectionpublic Connection duplicate() throws java.sql.SQLException
duplicate in interface MySQLConnectionjava.sql.SQLExceptionpublic ResultSetInternalMethods execSQL(StatementImpl callingStatement, java.lang.String sql, int maxRows, Buffer packet, int resultSetType, int resultSetConcurrency, boolean streamResults, java.lang.String catalog, Field[] cachedMetadata) throws java.sql.SQLException
execSQL in interface MySQLConnectioncallingStatement - sql - the SQL statement to be executedmaxRows - packet - resultSetType - resultSetConcurrency - streamResults - queryIsSelectOnly - catalog - unpackFields - java.sql.SQLException - if a database error occurspublic ResultSetInternalMethods execSQL(StatementImpl callingStatement, java.lang.String sql, int maxRows, Buffer packet, int resultSetType, int resultSetConcurrency, boolean streamResults, java.lang.String catalog, Field[] cachedMetadata, boolean isBatch) throws java.sql.SQLException
execSQL in interface MySQLConnectionjava.sql.SQLExceptionpublic java.lang.String extractSqlFromPacket(java.lang.String possibleSqlQuery,
Buffer queryPacket,
int endOfQueryPacketPosition)
throws java.sql.SQLException
extractSqlFromPacket in interface MySQLConnectionjava.sql.SQLExceptionpublic java.lang.StringBuilder generateConnectionCommentBlock(java.lang.StringBuilder buf)
generateConnectionCommentBlock in interface MySQLConnectionpublic int getActiveStatementCount()
ConnectiongetActiveStatementCount in interface MySQLConnectionpublic boolean getAutoCommit()
throws java.sql.SQLException
getAutoCommit in interface java.sql.Connectionjava.sql.SQLException - if an error occurssetAutoCommitpublic java.util.Calendar getCalendarInstanceForSessionOrNew()
getCalendarInstanceForSessionOrNew in interface MySQLConnectionpublic java.lang.String getCatalog()
throws java.sql.SQLException
Note: MySQL's notion of catalogs are individual databases.
getCatalog in interface java.sql.Connectionjava.sql.SQLException - if a database access error occurspublic java.lang.String getCharacterSetMetadata()
getCharacterSetMetadata in interface MySQLConnectionpublic SingleByteCharsetConverter getCharsetConverter(java.lang.String javaEncodingName) throws java.sql.SQLException
getCharsetConverter in interface MySQLConnectionjavaEncodingName - the encoding name to retrievejava.sql.SQLException@Deprecated
public java.lang.String getCharsetNameForIndex(int charsetIndex)
throws java.sql.SQLException
getEncodingForIndex(int charsetIndex)getCharsetNameForIndex in interface MySQLConnectionjava.sql.SQLExceptionpublic java.lang.String getEncodingForIndex(int charsetIndex)
throws java.sql.SQLException
getEncodingForIndex in interface MySQLConnectioncharsetIndex - java.sql.SQLException - if the character set index isn't known by the driverpublic java.util.TimeZone getDefaultTimeZone()
getDefaultTimeZone in interface MySQLConnectionpublic java.lang.String getErrorMessageEncoding()
getErrorMessageEncoding in interface MySQLConnectionpublic int getHoldability()
throws java.sql.SQLException
getHoldability in interface java.sql.Connectionjava.sql.SQLExceptionConnection.getHoldability()public long getId()
getId in interface MySQLConnectionpublic long getIdleFor()
getIdleFor in interface MySQLConnectionpublic MysqlIO getIO() throws java.sql.SQLException
getIO in interface MySQLConnectionjava.sql.SQLException - if the connection is closed.public com.mysql.jdbc.log.Log getLog()
throws java.sql.SQLException
getLog in interface MySQLConnectionjava.sql.SQLException - if an error occurspublic int getMaxBytesPerChar(java.lang.String javaCharsetName)
throws java.sql.SQLException
getMaxBytesPerChar in interface MySQLConnectionjava.sql.SQLExceptionpublic int getMaxBytesPerChar(java.lang.Integer charsetIndex,
java.lang.String javaCharsetName)
throws java.sql.SQLException
getMaxBytesPerChar in interface MySQLConnectionjava.sql.SQLExceptionpublic java.sql.DatabaseMetaData getMetaData()
throws java.sql.SQLException
getMetaData in interface java.sql.Connectionjava.sql.SQLException - if a database access error occurspublic java.sql.Statement getMetadataSafeStatement()
throws java.sql.SQLException
getMetadataSafeStatement in interface MySQLConnectionjava.sql.SQLExceptionpublic int getNetBufferLength()
getNetBufferLength in interface MySQLConnection@Deprecated public java.lang.String getServerCharacterEncoding()
getServerCharset()Connectionpublic java.lang.String getServerCharset()
getServerCharset in interface MySQLConnectionpublic int getServerMajorVersion()
getServerMajorVersion in interface MySQLConnectionpublic int getServerMinorVersion()
getServerMinorVersion in interface MySQLConnectionpublic int getServerSubMinorVersion()
getServerSubMinorVersion in interface MySQLConnectionpublic java.util.TimeZone getServerTimezoneTZ()
ConnectiongetServerTimezoneTZ in interface MySQLConnectionpublic java.lang.String getServerVariable(java.lang.String variableName)
getServerVariable in interface MySQLConnectionpublic java.lang.String getServerVersion()
getServerVersion in interface MySQLConnectionpublic java.util.Calendar getSessionLockedCalendar()
getSessionLockedCalendar in interface MySQLConnectionpublic int getTransactionIsolation()
throws java.sql.SQLException
getTransactionIsolation in interface java.sql.Connectionjava.sql.SQLException - if a database access error occurspublic java.util.Map<java.lang.String,java.lang.Class<?>> getTypeMap()
throws java.sql.SQLException
getTypeMap in interface java.sql.Connectionjava.sql.SQLException - if a database error occurspublic java.lang.String getURL()
getURL in interface MySQLConnectionpublic java.lang.String getUser()
getUser in interface MySQLConnectionpublic java.util.Calendar getUtcCalendar()
getUtcCalendar in interface MySQLConnectionpublic java.sql.SQLWarning getWarnings()
throws java.sql.SQLException
getWarnings in interface java.sql.Connectionjava.sql.SQLException - if a database access error occurspublic boolean hasSameProperties(Connection c)
Connectionpublic java.util.Properties getProperties()
ConnectiongetProperties in interface MySQLConnectionpublic boolean hasTriedMaster()
Connectionpublic void incrementNumberOfPreparedExecutes()
incrementNumberOfPreparedExecutes in interface MySQLConnectionpublic void incrementNumberOfPrepares()
incrementNumberOfPrepares in interface MySQLConnectionpublic void incrementNumberOfResultSetsCreated()
incrementNumberOfResultSetsCreated in interface MySQLConnectionpublic boolean isClientTzUTC()
isClientTzUTC in interface MySQLConnectionpublic boolean isClosed()
isClosed in interface java.sql.Connectionpublic boolean isCursorFetchEnabled()
throws java.sql.SQLException
isCursorFetchEnabled in interface MySQLConnectionjava.sql.SQLExceptionpublic boolean isInGlobalTx()
Connectionpublic boolean isMasterConnection()
public boolean isNoBackslashEscapesSet()
public boolean isReadInfoMsgEnabled()
isReadInfoMsgEnabled in interface MySQLConnectionpublic boolean isReadOnly()
throws java.sql.SQLException
isReadOnly in interface MySQLConnectionisReadOnly in interface java.sql.Connectionjava.sql.SQLException - if a database access error occurspublic boolean isReadOnly(boolean useSessionStatus)
throws java.sql.SQLException
isReadOnly in interface MySQLConnectionuseSessionStatus - in some cases, for example when restoring connection with autoReconnect=true,
we can rely only on saved readOnly state, so use useSessionStatus=false in that casejava.sql.SQLException - if a database access error occurspublic boolean isRunningOnJDK13()
isRunningOnJDK13 in interface MySQLConnectionpublic boolean isSameResource(Connection otherConnection)
Connectionpublic boolean isServerTzUTC()
isServerTzUTC in interface MySQLConnectionpublic int getAutoIncrementIncrement()
ConnectiongetAutoIncrementIncrement in interface MySQLConnectionpublic boolean lowerCaseTableNames()
lowerCaseTableNames in interface MySQLConnectionpublic java.lang.String nativeSQL(java.lang.String sql)
throws java.sql.SQLException
nativeSQL in interface java.sql.Connectionsql - a SQL statement that may contain one or more '?' parameter
placeholdersjava.sql.SQLException - if a database access error occurspublic boolean parserKnowsUnicode()
Connectionpublic void ping()
throws java.sql.SQLException
java.sql.SQLException - if the ping failspublic void pingInternal(boolean checkForClosedConnection,
int timeoutMillis)
throws java.sql.SQLException
pingInternal in interface MySQLConnectionjava.sql.SQLExceptionpublic java.sql.CallableStatement prepareCall(java.lang.String sql)
throws java.sql.SQLException
prepareCall in interface java.sql.Connectionsql - java.sql.SQLExceptionpublic java.sql.CallableStatement prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
prepareCall in interface java.sql.Connectionsql - the SQL representing the callable statementresultSetType - a result set type, see ResultSet.TYPE_XXXresultSetConcurrency - a concurrency type, see ResultSet.CONCUR_XXXjava.sql.SQLException - if a database-access error occurs.public java.sql.CallableStatement prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws java.sql.SQLException
prepareCall in interface java.sql.Connectionjava.sql.SQLExceptionConnection.prepareCall(String, int, int, int)public java.sql.PreparedStatement prepareStatement(java.lang.String sql)
throws java.sql.SQLException
Note: This method is optimized for handling parametric SQL statements that benefit from precompilation if the driver supports precompilation. In this case, the statement is not sent to the database until the PreparedStatement is executed. This has no direct effect on users; however it does affect which method throws certain java.sql.SQLExceptions
MySQL does not support precompilation of statements, so they are handled by the driver.
prepareStatement in interface java.sql.Connectionsql - a SQL statement that may contain one or more '?' IN parameter
placeholdersjava.sql.SQLException - if a database access error occurs.public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int autoGenKeyIndex)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionjava.sql.SQLExceptionConnection.prepareStatement(String, int)public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionsql - the SQL query containing place holdersresultSetType - a result set type, see ResultSet.TYPE_XXXresultSetConcurrency - a concurrency type, see ResultSet.CONCUR_XXXjava.sql.SQLException - if a database-access error occurs.public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionjava.sql.SQLExceptionConnection.prepareStatement(String, int, int, int)public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int[] autoGenKeyIndexes)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionjava.sql.SQLExceptionConnection.prepareStatement(String, int[])public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
java.lang.String[] autoGenKeyColNames)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionjava.sql.SQLExceptionConnection.prepareStatement(String, String[])public void realClose(boolean calledExplicitly,
boolean issueRollback,
boolean skipLocalTeardown,
java.lang.Throwable reason)
throws java.sql.SQLException
realClose in interface MySQLConnectioncalledExplicitly - is this being called from close()issueRollback - should a rollback() be issued?java.sql.SQLException - if an error occurspublic void recachePreparedStatement(ServerPreparedStatement pstmt) throws java.sql.SQLException
recachePreparedStatement in interface MySQLConnectionjava.sql.SQLExceptionpublic void decachePreparedStatement(ServerPreparedStatement pstmt) throws java.sql.SQLException
decachePreparedStatement in interface MySQLConnectionjava.sql.SQLExceptionpublic void registerQueryExecutionTime(long queryTimeMs)
registerQueryExecutionTime in interface MySQLConnectionqueryTimeMs - public void registerStatement(Statement stmt)
registerStatement in interface MySQLConnectionstmt - the Statement instance to removepublic void releaseSavepoint(java.sql.Savepoint arg0)
throws java.sql.SQLException
releaseSavepoint in interface java.sql.Connectionjava.sql.SQLExceptionConnection.releaseSavepoint(Savepoint)protected void reportMetricsIfNeeded()
public void reportNumberOfTablesAccessed(int numTablesAccessed)
reportNumberOfTablesAccessed in interface MySQLConnectionpublic void resetServerState()
throws java.sql.SQLException
java.sql.SQLException - if the operation fails while resetting server state.public void rollback()
throws java.sql.SQLException
rollback in interface java.sql.Connectionjava.sql.SQLException - if a database access error occurscommitpublic void rollback(java.sql.Savepoint savepoint)
throws java.sql.SQLException
rollback in interface java.sql.Connectionjava.sql.SQLExceptionConnection.rollback(Savepoint)public java.sql.PreparedStatement serverPrepareStatement(java.lang.String sql)
throws java.sql.SQLException
Connectionjava.sql.SQLExceptionConnection.prepareStatement(String)public java.sql.PreparedStatement serverPrepareStatement(java.lang.String sql,
int autoGenKeyIndex)
throws java.sql.SQLException
Connectionjava.sql.SQLExceptionConnection.prepareStatement(String, int)public java.sql.PreparedStatement serverPrepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
Connectionjava.sql.SQLExceptionConnection.prepareStatement(String, int, int)public java.sql.PreparedStatement serverPrepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws java.sql.SQLException
Connectionjava.sql.SQLExceptionConnection.prepareStatement(String, int, int, int)public java.sql.PreparedStatement serverPrepareStatement(java.lang.String sql,
int[] autoGenKeyIndexes)
throws java.sql.SQLException
Connectionjava.sql.SQLExceptionConnection.prepareStatement(String, int[])public java.sql.PreparedStatement serverPrepareStatement(java.lang.String sql,
java.lang.String[] autoGenKeyColNames)
throws java.sql.SQLException
Connectionjava.sql.SQLExceptionConnection.prepareStatement(String, String[])public boolean serverSupportsConvertFn()
throws java.sql.SQLException
serverSupportsConvertFn in interface MySQLConnectionjava.sql.SQLExceptionpublic void setAutoCommit(boolean autoCommitFlag)
throws java.sql.SQLException
Note: MySQL does not support transactions, so this method is a no-op.
setAutoCommit in interface java.sql.ConnectionautoCommitFlag - -
true enables auto-commit; false disables itjava.sql.SQLException - if a database access error occurspublic void setCatalog(java.lang.String catalog)
throws java.sql.SQLException
Note: MySQL's notion of catalogs are individual databases.
setCatalog in interface java.sql.Connectioncatalog - the database for this connection to usejava.sql.SQLException - if a database access error occurspublic void setFailedOver(boolean flag)
failedOver - The failedOver to set.public void setHoldability(int arg0)
throws java.sql.SQLException
setHoldability in interface java.sql.Connectionjava.sql.SQLExceptionConnection.setHoldability(int)public void setInGlobalTx(boolean flag)
Connectionpublic void setPreferSlaveDuringFailover(boolean flag)
preferSlaveDuringFailover - The preferSlaveDuringFailover to set.public void setReadInfoMsgEnabled(boolean flag)
setReadInfoMsgEnabled in interface MySQLConnectionpublic void setReadOnly(boolean readOnlyFlag)
throws java.sql.SQLException
setReadOnly in interface java.sql.ConnectionreadOnlyFlag - -
true enables read-only mode; false disables itjava.sql.SQLException - if a database access error occurspublic void setReadOnlyInternal(boolean readOnlyFlag)
throws java.sql.SQLException
setReadOnlyInternal in interface MySQLConnectionjava.sql.SQLExceptionpublic java.sql.Savepoint setSavepoint()
throws java.sql.SQLException
setSavepoint in interface java.sql.Connectionjava.sql.SQLExceptionConnection.setSavepoint()public java.sql.Savepoint setSavepoint(java.lang.String name)
throws java.sql.SQLException
setSavepoint in interface java.sql.Connectionjava.sql.SQLExceptionConnection.setSavepoint(String)public void setTransactionIsolation(int level)
throws java.sql.SQLException
setTransactionIsolation in interface java.sql.Connectionlevel - java.sql.SQLExceptionpublic void setTypeMap(java.util.Map<java.lang.String,java.lang.Class<?>> map)
throws java.sql.SQLException
setTypeMap in interface java.sql.Connectionmap - the type mappingjava.sql.SQLException - if a database error occurs.public void shutdownServer()
throws java.sql.SQLException
shutdownServer in interface MySQLConnectionjava.sql.SQLException - if the command can not be issued.public boolean supportsIsolationLevel()
Connectionpublic boolean supportsQuotedIdentifiers()
Connectionpublic boolean supportsTransactions()
Connectionpublic void unregisterStatement(Statement stmt)
unregisterStatement in interface MySQLConnectionstmt - the Statement instance to removepublic boolean useAnsiQuotedIdentifiers()
useAnsiQuotedIdentifiers in interface MySQLConnectionpublic boolean versionMeetsMinimum(int major,
int minor,
int subminor)
throws java.sql.SQLException
Connectionjava.sql.SQLExceptionpublic CachedResultSetMetaData getCachedMetaData(java.lang.String sql)
getCachedMetaData in interface MySQLConnectionsql - the query that is the key to the cachepublic void initializeResultsMetadataFromCache(java.lang.String sql,
CachedResultSetMetaData cachedMetaData,
ResultSetInternalMethods resultSet)
throws java.sql.SQLException
initializeResultsMetadataFromCache in interface MySQLConnectionsql - the query that the metadata pertains too.cachedMetaData - metadata (if it exists) to populate the cache.resultSet - the result set to retreive metadata from, or apply to.java.sql.SQLExceptionpublic java.lang.String getStatementComment()
getStatementComment in interface MySQLConnectionpublic void setStatementComment(java.lang.String comment)
comment - the comment that will be prepended to all statements
sent to the server.public void reportQueryTime(long millisOrNanos)
public boolean isAbonormallyLongQuery(long millisOrNanos)
isAbonormallyLongQuery in interface MySQLConnectionpublic void initializeExtension(Extension ex) throws java.sql.SQLException
java.sql.SQLExceptionpublic void transactionBegun()
throws java.sql.SQLException
transactionBegun in interface MySQLConnectionjava.sql.SQLExceptionpublic void transactionCompleted()
throws java.sql.SQLException
transactionCompleted in interface MySQLConnectionjava.sql.SQLExceptionpublic boolean storesLowerCaseTableName()
storesLowerCaseTableName in interface MySQLConnectionpublic ExceptionInterceptor getExceptionInterceptor()
getExceptionInterceptor in interface ConnectionPropertiesgetExceptionInterceptor in interface MySQLConnectiongetExceptionInterceptor in class ConnectionPropertiesImplpublic boolean getRequiresEscapingEncoder()
getRequiresEscapingEncoder in interface MySQLConnectionpublic boolean isServerLocal()
throws java.sql.SQLException
Connectionjava.sql.SQLExceptionpublic int getSessionMaxRows()
public void setSessionMaxRows(int max)
throws java.sql.SQLException
max - the new max-rows value to set.java.sql.SQLException - if a database error occurs issuing the statement that sets the limit.public void setSchema(java.lang.String schema)
throws java.sql.SQLException
setSchema in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.lang.String getSchema()
throws java.sql.SQLException
getSchema in interface java.sql.Connectionjava.sql.SQLExceptionpublic void abort(java.util.concurrent.Executor executor)
throws java.sql.SQLException
abort results in:
SQLException.
Calling abort marks the connection closed and releases any resources. Calling abort on a closed connection is a no-op.
It is possible that the aborting and releasing of the resources that are held by the connection can take an extended period of time. When the
abort method returns, the connection will have been marked as closed and the Executor that was passed as a parameter to abort
may still be executing tasks to release resources.
This method checks to see that there is an SQLPermission object before allowing the method to proceed. If a SecurityManager
exists and its checkPermission method denies calling abort, this method throws a java.lang.SecurityException.
abort in interface java.sql.Connectionexecutor - The Executor implementation which will
be used by abort.java.sql.SQLException - if a database access error occurs or
the executor is null,java.lang.SecurityException - if a security manager exists and its checkPermission method denies calling abortSecurityManager.checkPermission(java.security.Permission),
Executorpublic void setNetworkTimeout(java.util.concurrent.Executor executor,
int milliseconds)
throws java.sql.SQLException
setNetworkTimeout in interface java.sql.Connectionjava.sql.SQLExceptionpublic int getNetworkTimeout()
throws java.sql.SQLException
getNetworkTimeout in interface java.sql.Connectionjava.sql.SQLExceptionpublic com.mysql.jdbc.profiler.ProfilerEventHandler getProfilerEventHandlerInstance()
getProfilerEventHandlerInstance in interface MySQLConnectionpublic void setProfilerEventHandlerInstance(com.mysql.jdbc.profiler.ProfilerEventHandler h)
setProfilerEventHandlerInstance in interface MySQLConnection