| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private int | |
| protected static final int | |
| protected CompressedPacketSender | compressedPacketSender
Track this to manually shut down. |
| pack-priv static Map | |
| private static final String | |
| private static final String[] | |
| protected boolean | |
| protected static final int | |
| private SoftReference | loadFileBufRef
Packet used for 'LOAD DATA LOCAL INFILE' We use a SoftReference, so that we don't penalize intermittent use of this feature |
| private InputStream | |
| private boolean | |
| private RuntimeProperty | |
| protected static final int | |
| private RuntimeProperty | |
| private RuntimeProperty | |
| private BaseMetricsHolder | |
| private NativeMessageBuilder | |
| protected MessageReader | |
| protected MessageSender | |
| protected byte | |
| private boolean | |
| protected Map | |
| protected Map | |
| private List | |
| protected NativePacketPayload | reusablePacket
Use this when reading in rows to avoid thousands of new() calls, because the byte arrays just get copied out of the packet anyway |
| protected NativeServerSession | |
| protected NativePacketPayload | |
| private long | |
| protected static final int | |
| private int | |
| private ResultsetRows | |
| private boolean | |
| protected boolean | |
| private RuntimeProperty | |
| private int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| private int | |
| private void | |
| private StringBuilder | |
| public void | applyPacketDecorators(MessageSender<NativePacketPayload> sender, MessageReader<NativePacketHeader, NativePacketPayload> messageReader)
Apply optional decorators to configured PacketSender and PacketReader. |
| public void | |
| private void | |
| public void | |
| public void | changeUser(String
user name user, String password password, String database name database)Implements com. Re-authenticates as the given user and password |
| public NativePacketPayload | checkErrorMessage()
Implements com. Read one message from the MySQL server, checks for errors in it, and if none, returns the message, ready for reading |
| private NativePacketPayload | Returns: NativePacketPayloadthe command being issued (if used) command)Checks for errors in the reply packet, and if none, returns the reply packet, ready for reading |
| public void | |
| private void | |
| public void | |
| public void | |
| public void | |
| public void | configureTimeZone()
Implements com. Configures the client's timezone if required. |
| public void | connect(String
DB user name user, String DB user password password, String database name database)Implements com. Create a new session. |
| public SQLWarning | Returns: the SQLWarning chain (or null if no warnings)if this method should only scan for data truncation warnings forTruncationOnly)Turns output of 'SHOW WARNINGS' into JDBC SQLWarning instances. |
| public void | |
| public void | explainSlowQuery(String
full query string query, String query string truncated for profiling truncatedQuery)Runs an 'EXPLAIN' on the given query and dumps the results to the log |
| public static MysqlType | findMysqlType(PropertySet propertySet, int mysqlTypeId, short colFlag, long length, LazyString tableName, LazyString originalTableName, int collationIndex, String encoding)
|
| public StringBuilder | |
| public int | |
| public long | |
| private BufferedInputStream | |
| public static NativeProtocol | getInstance(Session session, SocketConnection socketConnection, PropertySet propertySet, Log log, TransactionEventHandler transactionManager)
|
| public InputStream | getLocalInfileInputStream()
Implements com. Returns the InputStream instance that will be used to send data in response to a "LOAD DATA LOCAL INFILE" statement. |
| public MessageBuilder | |
| public BaseMetricsHolder | |
| private NativeMessageBuilder | |
| public MessageReader | |
| public MessageSender | |
| public List | |
| public NativePacketPayload | |
| public NativeServerSession | |
| public Session | |
| public NativePacketPayload | Returns: A packet to send data withReturns the packet used for sending data (used by PreparedStatement) with position set to 0. |
| public long | |
| public ResultsetRows | |
| public Supplier | |
| public int | |
| public boolean | |
| public void | |
| public void | init(Session sess, SocketConnection phConnection, PropertySet propSet, TransactionEventHandler trManager)
Overrides com. Implements com. Init method takes the place of constructor. |
| public void | |
| public <T extends Resultset> T | invokeQueryInterceptorsPost(Supplier<String> sql, Query interceptedQuery, T originalResultSet, boolean forceExecute)
|
| public < extends M extends Message> MMessage | Returns: T instanceNativePacketPayload containing queryNativePacketPayload containing responsecurrently ignored forceExecute)
|
| public <T extends Resultset> T | |
| public < extends M extends Message> MMessage | Returns: M instanceNativePacketPayload containing querycurrently ignored forceExecute)
|
| protected boolean | |
| public void | negotiateSSLConnection()
Implements com. Negotiates the SSL communication channel used when connecting to a MySQL server that has SSL enabled. |
| public final NativePacketPayload | |
| public final void | |
| public <T extends ProtocolEntity> T | read(Class<T> requiredClass, ProtocolEntityFactory<T, NativePacketPayload> protocolEntityFactory)
Implements com.
|
| public <T extends ProtocolEntity> T | read(Class<Resultset>
required Resultset class requiredClass, int the maximum number of rows to read (-1 means all rows) maxRows, boolean should the driver leave the results on the wire,
and read them only when needed? streamResults, NativePacketPayload the first packet of information in the result set resultPacket, boolean true if the binary protocol is used (for server prepared statements) isBinaryEncoded, ColumnDefinition use this metadata instead of the one provided on wire metadata, ProtocolEntityFactory<T, NativePacketPayload> ProtocolEntityFactory instanceImplements com. Read protocol entity. |
| public <T extends Resultset> T | readAllResults(int maxRows, boolean streamResults, NativePacketPayload resultPacket, boolean isBinaryEncoded, ColumnDefinition metadata, ProtocolEntityFactory<T, NativePacketPayload> resultSetFactory)
|
| public final NativePacketPayload | readMessage(NativePacketPayload
Message instance to read into, may be nullImplements com. Read one message from the MySQL server into the reusable buffer if provided or into the new one. |
| public ColumnDefinition | |
| public < extends T extends ProtocolEntity> TProtocolEntity | Returns: T instanceT instance currentProtocolEntity, int rows limit maxRows, boolean whether a stream result should be created streamResults, boolean true for binary protocol isBinaryEncoded, ProtocolEntityFactory<T, NativePacketPayload> resultSetFactory)Read next result set from multi-result chain. |
| public <T extends QueryResult> T | readQueryResult(ResultBuilder<T>
ResultBuilder instanceImplements com. Read messages from server and deliver them to resultBuilder. |
| public NativeCapabilities | readServerCapabilities()
Implements com. Retrieve ServerCapabilities from server. |
| public final <T> T | |
| public void | |
| private void | |
| public void | |
| public void | |
| public void | |
| public final void | send(Message packet, int
length of header + payload packetLen)Implements com.
|
| public final NativePacketPayload | sendCommand(Message
a packet pre-loaded with data for the protocol (eg.
from a client-side prepared statement). The first byte of
this packet is the MySQL protocol 'command' from MysqlDefs queryPacket, boolean do not call checkErrorPacket() if true skipCheck, int timeout timeoutMillis)Implements com. Send a command to the MySQL server. |
| public final NativePacketPayload | Returns: NativePacketPayloadthe file name to send. fileName)Reads and sends a file to the server for LOAD DATA LOCAL INFILE |
| public final < extends T extends Resultset> TResultset | Returns: T instanceNativePacketPayload containing queryrows limit maxRows, boolean whether a stream result should be created streamResults, ColumnDefinition use this metadata instead of the one provided on wire cachedMetadata, ProtocolEntityFactory<T, NativePacketPayload> resultSetFactory)Send a query stored in a packet to the server. |
| public void | |
| public void | setLocalInfileInputStream(InputStream
input stream stream)Implements com. Sets an InputStream instance that will be used to send data to the MySQL server for a "LOAD DATA LOCAL INFILE" statement rather than a FileInputStream or URLInputStream that represents the path given as an argument to the statement. |
| public void | |
| public void | |
| public void | |
| public void | |
| public final void | |
| public void | |
| protected boolean | |
| public boolean | versionMeetsMinimum(int major, int minor, int subminor)
Implements com.
|