Logo Search packages:      
Sourcecode: mysql-connector-java version File versions

com::mysql::jdbc::MysqlIO Class Reference

List of all members.


Detailed Description

This class is used by Connection for communicating with the MySQL server.

Author:
Mark Matthews
Version:
Id
MysqlIO.java,v 1.32.4.109 2005/02/17 21:42:27 mmatthews Exp

See also:
java.sql.Connection

Definition at line 73 of file MysqlIO.java.


Public Member Functions

boolean hasLongColumnInfo ()
 MysqlIO (String host, int port, Properties props, String socketFactoryClassName, com.mysql.jdbc.Connection conn, int socketTimeout) throws IOException, SQLException

Protected Member Functions

void changeUser (String userName, String password, String database) throws SQLException
Buffer checkErrorPacket () throws SQLException
void checkForCharsetMismatch ()
void clearInputStream () throws SQLException
void dumpPacketRingBuffer () throws SQLException
void explainSlowQuery (byte[] querySQL, String truncatedQuery) throws SQLException
final void forceClose ()
long getLastPacketSentTimeMs ()
ResultSet getResultSet (Statement callingStatement, long columnCount, int maxRows, int resultSetType, int resultSetConcurrency, boolean streamResults, String catalog, boolean isBinaryEncoded, boolean unpackFieldInfo) throws SQLException
boolean isDataAvailable () throws SQLException
boolean isSetNeededForAutoCommitMode (boolean autoCommitFlag)
final Buffer readPacket () throws SQLException
void resetReadPacketSequence ()
final Field unpackField (Buffer packet, boolean extractDefaultValues) throws SQLException

Protected Attributes

long clientParam = 0
com.mysql.jdbc.Connection connection
String host = null
long lastPacketSentTimeMs = 0
int maxThreeBytes = 255 * 255 * 255
Socket mysqlConnection = null
InputStream mysqlInput = null
BufferedOutputStream mysqlOutput = null
int port = 3306
String seed
int serverCapabilities
int serverCharsetIndex
boolean useNewIo = false

Static Protected Attributes

static final int CLIENT_CONNECT_WITH_DB = 8
static final int CLIENT_RESERVED = 16384
static final int CLIENT_SECURE_CONNECTION = 32768
static final int CLIENT_SSL = 2048
static final int COMP_HEADER_LENGTH = 3
static final int HEADER_LENGTH = 4
static final int MAX_QUERY_SIZE_TO_EXPLAIN = 1024 * 1024
static final int MAX_QUERY_SIZE_TO_LOG = 1024
static final int MIN_COMPRESS_LEN = 50
static final int NULL_LENGTH = ~0
static final String ZERO_DATE_VALUE_MARKER = "0000-00-00"
static final String ZERO_DATETIME_VALUE_MARKER = "0000-00-00 00:00:00"

Package Functions

void closeStreamer (RowData streamer) throws SQLException
void doHandshake (String user, String password, String database) throws SQLException
String getHost ()
final int getServerMajorVersion ()
final int getServerMinorVersion ()
final int getServerSubMinorVersion ()
String getServerVersion ()
Buffer getSharedSendPacket ()
boolean isVersion (int major, int minor, int subminor)
final Object[] nextRow (Field[] fields, int columnCount, boolean isBinaryEncoded, int resultSetConcurrency) throws SQLException
final void quit () throws SQLException
ResultSet readAllResults (Statement callingStatement, int maxRows, int resultSetType, int resultSetConcurrency, boolean streamResults, String catalog, Buffer resultPacket, boolean isBinaryEncoded, long preSentColumnCount, boolean unpackFieldInfo) throws SQLException
void resetMaxBuf ()
void secureAuth411 (Buffer packet, int packLength, String user, String password, String database, boolean writeClientParams) throws SQLException
final void send (Buffer packet) throws SQLException
final Buffer sendCommand (int command, String extraData, Buffer queryPacket, boolean skipCheck, String extraDataCharEncoding) throws SQLException
final ResultSet sqlQueryDirect (Statement callingStatement, String query, String characterEncoding, Buffer queryPacket, int maxRows, Connection conn, int resultSetType, int resultSetConcurrency, boolean streamResults, String catalog, boolean unpackFieldInfo) throws Exception
boolean versionMeetsMinimum (int major, int minor, int subminor)

Static Package Functions

 [static initializer]
static int getMaxBuf ()

Package Attributes

byte protocolVersion = 0

Private Member Functions

