Top Description Fields Methods
com.mysql.cj.jdbc

public Interface JdbcConnection

extends Connection, MysqlConnection, TransactionEventHandler
Known Direct Subinterfaces
com.mysql.cj.jdbc.ha.LoadBalancedConnection, com.mysql.cj.jdbc.ha.ReplicationConnection
Known Direct Implementers
com.mysql.cj.jdbc.ha.MultiHostMySQLConnection, com.mysql.cj.jdbc.ConnectionImpl, com.mysql.cj.jdbc.ConnectionWrapper
Imports
java.sql.SQLException, java.util.List, java.util.concurrent.locks.Lock, com.mysql.cj.MysqlConnection, .ServerVersion, .TransactionEventHandler, com.mysql.cj.interceptors.QueryInterceptor, com.mysql.cj.jdbc.result.CachedResultSetMetaData, .ResultSetInternalMethods

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

Inherited from java.sql.Connection:
TRANSACTION_NONETRANSACTION_READ_COMMITTEDTRANSACTION_READ_UNCOMMITTEDTRANSACTION_REPEATABLE_READTRANSACTION_SERIALIZABLE

Method Summary

Modifier and TypeMethod and Description
public void
abortInternal()

Clobbers the physical network connection and marks this connection as closed.

public void
changeUser(String
the username to authenticate with
userName
,
String
the password to authenticate with
newPassword
)

Changes the user on this connection by performing a re-authentication.

public PreparedStatement

Returns:

prepared statement
clientPrepareStatement
(String
statement
sql
)

