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

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

?? statement.java

?? mysql jdbc驅動程序 mysql jdbc驅動程序 mysql jdbc驅動程序 mysql jdbc驅動程序
?? 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 com.mysql.jdbc.exceptions.MySQLTimeoutException;import com.mysql.jdbc.profiler.ProfileEventSink;import com.mysql.jdbc.profiler.ProfilerEvent;import com.mysql.jdbc.util.LRUCache;import java.sql.DataTruncation;import java.sql.SQLException;import java.sql.SQLWarning;import java.sql.Types;import java.util.ArrayList;import java.util.Calendar;import java.util.GregorianCalendar;import java.util.HashMap;import java.util.Iterator;import java.util.List;import java.util.Locale;import java.util.TimerTask;/** * A Statement object is used for executing a static SQL statement and obtaining * the results produced by it. *  * <p> * Only one ResultSet per Statement can be open at any point in time. Therefore, * if the reading of one ResultSet is interleaved with the reading of another, * each must have been generated by different Statements. All statement execute * methods implicitly close a statement's current ResultSet if an open one * exists. * </p> *  * @author Mark Matthews * @version $Id: Statement.java 4624 2005-11-28 14:24:29 -0600 (Mon, 28 Nov *          2005) mmatthews $ *  * @see java.sql.Statement * @see ResultSet */public class Statement implements java.sql.Statement {	protected static final String PING_MARKER = "/* ping */";	/**	 * Thread used to implement query timeouts...Eventually we could be more	 * efficient and have one thread with timers, but this is a straightforward	 * and simple way to implement a feature that isn't used all that often.	 */	class CancelTask extends TimerTask {		long connectionId = 0;		SQLException caughtWhileCancelling = null;				CancelTask() throws SQLException {			connectionId = connection.getIO().getThreadId();		}		public void run() {			Thread cancelThread = new Thread() {				public void run() {					Connection cancelConn = null;					java.sql.Statement cancelStmt = null;					try {						synchronized (cancelTimeoutMutex) {							cancelConn = connection.duplicate();							cancelStmt = cancelConn.createStatement();							cancelStmt.execute("KILL QUERY " + connectionId);							wasCancelled = true;						}					} catch (SQLException sqlEx) {						caughtWhileCancelling = sqlEx;					} catch (NullPointerException npe) {						// Case when connection closed while starting to cancel						// We can't easily synchronize this, because then one thread						// can't cancel() a running query												// ignore, we shouldn't re-throw this, because the connection's						// already closed, so the statement has been timed out.					} finally {						if (cancelStmt != null) {							try {								cancelStmt.close();							} catch (SQLException sqlEx) {								throw new RuntimeException(sqlEx.toString());							}						}						if (cancelConn != null) {							try {								cancelConn.close();							} catch (SQLException sqlEx) {								throw new RuntimeException(sqlEx.toString());							}						}					}				}			};			cancelThread.start();		}	}		/** Mutex to prevent race between returning query results and noticing    that we're timed-out or cancelled. */	protected Object cancelTimeoutMutex = new Object();	/** Used to generate IDs when profiling. */	protected static int statementCounter = 1;	public final static byte USES_VARIABLES_FALSE = 0;	public final static byte USES_VARIABLES_TRUE = 1;	public final static byte USES_VARIABLES_UNKNOWN = -1;	protected boolean wasCancelled = false;	/** Holds batched commands */	protected List batchedArgs;	/** The character converter to use (if available) */	protected SingleByteCharsetConverter charConverter = null;	/** The character encoding to use (if available) */	protected String charEncoding = null;	/** The connection that created us */	protected Connection connection = null;		protected long connectionId = 0;	/** The catalog in use */	protected String currentCatalog = null;	/** Should we process escape codes? */	protected boolean doEscapeProcessing = true;	/** If we're profiling, where should events go to? */	protected ProfileEventSink eventSink = null;	/** The number of rows to fetch at a time (currently ignored) */	private int fetchSize = 0;	/** Has this statement been closed? */	protected boolean isClosed = false;	/** The auto_increment value for the last insert */	protected long lastInsertId = -1;	/** The max field size for this statement */	protected int maxFieldSize = MysqlIO.getMaxBuf();	/**	 * The maximum number of rows to return for this statement (-1 means _all_	 * rows)	 */	protected int maxRows = -1;	/** Has someone changed this for this statement? */	protected boolean maxRowsChanged = false;	/** List of currently-open ResultSets */	protected List openResults = new ArrayList();	/** Are we in pedantic mode? */	protected boolean pedantic = false;	/**	 * Where this statement was created, only used if profileSql or	 * useUsageAdvisor set to true.	 */	protected Throwable pointOfOrigin;	/** Should we profile? */	protected boolean profileSQL = false;	/** The current results */	protected ResultSet results = null;	/** The concurrency for this result set (updatable or not) */	protected int resultSetConcurrency = 0;	/** The type of this result set (scroll sensitive or in-sensitive) */	protected int resultSetType = 0;	/** Used to identify this statement when profiling. */	protected int statementId;	/** The timeout for a query */	protected int timeoutInMillis = 0;	/** The update count for this statement */	protected long updateCount = -1;	/** Should we use the usage advisor? */	protected boolean useUsageAdvisor = false;	/** The warnings chain. */	protected SQLWarning warningChain = null;	/**	 * Should this statement hold results open over .close() irregardless of	 * connection's setting?	 */	protected boolean holdResultsOpenOverClose = false;	protected ArrayList batchedGeneratedKeys = null;	protected boolean retrieveGeneratedKeys = false;	protected boolean continueBatchOnError = false;		protected PingTarget pingTarget = null;			/**	 * Constructor for a Statement.	 * 	 * @param c	 *            the Connection instantation that creates us	 * @param catalog	 *            the database name in use when we were created	 * 	 * @throws SQLException	 *             if an error occurs.	 */	public Statement(Connection c, String catalog) throws SQLException {		if ((c == null) || c.isClosed()) {			throw SQLError.createSQLException(					Messages.getString("Statement.0"), //$NON-NLS-1$					SQLError.SQL_STATE_CONNECTION_NOT_OPEN); //$NON-NLS-1$ //$NON-NLS-2$		}		this.connection = c;		this.connectionId = this.connection.getId();				this.currentCatalog = catalog;		this.pedantic = this.connection.getPedantic();		this.continueBatchOnError = this.connection.getContinueBatchOnError();				if (!this.connection.getDontTrackOpenResources()) {			this.connection.registerStatement(this);		}		//		// Adjust, if we know it		//		if (this.connection != null) {			this.maxFieldSize = this.connection.getMaxAllowedPacket();			int defaultFetchSize = this.connection.getDefaultFetchSize();			if (defaultFetchSize != 0) {				setFetchSize(defaultFetchSize);			}		}		if (this.connection.getUseUnicode()) {			this.charEncoding = this.connection.getEncoding();			this.charConverter = this.connection					.getCharsetConverter(this.charEncoding);		}		boolean profiling = this.connection.getProfileSql()				|| this.connection.getUseUsageAdvisor();		if (this.connection.getAutoGenerateTestcaseScript() || profiling) {			this.statementId = statementCounter++;		}		if (profiling) {			this.pointOfOrigin = new Throwable();			this.profileSQL = this.connection.getProfileSql();			this.useUsageAdvisor = this.connection.getUseUsageAdvisor();			this.eventSink = ProfileEventSink.getInstance(this.connection);		}		int maxRowsConn = this.connection.getMaxRows();		if (maxRowsConn != -1) {			setMaxRows(maxRowsConn);		}	}	/**	 * DOCUMENT ME!	 * 	 * @param sql	 *            DOCUMENT ME!	 * 	 * @throws SQLException	 *             DOCUMENT ME!	 */	public synchronized void addBatch(String sql) throws SQLException {		if (this.batchedArgs == null) {			this.batchedArgs = new ArrayList();		}		if (sql != null) {			this.batchedArgs.add(sql);		}	}	/**	 * Cancels this Statement object if both the DBMS and driver support	 * aborting an SQL statement. This method can be used by one thread to	 * cancel a statement that is being executed by another thread.	 */	public void cancel() throws SQLException {		if (!this.isClosed &&				this.connection != null && 				this.connection.versionMeetsMinimum(5, 0, 0)) {			Connection cancelConn = null;			java.sql.Statement cancelStmt = null;			try {				synchronized (this.cancelTimeoutMutex) {					cancelConn = this.connection.duplicate();					cancelStmt = cancelConn.createStatement();					cancelStmt.execute("KILL QUERY "							+ this.connection.getIO().getThreadId());					this.wasCancelled = true;				}			} catch (NullPointerException npe) {				// Case when connection closed while starting to cancel				// We can't easily synchronize this, because then one thread				// can't cancel() a running query								throw SQLError.createSQLException(Messages						.getString("Statement.49"), //$NON-NLS-1$						SQLError.SQL_STATE_CONNECTION_NOT_OPEN); //$NON-NLS-1$			} finally {				if (cancelStmt != null) {					cancelStmt.close();				}				if (cancelConn != null) {					cancelConn.close();				}			}		}	}	// --------------------------JDBC 2.0-----------------------------	/**	 * Checks if closed() has been called, and throws an exception if so	 * 	 * @throws SQLException	 *             if this statement has been closed	 */	protected void checkClosed() throws SQLException {		if (this.isClosed) {			throw SQLError.createSQLException(Messages					.getString("Statement.49"), //$NON-NLS-1$					SQLError.SQL_STATE_CONNECTION_NOT_OPEN); //$NON-NLS-1$		}	}	/**	 * Checks if the given SQL query with the given first non-ws char is a DML	 * statement. Throws an exception if it is.	 * 	 * @param sql	 *            the SQL to check	 * @param firstStatementChar	 *            the UC first non-ws char of the statement	 * 	 * @throws SQLException	 *             if the statement contains DML	 */	protected void checkForDml(String sql, char firstStatementChar)			throws SQLException {		if ((firstStatementChar == 'I') || (firstStatementChar == 'U')				|| (firstStatementChar == 'D') || (firstStatementChar == 'A')				|| (firstStatementChar == 'C')) {			String noCommentSql = StringUtils.stripComments(sql,					"'\"", "'\"", true, false, true, true);						if (StringUtils.startsWithIgnoreCaseAndWs(noCommentSql, "INSERT") //$NON-NLS-1$					|| StringUtils.startsWithIgnoreCaseAndWs(noCommentSql, "UPDATE") //$NON-NLS-1$					|| StringUtils.startsWithIgnoreCaseAndWs(noCommentSql, "DELETE") //$NON-NLS-1$					|| StringUtils.startsWithIgnoreCaseAndWs(noCommentSql, "DROP") //$NON-NLS-1$					|| StringUtils.startsWithIgnoreCaseAndWs(noCommentSql, "CREATE") //$NON-NLS-1$					|| StringUtils.startsWithIgnoreCaseAndWs(noCommentSql, "ALTER")) { //$NON-NLS-1$				throw SQLError.createSQLException(Messages						.getString("Statement.57"), //$NON-NLS-1$						SQLError.SQL_STATE_ILLEGAL_ARGUMENT); //$NON-NLS-1$			}		}	}	/**	 * Method checkNullOrEmptyQuery.	 * 	 * @param sql	 *            the SQL to check	 * 	 * @throws SQLException	 *             if query is null or empty.	 */	protected void checkNullOrEmptyQuery(String sql) throws SQLException {		if (sql == null) {			throw SQLError.createSQLException(Messages					.getString("Statement.59"), //$NON-NLS-1$					SQLError.SQL_STATE_ILLEGAL_ARGUMENT); //$NON-NLS-1$ //$NON-NLS-2$		}		if (sql.length() == 0) {			throw SQLError.createSQLException(Messages					.getString("Statement.61"), //$NON-NLS-1$					SQLError.SQL_STATE_ILLEGAL_ARGUMENT); //$NON-NLS-1$ //$NON-NLS-2$		}	}	/**	 * JDBC 2.0 Make the set of commands in the current batch empty. This method	 * is optional.	 * 	 * @exception SQLException	 *                if a database-access error occurs, or the driver does not	 *                support batch statements	 */	public synchronized void clearBatch() throws SQLException {		if (this.batchedArgs != null) {			this.batchedArgs.clear();		}	}	/**	 * After this call, getWarnings returns null until a new warning is reported	 * for this Statement.	 * 	 * @exception SQLException	 *                if a database access error occurs (why?)	 */	public void clearWarnings() throws SQLException {		this.warningChain = null;	}	/**	 * In many cases, it is desirable to immediately release a Statement's	 * database and JDBC resources instead of waiting for this to happen when it

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜精品久久久久久久99樱桃 | 国产精品系列在线观看| 在线91免费看| 日本少妇一区二区| 亚洲精品一区二区三区福利| 国产精品自产自拍| 中文字幕亚洲不卡| 欧美性猛交xxxx乱大交退制版 | 国产女同性恋一区二区| 成人黄色一级视频| 一区二区三区加勒比av| 91麻豆精品国产91久久久更新时间| 麻豆国产91在线播放| 欧美激情一二三区| 欧美日韩五月天| 国产精品综合在线视频| 综合欧美一区二区三区| 欧美丰满少妇xxxbbb| 国产一区二区导航在线播放| 综合亚洲深深色噜噜狠狠网站| 欧美日韩另类一区| 国产成人亚洲精品狼色在线| 一区二区三区四区蜜桃| 欧美一级片在线| 97精品超碰一区二区三区| 石原莉奈在线亚洲二区| 国产欧美日韩三区| 欧美日高清视频| 从欧美一区二区三区| 日韩黄色免费电影| 国产精品美女久久福利网站| 制服丝袜国产精品| av激情成人网| 国产一区二区三区免费播放| 亚洲一区成人在线| 国产校园另类小说区| 欧美日韩一级片在线观看| 国产91清纯白嫩初高中在线观看| 亚洲福利视频一区| 国产精品激情偷乱一区二区∴| 欧美一级爆毛片| 欧美性生活大片视频| 国产精品91一区二区| 日韩电影在线一区二区| 中文字幕亚洲欧美在线不卡| 精品av久久707| 欧美片在线播放| 91蝌蚪porny| 国产精品白丝av| 狠狠色伊人亚洲综合成人| 亚洲高清在线视频| 亚洲精品福利视频网站| 国产精品视频你懂的| 久久久五月婷婷| 精品黑人一区二区三区久久 | 日韩视频免费观看高清完整版 | 艳妇臀荡乳欲伦亚洲一区| 久久久久久久免费视频了| 91精品国产欧美日韩| 在线一区二区三区四区| 成人高清免费在线播放| 国产高清精品在线| 久久99国内精品| 蜜桃视频第一区免费观看| 亚洲成av人影院| 亚洲一区二区三区中文字幕| 亚洲男人的天堂在线aⅴ视频| 国产精品私人影院| 国产精品麻豆视频| 国产精品激情偷乱一区二区∴| 欧美激情一区在线| 国产精品入口麻豆九色| 亚洲国产精品t66y| 国产欧美一区二区精品秋霞影院| 久久久蜜桃精品| 中文天堂在线一区| 国产精品私房写真福利视频| 国产嫩草影院久久久久| 国产精品久久久久久久第一福利| 久久免费视频一区| 日本一区二区高清| 亚洲欧美日本韩国| 亚洲狠狠爱一区二区三区| 午夜不卡av免费| 久久国产麻豆精品| 国产福利电影一区二区三区| 成人综合激情网| 色诱视频网站一区| 欧美久久免费观看| 日韩精品一区二区三区视频播放| 精品成人在线观看| 欧美激情一区三区| 一区二区三区免费在线观看| 亚洲成av人片在线观看| 麻豆精品一区二区三区| 粉嫩aⅴ一区二区三区四区| 91丨porny丨蝌蚪视频| 欧美人伦禁忌dvd放荡欲情| 精品久久久久久久久久久久包黑料| 精品对白一区国产伦| 国产精品三级av| 亚瑟在线精品视频| 国产一区二区三区久久悠悠色av| 成人a级免费电影| 欧美群妇大交群中文字幕| www激情久久| 亚洲人精品午夜| 免费观看一级欧美片| 夫妻av一区二区| 欧美亚洲国产一卡| 久久精品夜色噜噜亚洲aⅴ| 一区二区三区资源| 久久成人免费网| 不卡免费追剧大全电视剧网站| 欧洲一区在线电影| 欧美mv和日韩mv国产网站| 中文字幕一区二区三区在线不卡 | 国产精品麻豆久久久| 午夜精品影院在线观看| 国产a视频精品免费观看| 欧美日韩另类国产亚洲欧美一级| 久久亚洲一区二区三区四区| 亚洲激情男女视频| 国产美女精品在线| 精品视频一区二区三区免费| 中文字幕第一页久久| 美女任你摸久久| 欧美在线一区二区| 国产精品国产三级国产普通话蜜臀| 日韩成人av影视| 在线欧美日韩精品| 日本一区二区成人| 精品在线观看免费| 在线观看91精品国产麻豆| 亚洲私人黄色宅男| 国产制服丝袜一区| 91精品国产综合久久蜜臀 | 欧美日韩国产片| 亚洲日本va午夜在线影院| 国产精一区二区三区| 91麻豆精品国产| 亚洲国产一区二区在线播放| 99久久99久久精品免费观看| 国产农村妇女毛片精品久久麻豆| 老司机午夜精品| 欧美日韩夫妻久久| 亚洲图片欧美视频| 欧美性生活一区| 国产精品午夜春色av| 国产欧美综合在线观看第十页| 久久精品男人的天堂| 麻豆精品在线播放| 欧美精选在线播放| 亚洲成人av一区二区三区| 色呦呦国产精品| 亚洲日本乱码在线观看| 成人国产免费视频| 亚洲欧洲一区二区在线播放| 成人小视频免费在线观看| 国产日本欧洲亚洲| 国产伦理精品不卡| 国产亚洲人成网站| 成人激情文学综合网| 欧美精彩视频一区二区三区| 国产一区二区剧情av在线| 欧美精品一区二区三区高清aⅴ| 精品一二三四区| 国产日产精品一区| 99精品久久只有精品| 日韩美女视频一区| 欧日韩精品视频| 日韩中文欧美在线| 精品久久久久久久一区二区蜜臀| 久久99国产精品免费网站| 久久久另类综合| 成人丝袜18视频在线观看| 中文字幕一区二区三区蜜月 | 成人性视频免费网站| 国产午夜精品久久久久久免费视 | 日本电影欧美片| 亚洲动漫第一页| 日韩欧美一级二级三级久久久 | 成人黄色小视频在线观看| 国产精品色哟哟网站| 在线观看日韩一区| 日韩高清一区二区| 久久久久久免费网| 日本高清无吗v一区| 日韩高清一区二区| 欧美国产激情二区三区| 色94色欧美sute亚洲线路一久 | 国产99精品国产| 亚洲精品你懂的| 欧美刺激脚交jootjob| 国产成人亚洲综合a∨婷婷图片| 亚洲人成小说网站色在线| 精品视频一区二区三区免费| 国产原创一区二区三区| 亚洲老妇xxxxxx| 精品91自产拍在线观看一区|