int alignPacketSize (int a, int l)
com.mysql.jdbc.ResultSet buildResultSetWithRows (Statement callingStatement, String catalog, com.mysql.jdbc.Field[] fields, RowData rows, int resultSetType, int resultSetConcurrency, boolean isBinaryEncoded) throws SQLException
com.mysql.jdbc.ResultSet buildResultSetWithUpdates (Statement callingStatement, Buffer resultPacket) throws SQLException
Buffer checkErrorPacket (int command) throws SQLException
void checkForOutstandingStreamingData () throws SQLException
void checkPacketSequencing (byte multiPacketSeq) throws CommunicationsException
Buffer compressPacket (Buffer packet, int offset, int packetLen, int headerLength) throws SQLException
SocketFactory createSocketFactory () throws SQLException
void enqueuePacketForDebugging (boolean isPacketBeingSent, boolean isPacketReused, int sendLength, byte[] header, Buffer packet) throws SQLException
final void extractNativeEncodedColumn (Buffer binaryData, Field[] fields, int columnIndex, Object[] unpackedRowData) throws SQLException
Calendar getCalendarInstanceForSessionOrNew ()
void negotiateSSLConnection (String user, String password, String database, int packLength) throws SQLException, CommunicationsException
void readChannelFully (ByteBuffer buf, int length) throws IOException
final int readFully (InputStream in, byte[] b, int off, int len) throws IOException
final ResultSet readResultsForQueryOrUpdate (Statement callingStatement, int maxRows, int resultSetType, int resultSetConcurrency, boolean streamResults, String catalog, Buffer resultPacket, boolean isBinaryEncoded, long preSentColumnCount, boolean unpackFieldInfo) throws SQLException
final void readServerStatusForResultSets (Buffer rowPacket) throws SQLException
RowData readSingleRowSet (long columnCount, int maxRows, int resultSetConcurrency, boolean isBinaryEncoded, Field[] fields) throws SQLException
Buffer readViaChannel () throws IOException, SQLException
void reclaimLargeReusablePacket ()
void reclaimLargeSharedSendPacket ()
final Buffer reuseAndReadPacket (Buffer reuse) throws SQLException
Buffer reuseAndReadViaChannel (Buffer reuse) throws SQLException
void scanForAndThrowDataTruncation () throws SQLException
void secureAuth (Buffer packet, int packLength, String user, String password, String database, boolean writeClientParams) throws SQLException
final void send (Buffer packet, int packetLen) throws SQLException
final ResultSet sendFileToServer (Statement callingStatement, String fileName) throws SQLException
final void sendSplitPackets (Buffer packet) throws SQLException
final void sendSplitPacketsViaChannel (Buffer packet) throws SQLException
void sendViaChannel (Buffer packet, int packetLength) throws SQLException
final Object[] unpackBinaryResultSetRow (Field[] fields, Buffer binaryData, int resultSetConcurrency) throws SQLException
final void unpackNativeEncodedColumn (Buffer binaryData, Field[] fields, int columnIndex, Object[] unpackedRowData) throws SQLException

Static Private Member Functions

static final String getPacketDumpToLog (Buffer packetToDump, int packetLength)

Private Attributes

boolean binaryResultsAreUnpacked = true
ByteBuffer channelClearBuf
boolean checkPacketSequence = false
boolean colDecimalNeedsBump = false
Deflater deflater = null
boolean enablePacketDebug = false
boolean hadWarnings = false
boolean has41NewNewProt = false
boolean hasLongColumnInfo = false
boolean isInteractiveClient = false
SoftReference loadFileBufRef
boolean logSlowQueries = false
int maxAllowedPacket = 1024 * 1024
LinkedList packetDebugRingBuffer = null
byte[] packetHeaderBuf = new byte[4]
byte packetSequence = 0
boolean packetSequenceReset = false
boolean platformDbCharsetMatches = true
boolean profileSql = false
boolean queryBadIndexUsed = false
boolean queryNoIndexUsed = false
byte readPacketSequence = -1
Buffer reusablePacket = null
Buffer sendPacket = null
int serverMajorVersion = 0
int serverMinorVersion = 0
int serverStatus = 0
int serverSubMinorVersion = 0
String serverVersion = null
Calendar sessionCalendar
Buffer sharedSendPacket = null
SocketChannel socketChannel
SocketFactory socketFactory = null
String socketFactoryClassName = null
SoftReference splitBufRef
RowData streamingData = null
boolean traceProtocol = false
boolean use41Extensions = false
boolean useCompression = false
boolean useNewLargePackets = false
boolean useNewUpdateCounts = false
int warningCount = 0

Static Private Attributes

static final int CLIENT_COMPRESS = 32
static final int CLIENT_FOUND_ROWS = 2
static final int CLIENT_INTERACTIVE = 1024
static final int CLIENT_LOCAL_FILES = 128
static final int CLIENT_LONG_FLAG = 4
static final int CLIENT_LONG_PASSWORD = 1
static final int CLIENT_MULTI_QUERIES = 65536
static final int CLIENT_MULTI_RESULTS = 131072
static final int CLIENT_PROTOCOL_41 = 512
static final int CLIENT_TRANSACTIONS = 8192
static final String FALSE_SCRAMBLE = "xxxxxxxx"
static String jvmPlatformCharset = null
static final int MAX_PACKET_DUMP_LENGTH = 1024
static int maxBufferSize = 65535
static final int SERVER_MORE_RESULTS_EXISTS = 8
static final int SERVER_QUERY_NO_GOOD_INDEX_USED = 16
static final int SERVER_QUERY_NO_INDEX_USED = 32
static final int SERVER_STATUS_AUTOCOMMIT = 2
static final int SERVER_STATUS_IN_TRANS = 1

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index