Prepares a statement on the client, using client-side emulation (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.

public PreparedStatement

Returns:

prepared statement
clientPrepareStatement
(String
statement
sql
,
int
autoGenKeyIndex
autoGenKeyIndex
)

Prepares a statement on the client, using client-side emulation (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.

public PreparedStatement

Returns:

prepared statement
clientPrepareStatement
(String
statement
sql
,
int
resultSetType
resultSetType
,
int
resultSetConcurrency
resultSetConcurrency
)

Prepares a statement on the client, using client-side emulation (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.

public PreparedStatement

Returns:

prepared statement
clientPrepareStatement
(String
statement
sql
,
int[]
autoGenKeyIndexes
autoGenKeyIndexes
)

Prepares a statement on the client, using client-side emulation (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.

public PreparedStatement

Returns:

prepared statement
clientPrepareStatement
(String
statement
sql
,
int
resultSetType
resultSetType
,
int
resultSetConcurrency
resultSetConcurrency
,
int
resultSetHoldability
resultSetHoldability
)

Prepares a statement on the client, using client-side emulation (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.

public PreparedStatement

Returns:

prepared statement
clientPrepareStatement
(String
statement
sql
,
String[]
autoGenKeyColNames
autoGenKeyColNames
)

Prepares a statement on the client, using client-side emulation (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.

public void
public void
doClose(Throwable
the exception that caused this method call
cause
,
CloseOption...
options indicating how the close was initiated and/or what should be performed during the close
options
)

Close the connection and release resources.

public JdbcConnection
public int

Returns:

the number of active statements
getActiveStatementCount
()

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

public int

Returns:

the session value of 'auto_increment_increment'
getAutoIncrementIncrement
()

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

public CachedResultSetMetaData

Returns:

metadata cached for the given SQL, or none if it doesn't exist.
getCachedMetaData
(String
the query that is the key to the cache
sql
)

Returns cached metadata (or null if not cached) for the given query, which must match _exactly_.

public String

Returns:

Returns the characterSetMetadata.
getCharacterSetMetadata
()

public ClientInfoProvider
public String

Returns:

current database name
getDatabase
()

Retrieves this connection object's current database name.

public String
public String
public long

Returns:

number of ms that this connection has been idle, 0 if the driver is busy retrieving results.
getIdleFor
()

Reports how long this connection has been idle.

public Lock
public Statement
public JdbcConnection
public JdbcConnection
public JdbcPropertySet
public List<QueryInterceptor>
public ServerVersion
public int

Returns:

int max rows
getSessionMaxRows
()

Returns the sql select limit max-rows for this session.

public String

Returns:

the comment that will be prepended to all statements sent to the server.
getStatementComment
()

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

public boolean

Returns:

true if has the same properties
hasSameProperties
(JdbcConnection
connection
c
)

Does this connection have the same properties as another?

public void
initializeResultsMetadataFromCache(String
the query that the metadata pertains too.
sql
,
CachedResultSetMetaData
metadata (if it exists) to populate the cache.
cachedMetaData
,
ResultSetInternalMethods
the result set to retrieve metadata from, or apply to.
resultSet
)

Caches CachedResultSetMetaData that has been placed in the cache using the given SQL as a key.

public void
public boolean

Returns:

true if this connection currently a participant in an XA transaction
isInGlobalTx
()

Is this connection currently a participant in an XA transaction?

public boolean
public boolean

Returns:

true if the connection is read only
isReadOnly
(boolean
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 case
useSessionStatus
)

Tests to see if the connection is in Read Only Mode.

public boolean

Returns:

true if it is the same one
isSameResource
(JdbcConnection
connection
c
)

Does this connection have the same resource name as the given connection (for XA)?

public boolean

Returns:

true if the server is "local"
isServerLocal
()

Is the server this connection is connected to "local" (i.e. same host) as the application?

public boolean

Returns:

true if this connection is connected to the first in the list.
isSourceConnection
()

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

public boolean

Returns:

true if lower_case_table_names is 'on'
lowerCaseTableNames
()

Is the server configured to use lower-case table names only?

public void
ping()

Detect if the connection is still good by sending a ping command to the server.

public void
pingInternal(boolean checkForClosedConnection, int timeoutMillis)

public void
public void
registerStatement(JdbcStatement
the Statement instance to remove
stmt
)

Register a Statement instance as open.

public void
resetServerState()

Resets the server-side state of this connection.

public PreparedStatement

Returns:

prepared statement
serverPrepareStatement
(String
statement
sql
)

Prepares a statement on the server (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the method java.sql.Connection.prepareStatement() with the same argument types.

public PreparedStatement

Returns:

prepared statement
serverPrepareStatement
(String
statement
sql
,
int
autoGenKeyIndex
autoGenKeyIndex
)

Prepares a statement on the server (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the method java.sql.Connection.prepareStatement() with the same argument types.

public PreparedStatement

Returns:

prepared statement
serverPrepareStatement
(String
statement
sql
,
int
resultSetType
resultSetType
,
int
resultSetConcurrency
resultSetConcurrency
)

Prepares a statement on the server (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the method java.sql.Connection.prepareStatement() with the same argument types.

public PreparedStatement

Returns:

prepared statement
serverPrepareStatement
(String
statement
sql
,
int
resultSetType
resultSetType
,
int
resultSetConcurrency
resultSetConcurrency
,
int
resultSetHoldability
resultSetHoldability
)

Prepares a statement on the server (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the method java.sql.Connection.prepareStatement() with the same argument types.

public PreparedStatement

Returns:

prepared statement
serverPrepareStatement
(String
statement
sql
,
int[]
autoGenKeyIndexes
autoGenKeyIndexes
)

Prepares a statement on the server (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the method java.sql.Connection.prepareStatement() with the same argument types.

public PreparedStatement

Returns:

prepared statement
serverPrepareStatement
(String
statement
sql
,
String[]
autoGenKeyColNames
autoGenKeyColNames
)

Prepares a statement on the server (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the method java.sql.Connection.prepareStatement() with the same argument types.

public void
setDatabase(String
the database for this connection to use
dbName
)

Set current database for this connection.

public void
setFailedOver(boolean
The failedOver flag to set.
flag
)

public void
setInGlobalTx(boolean
the state flag
flag
)

Set the state of being in a global (XA) transaction.

public void
public void
setReadOnlyInternal(boolean readOnlyFlag)

public void
setSessionMaxRows(int
the new max-rows value to set.
max
)

Sets the sql select limit max-rows for this session if different from current.

public void
setStatementComment(String
the comment that will be prepended to all statements sent to the server.
comment
)

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

public void
shutdownServer()

Used by MiniAdmin to shutdown a MySQL server

public boolean
public void
public void
unregisterStatement(JdbcStatement
the Statement instance to remove
stmt
)

Remove the given statement from the list of open statements

public void
Inherited from com.mysql.cj.MysqlConnection:
checkClosedcleanupcreateNewIOgetConnectionLockgetExceptionInterceptorgetIdgetPropertiesgetServerSessionStateControllergetSessiongetURLgetUser
Inherited from com.mysql.cj.TransactionEventHandler:
transactionBeguntransactionCompleted
Inherited from java.sql.Connection:
abortbeginRequestclearWarningsclosecommitcreateArrayOfcreateBlobcreateClobcreateNClobcreateSQLXMLcreateStatementcreateStatementcreateStatementcreateStructendRequestgetAutoCommitgetCataloggetClientInfogetClientInfogetHoldabilitygetMetaDatagetNetworkTimeoutgetSchemagetTransactionIsolationgetTypeMapgetWarningsisClosedisReadOnlyisValidnativeSQLprepareCallprepareCallprepareCallprepareStatementprepareStatementprepareStatementprepareStatementprepareStatementprepareStatementreleaseSavepointrollbackrollbacksetAutoCommitsetCatalogsetClientInfosetClientInfosetHoldabilitysetNetworkTimeoutsetReadOnlysetSavepointsetSavepointsetSchemasetShardingKeysetShardingKeysetShardingKeyIfValidsetShardingKeyIfValidsetTransactionIsolationsetTypeMap

Method Detail

abortInternalback to summary
public void abortInternal() throws SQLException

Clobbers the physical network connection and marks this connection as closed.

Exceptions
SQLException:
if an error occurs
changeUserback to summary
public void changeUser(String userName, String newPassword) throws SQLException

Changes the user on this connection by performing a re-authentication. If authentication fails, the connection is failed.

Parameters
userName:String

the username to authenticate with

newPassword:String

the password to authenticate with

Exceptions
SQLException:
if authentication fails, or some other error occurs while performing the command.
clientPrepareStatementback to summary
public PreparedStatement clientPrepareStatement(String sql) throws SQLException

Prepares a statement on the client, using client-side emulation (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.

Parameters
sql:String

statement

Returns:PreparedStatement

prepared statement

Exceptions
SQLException:
if an error occurs
See Also
java.sql.Connection#prepareStatement(String)
clientPrepareStatementback to summary
public PreparedStatement clientPrepareStatement(String sql, int autoGenKeyIndex) throws SQLException

Prepares a statement on the client, using client-side emulation (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.

Parameters
sql:String

statement

autoGenKeyIndex:int

autoGenKeyIndex

Returns:PreparedStatement

prepared statement

Exceptions
SQLException:
if an error occurs
See Also
java.sql.Connection#prepareStatement(String, int)
clientPrepareStatementback to summary
public PreparedStatement clientPrepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException

Prepares a statement on the client, using client-side emulation (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.

Parameters
sql:String

statement

resultSetType:int

resultSetType

resultSetConcurrency:int

resultSetConcurrency

Returns:PreparedStatement

prepared statement

Exceptions
SQLException:
if an error occurs
See Also
java.sql.Connection#prepareStatement(String, int, int)
clientPrepareStatementback to summary
public PreparedStatement clientPrepareStatement(String sql, int[] autoGenKeyIndexes) throws SQLException

Prepares a statement on the client, using client-side emulation (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.

Parameters
sql:String

statement

autoGenKeyIndexes:int[]

autoGenKeyIndexes

Returns:PreparedStatement

prepared statement

Exceptions
SQLException:
if an error occurs
See Also
java.sql.Connection#prepareStatement(String, int[])
clientPrepareStatementback to summary
public PreparedStatement clientPrepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException

Prepares a statement on the client, using client-side emulation (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.

Parameters
sql:String

statement

resultSetType:int

resultSetType

resultSetConcurrency:int

resultSetConcurrency

resultSetHoldability:int

resultSetHoldability

Returns:PreparedStatement

prepared statement

Exceptions
SQLException:
if an error occurs
See Also
java.sql.Connection#prepareStatement(String, int, int, int)
clientPrepareStatementback to summary
public PreparedStatement clientPrepareStatement(String sql, String[] autoGenKeyColNames) throws SQLException

Prepares a statement on the client, using client-side emulation (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types.

Parameters
sql:String

statement

autoGenKeyColNames:String[]

autoGenKeyColNames

Returns:PreparedStatement

prepared statement

Exceptions
SQLException:
if an error occurs
See Also
java.sql.Connection#prepareStatement(String, String[])
decachePreparedStatementback to summary
public void decachePreparedStatement(JdbcPreparedStatement pstmt) throws SQLException
doCloseback to summary
public void doClose(Throwable cause, CloseOption... options) throws SQLException

Close the connection and release resources.

Parameters
cause:Throwable

the exception that caused this method call

options:CloseOption[]

options indicating how the close was initiated and/or what should be performed during the close

Exceptions
SQLException:
if an error occurs
getActiveMySQLConnectionback to summary
public JdbcConnection getActiveMySQLConnection()
getActiveStatementCountback to summary
public int getActiveStatementCount()

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

Returns:int

the number of active statements

getAutoIncrementIncrementback to summary
public int getAutoIncrementIncrement()

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

Returns:int

the session value of 'auto_increment_increment'

getCachedMetaDataback to summary
public CachedResultSetMetaData getCachedMetaData(String sql)

Returns cached metadata (or null if not cached) for the given query, which must match _exactly_. Calls to this method must be guarded by the Connection object lock that can be obtained by MysqlConnection#getConnectionLock().

Parameters
sql:String

the query that is the key to the cache

Returns:CachedResultSetMetaData

metadata cached for the given SQL, or none if it doesn't exist.

getCharacterSetMetadataback to summary
public String getCharacterSetMetadata()
Returns:String

Returns the characterSetMetadata.

getClientInfoProviderImplback to summary
public ClientInfoProvider getClientInfoProviderImpl() throws SQLException
getDatabaseback to summary
public String getDatabase()

Retrieves this connection object's current database name.

Returns:String

current database name

getHostback to summary
public String getHost()
getHostPortPairback to summary
public String getHostPortPair()
getIdleForback to summary
public long getIdleFor()

Reports how long this connection has been idle. This time (reported in milliseconds) is updated once a query has completed.

Returns:long

number of ms that this connection has been idle, 0 if the driver is busy retrieving results.

getLockback to summary
public Lock getLock()
getMetadataSafeStatementback to summary
public Statement getMetadataSafeStatement() throws SQLException
getMultiHostParentProxyback to summary
public JdbcConnection getMultiHostParentProxy()
getMultiHostSafeProxyback to summary
public JdbcConnection getMultiHostSafeProxy()
getPropertySetback to summary
public JdbcPropertySet getPropertySet()

Redeclares com.mysql.cj.MysqlConnection.getPropertySet.

Annotations
@Override
getQueryInterceptorsInstancesback to summary
public List<QueryInterceptor> getQueryInterceptorsInstances()
getServerVersionback to summary
public ServerVersion getServerVersion()
getSessionMaxRowsback to summary
public int getSessionMaxRows()

Returns the sql select limit max-rows for this session.

Returns:int

int max rows

getStatementCommentback to summary
public String getStatementComment()

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

Returns:String

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

hasSamePropertiesback to summary
public boolean hasSameProperties(JdbcConnection c)

Does this connection have the same properties as another?

Parameters
c:JdbcConnection

connection

Returns:boolean

true if has the same properties

initializeResultsMetadataFromCacheback to summary
public void initializeResultsMetadataFromCache(String sql, CachedResultSetMetaData cachedMetaData, ResultSetInternalMethods resultSet) throws SQLException

Caches CachedResultSetMetaData that has been placed in the cache using the given SQL as a key. Calls to this method must be guarded by the Connection object lock that can be obtained by MysqlConnection#getConnectionLock().

Parameters
sql:String

the query that the metadata pertains too.

cachedMetaData:CachedResultSetMetaData

metadata (if it exists) to populate the cache.

resultSet:ResultSetInternalMethods

the result set to retrieve metadata from, or apply to.

Exceptions
SQLException:
if an error occurs
initializeSafeQueryInterceptorsback to summary
public void initializeSafeQueryInterceptors() throws SQLException
isInGlobalTxback to summary
public boolean isInGlobalTx()

Is this connection currently a participant in an XA transaction?

Returns:boolean

true if this connection currently a participant in an XA transaction

isProxySetback to summary
public boolean isProxySet()
isReadOnlyback to summary
public boolean isReadOnly(boolean useSessionStatus) throws SQLException

Tests to see if the connection is in Read Only Mode.

Parameters
useSessionStatus:boolean

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 case

Returns:boolean

true if the connection is read only

Exceptions
SQLException:
if a database access error occurs
isSameResourceback to summary
public boolean isSameResource(JdbcConnection c)

Does this connection have the same resource name as the given connection (for XA)?

Parameters
c:JdbcConnection

connection

Returns:boolean

true if it is the same one

isServerLocalback to summary
public boolean isServerLocal() throws SQLException

Is the server this connection is connected to "local" (i.e. same host) as the application?

Returns:boolean

true if the server is "local"

Exceptions
SQLException:
if an error occurs
isSourceConnectionback to summary
public boolean isSourceConnection()

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

Returns:boolean

true if this connection is connected to the first in the list.

lowerCaseTableNamesback to summary
public boolean lowerCaseTableNames()

Is the server configured to use lower-case table names only?

Returns:boolean

true if lower_case_table_names is 'on'

pingback to summary
public void ping() throws SQLException

Detect if the connection is still good by sending a ping command to the server.

Exceptions
SQLException:
if the ping fails
pingInternalback to summary
public void pingInternal(boolean checkForClosedConnection, int timeoutMillis) throws SQLException
recachePreparedStatementback to summary
public void recachePreparedStatement(JdbcPreparedStatement pstmt) throws SQLException
registerStatementback to summary
public void registerStatement(JdbcStatement stmt)

Register a Statement instance as open.

Parameters
stmt:JdbcStatement

the Statement instance to remove

resetServerStateback to summary
public void resetServerState() throws SQLException

Resets the server-side state of this connection. Doesn't work if isParanoid() is set (it will become a no-op in this case). Usually only used from connection pooling code.

Exceptions
SQLException:
if the operation fails while resetting server state.
serverPrepareStatementback to summary
public PreparedStatement serverPrepareStatement(String sql) throws SQLException

Prepares a statement on the server (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the method java.sql.Connection.prepareStatement() with the same argument types.

Parameters
sql:String

statement

Returns:PreparedStatement

prepared statement

Exceptions
SQLException:
if an error occurs
See Also
java.sql.Connection#prepareStatement(String)
serverPrepareStatementback to summary
public PreparedStatement serverPrepareStatement(String sql, int autoGenKeyIndex) throws SQLException

Prepares a statement on the server (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the method java.sql.Connection.prepareStatement() with the same argument types.

Parameters
sql:String

statement

autoGenKeyIndex:int

autoGenKeyIndex

Returns:PreparedStatement

prepared statement

Exceptions
SQLException:
if an error occurs
See Also
java.sql.Connection#prepareStatement(String, int)
serverPrepareStatementback to summary
public PreparedStatement serverPrepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException

Prepares a statement on the server (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the method java.sql.Connection.prepareStatement() with the same argument types.

Parameters
sql:String

statement

resultSetType:int

resultSetType

resultSetConcurrency:int

resultSetConcurrency

Returns:PreparedStatement

prepared statement

Exceptions
SQLException:
if an error occurs
See Also
java.sql.Connection#prepareStatement(String, int, int)
serverPrepareStatementback to summary
public PreparedStatement serverPrepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException

Prepares a statement on the server (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the method java.sql.Connection.prepareStatement() with the same argument types.

Parameters
sql:String

statement

resultSetType:int

resultSetType

resultSetConcurrency:int

resultSetConcurrency

resultSetHoldability:int

resultSetHoldability

Returns:PreparedStatement

prepared statement

Exceptions
SQLException:
if an error occurs
See Also
java.sql.Connection#prepareStatement(String, int, int, int)
serverPrepareStatementback to summary
public PreparedStatement serverPrepareStatement(String sql, int[] autoGenKeyIndexes) throws SQLException

Prepares a statement on the server (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the method java.sql.Connection.prepareStatement() with the same argument types.

Parameters
sql:String

statement

autoGenKeyIndexes:int[]

autoGenKeyIndexes

Returns:PreparedStatement

prepared statement

Exceptions
SQLException:
if an error occurs
See Also
java.sql.Connection#prepareStatement(String, int[])
serverPrepareStatementback to summary
public PreparedStatement serverPrepareStatement(String sql, String[] autoGenKeyColNames) throws SQLException

Prepares a statement on the server (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the method java.sql.Connection.prepareStatement() with the same argument types.

Parameters
sql:String

statement

autoGenKeyColNames:String[]

autoGenKeyColNames

Returns:PreparedStatement

prepared statement

Exceptions
SQLException:
if an error occurs
See Also
java.sql.Connection#prepareStatement(String, String[])
setDatabaseback to summary
public void setDatabase(String dbName) throws SQLException

Set current database for this connection.

Parameters
dbName:String

the database for this connection to use

Exceptions
SQLException:
if a database access error occurs
setFailedOverback to summary
public void setFailedOver(boolean flag)
Parameters
flag:boolean

The failedOver flag to set.

setInGlobalTxback to summary
public void setInGlobalTx(boolean flag)

Set the state of being in a global (XA) transaction.

Parameters
flag:boolean

the state flag

setProxyback to summary
public void setProxy(JdbcConnection proxy)
setReadOnlyInternalback to summary
public void setReadOnlyInternal(boolean readOnlyFlag) throws SQLException
setSessionMaxRowsback to summary
public void setSessionMaxRows(int max) throws SQLException

Sets the sql select limit max-rows for this session if different from current.

Parameters
max:int

the new max-rows value to set.

Exceptions
SQLException:
if a database error occurs issuing the statement that sets the limit.
setStatementCommentback to summary
public void setStatementComment(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:String

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

shutdownServerback to summary
public void shutdownServer() throws SQLException

Used by MiniAdmin to shutdown a MySQL server

Exceptions
SQLException:
if the command can not be issued.
storesLowerCaseTableNameback to summary
public boolean storesLowerCaseTableName()
throwConnectionClosedExceptionback to summary
public void throwConnectionClosedException() throws SQLException
unregisterStatementback to summary
public void unregisterStatement(JdbcStatement stmt)

Remove the given statement from the list of open statements

Parameters
stmt:JdbcStatement

the Statement instance to remove

unSafeQueryInterceptorsback to summary
public void unSafeQueryInterceptors() throws SQLException