| Package | Description |
|---|---|
| com.mysql.cj.jdbc | |
| com.mysql.cj.jdbc.admin | |
| com.mysql.cj.jdbc.exceptions | |
| com.mysql.cj.jdbc.ha | |
| com.mysql.cj.jdbc.interceptors | |
| com.mysql.cj.jdbc.result | |
| testsuite.regression |
| Modifier and Type | Class and Description |
|---|---|
class |
ConnectionImpl
A Connection represents a session with a specific database.
|
class |
ConnectionWrapper
This class serves as a wrapper for the connection object.
|
| Modifier and Type | Field and Description |
|---|---|
protected JdbcConnection |
DatabaseMetaData.conn
The connection to the database
|
protected JdbcConnection |
StatementImpl.connection
The connection that created us
|
protected JdbcConnection |
ConnectionWrapper.mc |
private JdbcConnection |
ConnectionImpl.parentProxy |
private JdbcConnection |
MysqlPooledConnection.physicalConn |
private JdbcConnection |
ConnectionImpl.topProxy |
private JdbcConnection |
SuspendableXAConnection.underlyingConnection |
private JdbcConnection |
MysqlXAConnection.underlyingConnection |
| Modifier and Type | Field and Description |
|---|---|
private java.lang.ref.WeakReference<JdbcConnection> |
ConnectionImpl.NetworkTimeoutSetter.connRef |
| Modifier and Type | Method and Description |
|---|---|
protected JdbcConnection |
StatementImpl.checkClosed()
Checks if closed() has been called, and throws an exception if so
|
protected JdbcConnection |
ServerPreparedStatement.checkClosed() |
JdbcConnection |
ConnectionWrapper.getActiveMySQLConnection() |
JdbcConnection |
ConnectionImpl.getActiveMySQLConnection() |
JdbcConnection |
JdbcConnection.getActiveMySQLConnection() |
static JdbcConnection |
ConnectionImpl.getInstance(HostInfo hostInfo)
Creates a connection instance.
|
JdbcConnection |
ConnectionWrapper.getMultiHostParentProxy() |
JdbcConnection |
ConnectionImpl.getMultiHostParentProxy() |
JdbcConnection |
JdbcConnection.getMultiHostParentProxy() |
JdbcConnection |
ConnectionWrapper.getMultiHostSafeProxy() |
JdbcConnection |
ConnectionImpl.getMultiHostSafeProxy() |
JdbcConnection |
JdbcConnection.getMultiHostSafeProxy() |
private JdbcConnection |
ConnectionImpl.getProxy() |
| Modifier and Type | Method and Description |
|---|---|
void |
StatementImpl.executeSimpleNonQuery(JdbcConnection c,
java.lang.String nonQuery) |
private static javax.sql.XAConnection |
SuspendableXAConnection.findConnectionForXid(JdbcConnection connectionToWrap,
javax.transaction.xa.Xid xid) |
protected static SuspendableXAConnection |
SuspendableXAConnection.getInstance(JdbcConnection mysqlConnection) |
protected static MysqlPooledConnection |
MysqlPooledConnection.getInstance(JdbcConnection connection) |
protected static MysqlXAConnection |
MysqlXAConnection.getInstance(JdbcConnection mysqlConnection,
boolean logXaCommands) |
protected static CallableStatement |
CallableStatement.getInstance(JdbcConnection conn,
CallableStatement.CallableStatementParamInfo paramInfo)
Creates a callable statement instance
|
protected static DatabaseMetaData |
DatabaseMetaData.getInstance(JdbcConnection connToSet,
java.lang.String databaseToSet,
boolean checkForInfoSchema,
ResultSetFactory resultSetFactory) |
protected static ClientPreparedStatement |
ClientPreparedStatement.getInstance(JdbcConnection conn,
java.lang.String sql,
java.lang.String db)
Creates a prepared statement instance
|
protected static CallableStatement |
CallableStatement.getInstance(JdbcConnection conn,
java.lang.String sql,
java.lang.String db,
boolean isFunctionCall)
Creates a callable statement instance
|
protected static ServerPreparedStatement |
ServerPreparedStatement.getInstance(JdbcConnection conn,
java.lang.String sql,
java.lang.String db,
int resultSetType,
int resultSetConcurrency)
Creates a prepared statement instance
|
protected static ClientPreparedStatement |
ClientPreparedStatement.getInstance(JdbcConnection conn,
java.lang.String sql,
java.lang.String db,
QueryInfo cachedQueryInfo)
Creates a prepared statement instance
|
protected static ConnectionWrapper |
ConnectionWrapper.getInstance(MysqlPooledConnection mysqlPooledConnection,
JdbcConnection mysqlConnection,
boolean forXa) |
boolean |
ConnectionWrapper.hasSameProperties(JdbcConnection c) |
boolean |
ConnectionImpl.hasSameProperties(JdbcConnection c) |
boolean |
JdbcConnection.hasSameProperties(JdbcConnection c)
Does this connection have the same properties as another?
|
boolean |
ConnectionWrapper.isSameResource(JdbcConnection c) |
boolean |
ConnectionImpl.isSameResource(JdbcConnection otherConnection) |
boolean |
JdbcConnection.isSameResource(JdbcConnection c)
Does this connection have the same resource name as the given
connection (for XA)?
|
protected ClientPreparedStatement |
ClientPreparedStatement.prepareBatchedInsertSQL(JdbcConnection localConn,
int numBatches)
Returns a prepared statement for the number of batched parameters, used when re-writing batch INSERTs.
|
protected ClientPreparedStatement |
ServerPreparedStatement.prepareBatchedInsertSQL(JdbcConnection localConn,
int numBatches) |
void |
ConnectionWrapper.setProxy(JdbcConnection conn) |
void |
ConnectionImpl.setProxy(JdbcConnection proxy) |
void |
JdbcConnection.setProxy(JdbcConnection proxy) |
protected void |
StatementImpl.setupStreamingTimeout(JdbcConnection con)
Adjust net_write_timeout to a higher value if we're streaming result sets.
|
| Constructor and Description |
|---|
CallableStatement(JdbcConnection conn,
CallableStatement.CallableStatementParamInfo paramInfo)
Creates a new CallableStatement
|
CallableStatement(JdbcConnection conn,
java.lang.String sql,
java.lang.String db,
boolean isFunctionCall)
Creates a new CallableStatement
|
ClientPreparedStatement(JdbcConnection conn,
java.lang.String db)
Constructor used by server-side prepared statements
|
ClientPreparedStatement(JdbcConnection conn,
java.lang.String sql,
java.lang.String db)
Constructor for the PreparedStatement class.
|
ClientPreparedStatement(JdbcConnection conn,
java.lang.String sql,
java.lang.String db,
QueryInfo cachedQueryInfo)
Creates a new PreparedStatement object.
|
ConnectionWrapper(MysqlPooledConnection mysqlPooledConnection,
JdbcConnection mysqlConnection,
boolean forXa)
Construct a new LogicalHandle and set instance variables
|
DatabaseMetaData(JdbcConnection connToSet,
java.lang.String databaseToSet,
ResultSetFactory resultSetFactory)
Creates a new DatabaseMetaData object.
|
DatabaseMetaDataUsingInfoSchema(JdbcConnection connToSet,
java.lang.String databaseToSet,
ResultSetFactory resultSetFactory) |
MysqlPooledConnection(JdbcConnection connection)
Construct a new MysqlPooledConnection and set instance variables
|
MysqlXAConnection(JdbcConnection connection,
boolean logXaCommands) |
NetworkTimeoutSetter(JdbcConnection conn,
int milliseconds) |
ServerPreparedStatement(JdbcConnection conn,
java.lang.String sql,
java.lang.String db,
int resultSetType,
int resultSetConcurrency)
Creates a new ServerPreparedStatement object.
|
StatementImpl(JdbcConnection c,
java.lang.String db)
Constructor for a Statement.
|
SuspendableXAConnection(JdbcConnection connection) |
| Modifier and Type | Field and Description |
|---|---|
private JdbcConnection |
MiniAdmin.conn |
| Modifier and Type | Method and Description |
|---|---|
static java.sql.SQLException |
SQLError.createCommunicationsException(JdbcConnection conn,
PacketSentTimeHolder packetSentTimeHolder,
PacketReceivedTimeHolder packetReceivedTimeHolder,
java.lang.Exception underlyingException,
ExceptionInterceptor interceptor) |
| Constructor and Description |
|---|
CommunicationsException(JdbcConnection conn,
PacketSentTimeHolder packetSentTimeHolder,
PacketReceivedTimeHolder packetReceivedTimeHolder,
java.lang.Exception underlyingException) |
ConnectionFeatureNotAvailableException(JdbcConnection conn,
PacketSentTimeHolder packetSentTimeHolder,
java.lang.Exception underlyingException) |
| Modifier and Type | Interface and Description |
|---|---|
interface |
LoadBalancedConnection |
interface |
ReplicationConnection |
| Modifier and Type | Class and Description |
|---|---|
class |
LoadBalancedMySQLConnection |
class |
MultiHostMySQLConnection
Each instance of MultiHostMySQLConnection is coupled with a MultiHostConnectionProxy instance.
|
class |
ReplicationMySQLConnection |
| Modifier and Type | Field and Description |
|---|---|
private JdbcConnection |
LoadBalancedAutoCommitInterceptor.conn |
(package private) JdbcConnection |
MultiHostConnectionProxy.currentConnection |
(package private) JdbcConnection |
MultiHostConnectionProxy.parentProxyConnection |
(package private) JdbcConnection |
MultiHostConnectionProxy.thisAsConnection |
(package private) JdbcConnection |
MultiHostConnectionProxy.topProxyConnection |
| Modifier and Type | Method and Description |
|---|---|
static JdbcConnection |
FailoverConnectionProxy.createProxyInstance(ConnectionUrl connectionUrl) |
JdbcConnection |
ReplicationMySQLConnection.getActiveMySQLConnection() |
JdbcConnection |
MultiHostMySQLConnection.getActiveMySQLConnection() |
JdbcConnection |
ReplicationMySQLConnection.getCurrentConnection() |
JdbcConnection |
ReplicationConnectionProxy.getCurrentConnection() |
JdbcConnection |
ReplicationConnection.getCurrentConnection() |
JdbcConnection |
ReplicationConnectionProxy.getMasterConnection()
Deprecated.
|
default JdbcConnection |
ReplicationConnection.getMasterConnection()
Deprecated.
|
JdbcConnection |
MultiHostMySQLConnection.getMultiHostParentProxy() |
JdbcConnection |
MultiHostMySQLConnection.getMultiHostSafeProxy() |
(package private) JdbcConnection |
LoadBalancedConnectionProxy.getNewWrapperForThisAsConnection()
Wraps this object with a new load balanced Connection instance.
|
(package private) JdbcConnection |
ReplicationConnectionProxy.getNewWrapperForThisAsConnection()
Wraps this object with a new replication Connection instance.
|
(package private) JdbcConnection |
MultiHostConnectionProxy.getNewWrapperForThisAsConnection()
Wraps this object with a new multi-host Connection instance.
|
protected JdbcConnection |
MultiHostConnectionProxy.getParentProxy()
Get this connection's parent proxy.
|
protected JdbcConnection |
MultiHostConnectionProxy.getProxy()
Get this connection's proxy.
|
JdbcConnection |
ReplicationMySQLConnection.getReplicaConnection() |
JdbcConnection |
ReplicationConnection.getReplicaConnection() |
JdbcConnection |
ReplicationConnectionProxy.getReplicasConnection() |
JdbcConnection |
ReplicationConnectionProxy.getSlavesConnection()
Deprecated.
|
default JdbcConnection |
ReplicationConnection.getSlavesConnection()
Deprecated.
|
JdbcConnection |
ReplicationMySQLConnection.getSourceConnection() |
JdbcConnection |
ReplicationConnectionProxy.getSourceConnection() |
JdbcConnection |
ReplicationConnection.getSourceConnection() |
private JdbcConnection |
ReplicationMySQLConnection.getValidatedReplicasConnection() |
private JdbcConnection |
ReplicationMySQLConnection.getValidatedSourceConnection() |
private JdbcConnection |
ReplicationConnectionProxy.initializeReplicasConnection() |
private JdbcConnection |
ReplicationConnectionProxy.initializeSourceConnection() |
JdbcConnection |
BalanceStrategy.pickConnection(java.lang.reflect.InvocationHandler proxy,
java.util.List<java.lang.String> configuredHosts,
java.util.Map<java.lang.String,JdbcConnection> liveConnections,
long[] responseTimes,
int numRetries)
Called by the driver to pick a new connection to route requests over.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
ReplicationMySQLConnection.hasSameProperties(JdbcConnection c) |
boolean |
MultiHostMySQLConnection.hasSameProperties(JdbcConnection c) |
(package private) void |
LoadBalancedConnectionProxy.invalidateConnection(JdbcConnection conn)
Closes specified connection and removes it from required mappings.
|
(package private) void |
MultiHostConnectionProxy.invalidateConnection(JdbcConnection conn)
Invalidates the specified connection by closing it.
|
boolean |
MultiHostMySQLConnection.isSameResource(JdbcConnection otherConnection) |
protected void |
LoadBalancedConnectionProxy.propagateProxyDown(JdbcConnection proxyConn)
Propagates the connection proxy down through all live connections.
|
protected void |
ReplicationConnectionProxy.propagateProxyDown(JdbcConnection proxyConn)
Propagates the connection proxy down through all live connections.
|
protected void |
MultiHostConnectionProxy.propagateProxyDown(JdbcConnection proxyConn)
Propagates the connection proxy down through the multi-host connections chain.
|
void |
ReplicationMySQLConnection.setProxy(JdbcConnection proxy) |
void |
MultiHostMySQLConnection.setProxy(JdbcConnection proxy) |
protected void |
MultiHostConnectionProxy.setProxy(JdbcConnection proxyConn)
Sets this connection's proxy.
|
private void |
FailoverConnectionProxy.switchCurrentConnectionTo(int hostIndex,
JdbcConnection connection)
Replaces the previous underlying connection by the connection given.
|
(package private) void |
MultiHostConnectionProxy.syncSessionState(JdbcConnection source,
JdbcConnection target)
Synchronizes session state between two connections.
|
(package private) void |
LoadBalancedConnectionProxy.syncSessionState(JdbcConnection source,
JdbcConnection target,
boolean readOnly) |
(package private) void |
ReplicationConnectionProxy.syncSessionState(JdbcConnection source,
JdbcConnection target,
boolean readonly) |
(package private) void |
MultiHostConnectionProxy.syncSessionState(JdbcConnection source,
JdbcConnection target,
boolean readOnly)
Synchronizes session state between two connections, allowing to override the read-only status.
|
| Modifier and Type | Method and Description |
|---|---|
ConnectionImpl |
SequentialBalanceStrategy.pickConnection(java.lang.reflect.InvocationHandler proxy,
java.util.List<java.lang.String> configuredHosts,
java.util.Map<java.lang.String,JdbcConnection> liveConnections,
long[] responseTimes,
int numRetries) |
ConnectionImpl |
ServerAffinityStrategy.pickConnection(java.lang.reflect.InvocationHandler proxy,
java.util.List<java.lang.String> configuredHosts,
java.util.Map<java.lang.String,JdbcConnection> liveConnections,
long[] responseTimes,
int numRetries) |
ConnectionImpl |
BestResponseTimeBalanceStrategy.pickConnection(java.lang.reflect.InvocationHandler proxy,
java.util.List<java.lang.String> configuredHosts,
java.util.Map<java.lang.String,JdbcConnection> liveConnections,
long[] responseTimes,
int numRetries) |
ConnectionImpl |
RandomBalanceStrategy.pickConnection(java.lang.reflect.InvocationHandler proxy,
java.util.List<java.lang.String> configuredHosts,
java.util.Map<java.lang.String,JdbcConnection> liveConnections,
long[] responseTimes,
int numRetries) |
JdbcConnection |
BalanceStrategy.pickConnection(java.lang.reflect.InvocationHandler proxy,
java.util.List<java.lang.String> configuredHosts,
java.util.Map<java.lang.String,JdbcConnection> liveConnections,
long[] responseTimes,
int numRetries)
Called by the driver to pick a new connection to route requests over.
|
| Modifier and Type | Field and Description |
|---|---|
private JdbcConnection |
SessionAssociationInterceptor.connection |
private JdbcConnection |
ServerStatusDiffInterceptor.connection |
| Modifier and Type | Field and Description |
|---|---|
private JdbcConnection |
ResultSetFactory.conn |
protected JdbcConnection |
ResultSetImpl.connection
The Connection instance that created us
|
| Modifier and Type | Method and Description |
|---|---|
protected JdbcConnection |
ResultSetImpl.checkClosed()
Ensures that the result set is not closed
|
JdbcConnection |
ResultSetImpl.getConnection() |
| Constructor and Description |
|---|
ResultSetFactory(JdbcConnection connection,
StatementImpl creatorStmt) |
ResultSetImpl(OkPacket ok,
JdbcConnection conn,
StatementImpl creatorStmt)
Create a result set for an executeUpdate statement.
|
ResultSetImpl(ResultsetRows tuples,
JdbcConnection conn,
StatementImpl creatorStmt)
Creates a new ResultSet object.
|
UpdatableResultSet(ResultsetRows tuples,
JdbcConnection conn,
StatementImpl creatorStmt)
Creates a new ResultSet object.
|
| Modifier and Type | Field and Description |
|---|---|
private JdbcConnection |
CharsetRegressionTest.TestBug64205QueryInterceptor.connection |
private JdbcConnection |
ConnectionRegressionTest.Bug75168QueryInterceptor.connection |
private JdbcConnection |
ConnectionRegressionTest.Bug56100QueryInterceptor.connection |
| Modifier and Type | Method and Description |
|---|---|
ConnectionImpl |
ConnectionRegressionTest.ForcedLoadBalanceStrategy.pickConnection(java.lang.reflect.InvocationHandler proxy,
java.util.List<java.lang.String> configuredHosts,
java.util.Map<java.lang.String,JdbcConnection> liveConnections,
long[] responseTimes,
int numRetries) |
ConnectionImpl |
ConnectionRegressionTest.CountingReBalanceStrategy.pickConnection(java.lang.reflect.InvocationHandler proxy,
java.util.List<java.lang.String> configuredHosts,
java.util.Map<java.lang.String,JdbcConnection> liveConnections,
long[] responseTimes,
int numRetries) |