亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? mysqlio.java

?? 用于JAVA數據庫連接.解壓就可用,方便得很
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
/*      Copyright (C) 2002-2007 MySQL AB      This program is free software; you can redistribute it and/or modify      it under the terms of version 2 of the GNU General Public License as      published by the Free Software Foundation.      There are special exceptions to the terms and conditions of the GPL      as it is applied to this software. View the full text of the      exception in file EXCEPTIONS-CONNECTOR-J in the directory of this      software distribution.      This program is distributed in the hope that it will be useful,      but WITHOUT ANY WARRANTY; without even the implied warranty of      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the      GNU General Public License for more details.      You should have received a copy of the GNU General Public License      along with this program; if not, write to the Free Software      Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */package com.mysql.jdbc;import java.io.BufferedInputStream;import java.io.BufferedOutputStream;import java.io.ByteArrayOutputStream;import java.io.EOFException;import java.io.FileInputStream;import java.io.IOException;import java.io.InputStream;import java.io.OutputStreamWriter;import java.lang.ref.SoftReference;import java.math.BigInteger;import java.net.MalformedURLException;import java.net.Socket;import java.net.URL;import java.security.NoSuchAlgorithmException;import java.sql.ResultSet;import java.sql.SQLException;import java.sql.Types;import java.util.ArrayList;import java.util.Calendar;import java.util.Iterator;import java.util.LinkedList;import java.util.List;import java.util.Properties;import java.util.zip.Deflater;import com.mysql.jdbc.profiler.ProfileEventSink;import com.mysql.jdbc.profiler.ProfilerEvent;import com.mysql.jdbc.util.ReadAheadInputStream;import com.mysql.jdbc.util.ResultSetUtil;/** * This class is used by Connection for communicating with the MySQL server. * * @author Mark Matthews * @version $Id: MysqlIO.java 6613 2007-10-04 16:56:05Z mmatthews $ * * @see java.sql.Connection */class MysqlIO {    private static final int UTF8_CHARSET_INDEX = 33;    private static final String CODE_PAGE_1252 = "Cp1252";	protected static final int NULL_LENGTH = ~0;    protected static final int COMP_HEADER_LENGTH = 3;    protected static final int MIN_COMPRESS_LEN = 50;    protected static final int HEADER_LENGTH = 4;    protected static final int AUTH_411_OVERHEAD = 33;    private static int maxBufferSize = 65535;    private static final int CLIENT_COMPRESS = 32; /* Can use compression    protcol */    protected static final int CLIENT_CONNECT_WITH_DB = 8;    private static final int CLIENT_FOUND_ROWS = 2;    private static final int CLIENT_LOCAL_FILES = 128; /* Can use LOAD DATA    LOCAL */    /* Found instead of       affected rows */    private static final int CLIENT_LONG_FLAG = 4; /* Get all column flags */    private static final int CLIENT_LONG_PASSWORD = 1; /* new more secure    passwords */    private static final int CLIENT_PROTOCOL_41 = 512; // for > 4.1.1    private static final int CLIENT_INTERACTIVE = 1024;    protected static final int CLIENT_SSL = 2048;    private static final int CLIENT_TRANSACTIONS = 8192; // Client knows about transactions    protected static final int CLIENT_RESERVED = 16384; // for 4.1.0 only    protected static final int CLIENT_SECURE_CONNECTION = 32768;    private static final int CLIENT_MULTI_QUERIES = 65536; // Enable/disable multiquery support    private static final int CLIENT_MULTI_RESULTS = 131072; // Enable/disable multi-results    private static final int SERVER_STATUS_IN_TRANS = 1;    private static final int SERVER_STATUS_AUTOCOMMIT = 2; // Server in auto_commit mode    private static final int SERVER_MORE_RESULTS_EXISTS = 8; // Multi query - next query exists    private static final int SERVER_QUERY_NO_GOOD_INDEX_USED = 16;    private static final int SERVER_QUERY_NO_INDEX_USED = 32;	private static final int  SERVER_STATUS_CURSOR_EXISTS = 64;    private static final String FALSE_SCRAMBLE = "xxxxxxxx"; //$NON-NLS-1$    protected static final int MAX_QUERY_SIZE_TO_LOG = 1024; // truncate logging of queries at 1K    protected static final int MAX_QUERY_SIZE_TO_EXPLAIN = 1024 * 1024; // don't explain queries above 1MB    protected static final int INITIAL_PACKET_SIZE = 1024;    /**     * We store the platform 'encoding' here, only used to avoid munging     * filenames for LOAD DATA LOCAL INFILE...     */    private static String jvmPlatformCharset = null;    /**     * We need to have a 'marker' for all-zero datetimes so that ResultSet     * can decide what to do based on connection setting     */    protected final static String ZERO_DATE_VALUE_MARKER = "0000-00-00";    protected final static String ZERO_DATETIME_VALUE_MARKER = "0000-00-00 00:00:00";    static {        OutputStreamWriter outWriter = null;        //        // Use the I/O system to get the encoding (if possible), to avoid        // security restrictions on System.getProperty("file.encoding") in        // applets (why is that restricted?)        //        try {            outWriter = new OutputStreamWriter(new ByteArrayOutputStream());            jvmPlatformCharset = outWriter.getEncoding();        } finally {            try {                if (outWriter != null) {                    outWriter.close();                }            } catch (IOException ioEx) {                // ignore            }        }    }    /** Max number of bytes to dump when tracing the protocol */    private final static int MAX_PACKET_DUMP_LENGTH = 1024;    private boolean packetSequenceReset = false;    protected int serverCharsetIndex;    //    // Use this when reading in rows to avoid thousands of new()    // calls, because the byte arrays just get copied out of the    // packet anyway    //    private Buffer reusablePacket = null;    private Buffer sendPacket = null;    private Buffer sharedSendPacket = null;    /** Data to the server */    protected BufferedOutputStream mysqlOutput = null;    protected ConnectionImpl connection;    private Deflater deflater = null;    protected InputStream mysqlInput = null;    private LinkedList packetDebugRingBuffer = null;    private RowData streamingData = null;    /** The connection to the server */    protected Socket mysqlConnection = null;    private SocketFactory socketFactory = null;    //    // Packet used for 'LOAD DATA LOCAL INFILE'    //    // We use a SoftReference, so that we don't penalize intermittent    // use of this feature    //    private SoftReference loadFileBufRef;    //    // Used to send large packets to the server versions 4+    // We use a SoftReference, so that we don't penalize intermittent    // use of this feature    //    private SoftReference splitBufRef;    protected String host = null;    protected String seed;    private String serverVersion = null;    private String socketFactoryClassName = null;    private byte[] packetHeaderBuf = new byte[4];    private boolean colDecimalNeedsBump = false; // do we need to increment the colDecimal flag?    private boolean hadWarnings = false;    private boolean has41NewNewProt = false;    /** Does the server support long column info? */    private boolean hasLongColumnInfo = false;    private boolean isInteractiveClient = false;    private boolean logSlowQueries = false;    /**     * Does the character set of this connection match the character set of the     * platform     */    private boolean platformDbCharsetMatches = true; // changed once we've connected.    private boolean profileSql = false;    private boolean queryBadIndexUsed = false;    private boolean queryNoIndexUsed = false;    /** Should we use 4.1 protocol extensions? */    private boolean use41Extensions = false;    private boolean useCompression = false;    private boolean useNewLargePackets = false;    private boolean useNewUpdateCounts = false; // should we use the new larger update counts?    private byte packetSequence = 0;    private byte readPacketSequence = -1;    private boolean checkPacketSequence = false;    private byte protocolVersion = 0;    private int maxAllowedPacket = 1024 * 1024;    protected int maxThreeBytes = 255 * 255 * 255;    protected int port = 3306;    protected int serverCapabilities;    private int serverMajorVersion = 0;    private int serverMinorVersion = 0;    private int serverStatus = 0;    private int serverSubMinorVersion = 0;    private int warningCount = 0;    protected long clientParam = 0;    protected long lastPacketSentTimeMs = 0;    private boolean traceProtocol = false;    private boolean enablePacketDebug = false;    private Calendar sessionCalendar;	private boolean useConnectWithDb;	private boolean needToGrabQueryFromPacket;	private boolean autoGenerateTestcaseScript;	private long threadId;	private boolean useNanosForElapsedTime;	private long slowQueryThreshold;	private String queryTimingUnits;	private List statementInterceptors;	private boolean useDirectRowUnpack = true;	private int useBufferRowSizeThreshold;    /**     * Constructor:  Connect to the MySQL server and setup a stream connection.     *     * @param host the hostname to connect to     * @param port the port number that the server is listening on     * @param props the Properties from DriverManager.getConnection()     * @param socketFactoryClassName the socket factory to use     * @param conn the Connection that is creating us     * @param socketTimeout the timeout to set for the socket (0 means no     *        timeout)     *     * @throws IOException if an IOException occurs during connect.     * @throws SQLException if a database access error occurs.     */    public MysqlIO(String host, int port, Properties props,        String socketFactoryClassName, ConnectionImpl conn,        int socketTimeout, int useBufferRowSizeThreshold) throws IOException, SQLException {        this.connection = conn;        if (this.connection.getEnablePacketDebug()) {            this.packetDebugRingBuffer = new LinkedList();        }        this.useAutoSlowLog = this.connection.getAutoSlowLog();                this.useBufferRowSizeThreshold = useBufferRowSizeThreshold;        this.useDirectRowUnpack = this.connection.getUseDirectRowUnpack();        this.logSlowQueries = this.connection.getLogSlowQueries();        this.reusablePacket = new Buffer(INITIAL_PACKET_SIZE);        this.sendPacket = new Buffer(INITIAL_PACKET_SIZE);        this.port = port;        this.host = host;        this.socketFactoryClassName = socketFactoryClassName;        this.socketFactory = createSocketFactory();        this.mysqlConnection = this.socketFactory.connect(this.host,        		this.port, props);        if (socketTimeout != 0) {        	try {        		this.mysqlConnection.setSoTimeout(socketTimeout);        	} catch (Exception ex) {        		/* Ignore if the platform does not support it */        	}        }        this.mysqlConnection = this.socketFactory.beforeHandshake();        if (this.connection.getUseReadAheadInput()) {        	this.mysqlInput = new ReadAheadInputStream(this.mysqlConnection.getInputStream(), 16384,        			this.connection.getTraceProtocol(),        			this.connection.getLog());        } else if (this.connection.useUnbufferedInput()) {        	this.mysqlInput = this.mysqlConnection.getInputStream();        } else {        	this.mysqlInput = new BufferedInputStream(this.mysqlConnection.getInputStream(),        			16384);        }        this.mysqlOutput = new BufferedOutputStream(this.mysqlConnection.getOutputStream(),        		16384);        this.isInteractiveClient = this.connection.getInteractiveClient();        this.profileSql = this.connection.getProfileSql();        this.sessionCalendar = Calendar.getInstance();        this.autoGenerateTestcaseScript = this.connection.getAutoGenerateTestcaseScript();        this.needToGrabQueryFromPacket = (this.profileSql ||        		this.logSlowQueries ||        		this.autoGenerateTestcaseScript);        if (this.connection.getUseNanosForElapsedTime()				&& Util.nanoTimeAvailable()) {			this.useNanosForElapsedTime = true;			this.queryTimingUnits = Messages.getString("Nanoseconds");		} else {			this.queryTimingUnits = Messages.getString("Milliseconds");		}		if (this.connection.getLogSlowQueries()) {			calculateSlowQueryThreshold();		}    }    protected void initializeStatementInterceptors(String interceptorClasses,			Properties props) throws SQLException {		this.statementInterceptors = Util.loadExtensions(this.connection, props, 				interceptorClasses,				"MysqlIo.BadStatementInterceptor");	}    /**	 * Does the server send back extra column info?	 * 	 * @return true if so	 */    public boolean hasLongColumnInfo() {        return this.hasLongColumnInfo;    }    protected boolean isDataAvailable() throws SQLException {        try {            return this.mysqlInput.available() > 0;        } catch (IOException ioEx) {            throw SQLError.createCommunicationsException(this.connection,                this.lastPacketSentTimeMs, ioEx);        }    }    /**     * DOCUMENT ME!     *     * @return Returns the lastPacketSentTimeMs.     */    protected long getLastPacketSentTimeMs() {        return this.lastPacketSentTimeMs;    }    /**     * Build a result set. Delegates to buildResultSetWithRows() to build a     * JDBC-version-specific ResultSet, given rows as byte data, and field     * information.     *     * @param callingStatement DOCUMENT ME!     * @param columnCount the number of columns in the result set     * @param maxRows the maximum number of rows to read (-1 means all rows)     * @param resultSetType (TYPE_FORWARD_ONLY, TYPE_SCROLL_????)     * @param resultSetConcurrency the type of result set (CONCUR_UPDATABLE or     *        READ_ONLY)     * @param streamResults should the result set be read all at once, or     *        streamed?     * @param catalog the database name in use when the result set was created     * @param isBinaryEncoded is this result set in native encoding?     * @param unpackFieldInfo should we read MYSQL_FIELD info (if available)?     *     * @return a result set     *     * @throws SQLException if a database access error occurs     */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美xxx久久| 激情综合网最新| 国产大陆a不卡| 精品国产伦一区二区三区观看体验| 日韩中文字幕亚洲一区二区va在线| 另类小说综合欧美亚洲| 欧美日韩精品免费观看视频 | 国产精品88av| 国产精品嫩草99a| 不卡一区二区中文字幕| 亚洲国产精品ⅴa在线观看| 成人免费高清视频在线观看| 中文子幕无线码一区tr| 99riav久久精品riav| 一级特黄大欧美久久久| 国产午夜精品理论片a级大结局| 色综合天天综合色综合av| 免费在线观看不卡| 国产欧美精品一区二区色综合朱莉| fc2成人免费人成在线观看播放| 日韩av一级片| 樱桃视频在线观看一区| 精品乱码亚洲一区二区不卡| 91视频91自| 美女免费视频一区二区| 国产精品久久三区| 欧美日韩在线播| 成人激情动漫在线观看| 免费一区二区视频| 日日夜夜精品视频免费| 国产精品二区一区二区aⅴ污介绍| 6080yy午夜一二三区久久| 欧美在线观看一二区| 国产一区二区三区精品欧美日韩一区二区三区 | 欧美一区二区视频网站| 国产sm精品调教视频网站| 首页综合国产亚洲丝袜| 国产精品成人免费精品自在线观看| 91国偷自产一区二区使用方法| 久久国产精品72免费观看| 精品久久久久香蕉网| 欧美日韩不卡一区| 99v久久综合狠狠综合久久| 国产一区二区三区美女| 久久99精品国产91久久来源| 4hu四虎永久在线影院成人| 91小视频在线免费看| 国产乱人伦偷精品视频不卡| 精品一区二区久久久| 精品美女在线播放| 欧美成人欧美edvon| 欧美日韩电影一区| 欧美日韩一区二区在线视频| 色噜噜偷拍精品综合在线| 9人人澡人人爽人人精品| 成人av资源在线观看| 蜜桃av一区二区| 免费美女久久99| 国产成人欧美日韩在线电影| 国产一区二区视频在线播放| 香蕉成人伊视频在线观看| 亚洲一区二区免费视频| 亚洲亚洲精品在线观看| 蜜臀av在线播放一区二区三区| 日韩高清一区在线| 久久精品99国产精品日本| 午夜精品久久久久久久| 亚洲国产精品视频| 首页综合国产亚洲丝袜| 国产一区二区网址| 豆国产96在线|亚洲| 欧美三级日韩在线| 精品少妇一区二区三区视频免付费| 这里只有精品电影| 2020国产精品| 亚洲精品日日夜夜| 蜜桃精品在线观看| 99久久精品免费看国产免费软件| 69p69国产精品| 日韩一区在线免费观看| 亚洲成人av电影在线| 亚洲综合偷拍欧美一区色| 国产美女一区二区三区| 国产一二三精品| 色94色欧美sute亚洲线路一久| 欧美美女黄视频| 一区二区三区成人| 成人h版在线观看| 国产农村妇女毛片精品久久麻豆| 99国产一区二区三精品乱码| 日韩三级.com| 精品一区二区三区免费播放| 欧美最猛性xxxxx直播| 国产成人鲁色资源国产91色综| 欧美影院一区二区三区| 欧美一卡二卡三卡| 亚洲国产精品国自产拍av| 国产美女精品在线| 午夜精品久久久久久久久久| 色婷婷综合久久久| 亚洲一线二线三线视频| 欧美制服丝袜第一页| 一区二区三区欧美激情| 欧美美女一区二区| 午夜电影一区二区三区| 欧美日韩在线电影| 亚洲高清在线视频| 欧美成人性福生活免费看| 午夜精品福利在线| 欧美一区二区黄色| 久久激情综合网| 亚洲国产精品黑人久久久| 91小视频在线观看| 亚洲成人福利片| 欧美日韩在线直播| 国产精品一级黄| 亚洲精品福利视频网站| 日韩视频国产视频| 国产福利一区二区三区视频在线 | 久久99精品国产91久久来源| 国产精品久久久久婷婷二区次| 欧美三级在线播放| 免费日韩伦理电影| 中文字幕高清一区| 7777精品伊人久久久大香线蕉超级流畅 | 视频一区中文字幕| 久久久久久久久蜜桃| 色婷婷综合久久久中文字幕| 亚洲一二三区在线观看| 久久久久久久综合日本| 日本福利一区二区| 国产精品资源网| 亚洲成人免费av| 国产精品视频一二三| 欧美日韩一级视频| 色婷婷久久久亚洲一区二区三区| 精品无码三级在线观看视频| 亚洲嫩草精品久久| 国产精品私人影院| 日韩午夜电影av| 欧美日韩一区二区电影| 国产mv日韩mv欧美| 久久精品国产精品青草| 一区二区三区四区在线播放| 久久毛片高清国产| 欧美一级理论片| 欧美精品久久99久久在免费线| 91福利国产成人精品照片| 风流少妇一区二区| 国产一区二区三区在线观看免费| 亚洲高清免费一级二级三级| 亚洲精品久久7777| 亚洲最大成人网4388xx| 中文字幕色av一区二区三区| 国产精品―色哟哟| 亚洲三级电影全部在线观看高清| 亚洲欧洲av在线| 一区二区视频在线| 亚洲欧美日韩国产中文在线| 亚洲女同女同女同女同女同69| 亚洲欧美国产77777| 亚洲影视在线播放| 日韩国产欧美视频| 久久精品国产澳门| 成人午夜免费视频| 欧美私人免费视频| 欧美一区二区三区婷婷月色| 日韩午夜激情电影| 中文字幕精品一区二区精品绿巨人| 日本一区二区三区久久久久久久久不| 久久先锋影音av鲁色资源网| 亚洲欧美一区二区久久 | 日韩视频免费观看高清完整版在线观看| 在线成人高清不卡| 日韩精品一区国产麻豆| 国产日韩欧美综合一区| 亚洲三级免费观看| 国内久久婷婷综合| 日本高清不卡在线观看| 日韩精品一区二区三区蜜臀 | 精品免费日韩av| 一区二区三区产品免费精品久久75| 亚洲国产综合在线| 福利91精品一区二区三区| 日韩女同互慰一区二区| 亚洲美女视频在线观看| 午夜精品一区二区三区免费视频| 国产一区二区91| 制服视频三区第一页精品| 亚洲欧洲在线观看av| 一区二区久久久久| 成人av综合一区| 久久综合国产精品| 久久激五月天综合精品| 91精品国产综合久久精品| 亚洲免费在线观看视频| 国产91丝袜在线18| 91网页版在线| 亚洲国产精品久久艾草纯爱| 色婷婷综合五月|