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

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

?? connectionimpl.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.IOException;import java.io.UnsupportedEncodingException;import java.lang.reflect.Array;import java.lang.reflect.Constructor;import java.lang.reflect.Method;import java.sql.Blob;import java.sql.DatabaseMetaData;import java.sql.SQLException;import java.sql.SQLWarning;import java.sql.Savepoint;import java.util.ArrayList;import java.util.Calendar;import java.util.GregorianCalendar;import java.util.HashMap;import java.util.Iterator;import java.util.LinkedList;import java.util.List;import java.util.Locale;import java.util.Map;import java.util.Properties;import java.util.Stack;import java.util.StringTokenizer;import java.util.TimeZone;import java.util.Timer;import java.util.TreeMap;import com.mysql.jdbc.log.Log;import com.mysql.jdbc.log.LogFactory;import com.mysql.jdbc.log.NullLogger;import com.mysql.jdbc.profiler.ProfileEventSink;import com.mysql.jdbc.profiler.ProfilerEvent;import com.mysql.jdbc.util.LRUCache;/** * A Connection represents a session with a specific database. Within the * context of a Connection, SQL statements are executed and results are * returned. * <P> * A Connection's database is able to provide information describing its tables, * its supported SQL grammar, its stored procedures, the capabilities of this * connection, etc. This information is obtained with the getMetaData method. * </p> *  * @author Mark Matthews * @version $Id: ConnectionImpl.java 6613 2007-10-04 16:56:05Z mmatthews $ * @see java.sql.Connection */public class ConnectionImpl extends ConnectionPropertiesImpl implements		Connection {	private static final String JDBC_LOCAL_CHARACTER_SET_RESULTS = "jdbc.local.character_set_results";		/**	 * Used as a key for caching callable statements which (may) depend on	 * current catalog...In 5.0.x, they don't (currently), but stored procedure	 * names soon will, so current catalog is a (hidden) component of the name.	 */	class CompoundCacheKey {		String componentOne;		String componentTwo;		int hashCode;		CompoundCacheKey(String partOne, String partTwo) {			this.componentOne = partOne;			this.componentTwo = partTwo;			// Handle first component (in most cases, currentCatalog)			// being NULL....			this.hashCode = (((this.componentOne != null) ? this.componentOne					: "") + this.componentTwo).hashCode();		}		/*		 * (non-Javadoc)		 * 		 * @see java.lang.Object#equals(java.lang.Object)		 */		public boolean equals(Object obj) {			if (obj instanceof CompoundCacheKey) {				CompoundCacheKey another = (CompoundCacheKey) obj;				boolean firstPartEqual = false;				if (this.componentOne == null) {					firstPartEqual = (another.componentOne == null);				} else {					firstPartEqual = this.componentOne							.equals(another.componentOne);				}				return (firstPartEqual && this.componentTwo						.equals(another.componentTwo));			}			return false;		}		/*		 * (non-Javadoc)		 * 		 * @see java.lang.Object#hashCode()		 */		public int hashCode() {			return this.hashCode;		}	}	/**	 * Marker for character set converter not being available (not written,	 * multibyte, etc) Used to prevent multiple instantiation requests.	 */	private static final Object CHARSET_CONVERTER_NOT_AVAILABLE_MARKER = new Object();	/**	 * The mapping between MySQL charset names and Java charset names.	 * Initialized by loadCharacterSetMapping()	 */	public static Map charsetMap;	/** Default logger class name */	protected static final String DEFAULT_LOGGER_CLASS = "com.mysql.jdbc.log.StandardLogger";	private final static int HISTOGRAM_BUCKETS = 20;	/** Logger instance name */	private static final String LOGGER_INSTANCE_NAME = "MySQL";	/**	 * Map mysql transaction isolation level name to	 * java.sql.Connection.TRANSACTION_XXX	 */	private static Map mapTransIsolationNameToValue = null;	/** Null logger shared by all connections at startup */	private static final Log NULL_LOGGER = new NullLogger(LOGGER_INSTANCE_NAME);	private static Map roundRobinStatsMap;	private static final Map serverCollationByUrl = new HashMap();	private static final Map serverConfigByUrl = new HashMap();	private long queryTimeCount;	private double queryTimeSum;	private double queryTimeSumSquares;	private double queryTimeMean;		private static Timer cancelTimer;		private List connectionLifecycleInterceptors;		private static final Constructor JDBC_4_CONNECTION_CTOR;		static {		mapTransIsolationNameToValue = new HashMap(8);		mapTransIsolationNameToValue.put("READ-UNCOMMITED", Constants.integerValueOf(				TRANSACTION_READ_UNCOMMITTED));		mapTransIsolationNameToValue.put("READ-UNCOMMITTED", Constants.integerValueOf(				TRANSACTION_READ_UNCOMMITTED));		mapTransIsolationNameToValue.put("READ-COMMITTED", Constants.integerValueOf(				TRANSACTION_READ_COMMITTED));		mapTransIsolationNameToValue.put("REPEATABLE-READ", Constants.integerValueOf(				TRANSACTION_REPEATABLE_READ));		mapTransIsolationNameToValue.put("SERIALIZABLE", Constants.integerValueOf(				TRANSACTION_SERIALIZABLE));				boolean createdNamedTimer = false;				// Use reflection magic to try this on JDK's 1.5 and newer, fallback to non-named		// timer on older VMs.		try {			Constructor ctr = Timer.class.getConstructor(new Class[] {String.class, Boolean.TYPE});						cancelTimer = (Timer)ctr.newInstance(new Object[] { "MySQL Statement Cancellation Timer", Boolean.TRUE});			createdNamedTimer = true;		} catch (Throwable t) {			createdNamedTimer = false;		}				if (!createdNamedTimer) {			cancelTimer = new Timer(true);		}				if (Util.isJdbc4()) {			try {				JDBC_4_CONNECTION_CTOR = Class.forName(						"com.mysql.jdbc.JDBC4Connection").getConstructor(						new Class[] { String.class, Integer.TYPE,								Properties.class, String.class, String.class });			} catch (SecurityException e) {				throw new RuntimeException(e);			} catch (NoSuchMethodException e) {				throw new RuntimeException(e);			} catch (ClassNotFoundException e) {				throw new RuntimeException(e);			}		} else {			JDBC_4_CONNECTION_CTOR = null;		}	}	protected static SQLException appendMessageToException(SQLException sqlEx,			String messageToAppend) {		String origMessage = sqlEx.getMessage();		String sqlState = sqlEx.getSQLState();		int vendorErrorCode = sqlEx.getErrorCode();		StringBuffer messageBuf = new StringBuffer(origMessage.length()				+ messageToAppend.length());		messageBuf.append(origMessage);		messageBuf.append(messageToAppend);		SQLException sqlExceptionWithNewMessage = SQLError.createSQLException(messageBuf				.toString(), sqlState, vendorErrorCode);		//		// Try and maintain the original stack trace,		// only works on JDK-1.4 and newer		//		try {			// Have to do this with reflection, otherwise older JVMs croak			Method getStackTraceMethod = null;			Method setStackTraceMethod = null;			Object theStackTraceAsObject = null;			Class stackTraceElementClass = Class					.forName("java.lang.StackTraceElement");			Class stackTraceElementArrayClass = Array.newInstance(					stackTraceElementClass, new int[] { 0 }).getClass();			getStackTraceMethod = Throwable.class.getMethod("getStackTrace",					new Class[] {});			setStackTraceMethod = Throwable.class.getMethod("setStackTrace",					new Class[] { stackTraceElementArrayClass });			if (getStackTraceMethod != null && setStackTraceMethod != null) {				theStackTraceAsObject = getStackTraceMethod.invoke(sqlEx,						new Object[0]);				setStackTraceMethod.invoke(sqlExceptionWithNewMessage,						new Object[] { theStackTraceAsObject });			}		} catch (NoClassDefFoundError noClassDefFound) {		} catch (NoSuchMethodException noSuchMethodEx) {		} catch (Throwable catchAll) {		}		return sqlExceptionWithNewMessage;	}	protected static Timer getCancelTimer() {		return cancelTimer;	}		/**	 * Creates a connection instance -- We need to provide factory-style methods	 * so we can support both JDBC3 (and older) and JDBC4 runtimes, otherwise	 * the class verifier complains when it tries to load JDBC4-only interface	 * classes that are present in JDBC4 method signatures.	 */	protected static Connection getInstance(String hostToConnectTo,			int portToConnectTo, Properties info, String databaseToConnectTo,			String url) throws SQLException {		if (!Util.isJdbc4()) {			return new ConnectionImpl(hostToConnectTo, portToConnectTo, info,					databaseToConnectTo, url);		}		return (Connection) Util.handleNewInstance(JDBC_4_CONNECTION_CTOR,				new Object[] {							hostToConnectTo, Constants.integerValueOf(portToConnectTo), info,							databaseToConnectTo, url });	}	private static synchronized int getNextRoundRobinHostIndex(String url,			List hostList) {		if (roundRobinStatsMap == null) {			roundRobinStatsMap = new HashMap();		}		int[] index = (int[]) roundRobinStatsMap.get(url);		if (index == null) {			index = new int[1];			index[0] = -1;			roundRobinStatsMap.put(url, index);		}		index[0]++;		if (index[0] >= hostList.size()) {			index[0] = 0;		}		return index[0];	}	private static boolean nullSafeCompare(String s1, String s2) {		if (s1 == null && s2 == null) {			return true;		}		if (s1 == null && s2 != null) {			return false;		}		return s1.equals(s2);	}	/** Are we in autoCommit mode? */	private boolean autoCommit = true;	/** A map of SQL to parsed prepared statement parameters. */	private Map cachedPreparedStatementParams;	/**	 * For servers > 4.1.0, what character set is the metadata returned in?	 */	private String characterSetMetadata = null;	/**	 * The character set we want results and result metadata returned in (null ==	 * results in any charset, metadata in UTF-8).	 */	private String characterSetResultsOnServer = null;	/**	 * Holds cached mappings to charset converters to avoid static	 * synchronization and at the same time save memory (each charset converter	 * takes approx 65K of static data).	 */	private Map charsetConverterMap = new HashMap(CharsetMapping			.getNumberOfCharsetsConfigured());	/**	 * The mapping between MySQL charset names and the max number of chars in	 * them. Lazily instantiated via getMaxBytesPerChar().	 */	private Map charsetToNumBytesMap;	/** The point in time when this connection was created */	private long connectionCreationTimeMillis = 0;	/** ID used when profiling */	private long connectionId;	/** The database we're currently using (called Catalog in JDBC terms). */	private String database = null;	/** Internal DBMD to use for various database-version specific features */	private DatabaseMetaData dbmd = null;	private TimeZone defaultTimeZone;	/** The event sink to use for profiling */	private ProfileEventSink eventSink;	private boolean executingFailoverReconnect = false;	/** Are we failed-over to a non-master host */	private boolean failedOver = false;	/** Why was this connection implicitly closed, if known? (for diagnostics) */	private Throwable forceClosedReason;	/** Where was this connection implicitly closed? (for diagnostics) */	private Throwable forcedClosedLocation;	/** Does the server suuport isolation levels? */	private boolean hasIsolationLevels = false;	/** Does this version of MySQL support quoted identifiers? */	private boolean hasQuotedIdentifiers = false;	/** The hostname we're connected to */	private String host = null;	/** The list of host(s) to try and connect to */	private List hostList = null;	/** How many hosts are in the host list? */	private int hostListSize = 0;	/**	 * We need this 'bootstrapped', because 4.1 and newer will send fields back	 * with this even before we fill this dynamically from the server.	 */	private String[] indexToCharsetMapping = CharsetMapping.INDEX_TO_CHARSET;		/** The I/O abstraction interface (network conn to MySQL server */	private MysqlIO io = null;		private boolean isClientTzUTC = false;	/** Has this connection been closed? */	private boolean isClosed = true;	/** Is this connection associated with a global tx? */	private boolean isInGlobalTx = false;	/** Is this connection running inside a JDK-1.3 VM? */	private boolean isRunningOnJDK13 = false;	/** isolation level */	private int isolationLevel = java.sql.Connection.TRANSACTION_READ_COMMITTED;	private boolean isServerTzUTC = false;	/** When did the last query finish? */	private long lastQueryFinishedTime = 0;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕一区二区三| 风间由美中文字幕在线看视频国产欧美| 91免费国产在线| 亚洲成人在线网站| 欧美高清一级片在线观看| 欧美日精品一区视频| 成人午夜电影小说| 婷婷成人激情在线网| 亚洲欧美在线观看| 欧美精品一区二区久久久| 在线观看91视频| 丁香天五香天堂综合| 午夜视频在线观看一区二区三区| 国产欧美日韩亚州综合| 91麻豆精品91久久久久同性| 99久久久久久| 国产成人免费网站| 国内不卡的二区三区中文字幕| 婷婷中文字幕一区三区| 欧美aⅴ一区二区三区视频| 日韩 欧美一区二区三区| 蜜臀精品久久久久久蜜臀| 日本不卡一区二区| 奇米精品一区二区三区四区| 美腿丝袜亚洲三区| 国产一区二区三区免费看| 国产一区二区不卡| 国产成人啪午夜精品网站男同| 成人动漫av在线| 91丨porny丨国产入口| 色菇凉天天综合网| 欧美巨大另类极品videosbest | 午夜天堂影视香蕉久久| 日韩电影免费在线| 国内精品第一页| 99久久国产综合色|国产精品| 欧洲亚洲精品在线| 欧美mv和日韩mv的网站| 国产精品蜜臀在线观看| 欧美一区二区三区在线观看视频| 久久久久九九视频| 偷窥少妇高潮呻吟av久久免费| 99久久精品99国产精品| 久久精品一区二区三区av| 久久99国产精品麻豆| 色婷婷av一区二区三区软件| 精品福利一区二区三区免费视频| 国产精品久久久久久久岛一牛影视| 五月婷婷激情综合| 成人app软件下载大全免费| 日韩欧美国产一区二区三区| 最新日韩在线视频| 久久电影网站中文字幕| 欧美午夜影院一区| 欧美激情艳妇裸体舞| 蜜臀av国产精品久久久久| 一本一道波多野结衣一区二区| 久久毛片高清国产| 蓝色福利精品导航| 欧美日韩一区二区三区在线| 日韩伦理av电影| 夫妻av一区二区| 久久综合成人精品亚洲另类欧美| 午夜私人影院久久久久| 欧美日韩在线电影| 亚洲一区二区三区四区五区黄| 欧美亚洲动漫另类| 国产精品美女久久久久久久| 国产真实乱对白精彩久久| 欧美电影一区二区三区| 亚洲一区二区三区四区五区黄| 成人黄色在线网站| 国产欧美精品在线观看| 久久99国产精品尤物| 日韩精品一区国产麻豆| 午夜激情一区二区| 欧美精品 日韩| 午夜精品在线看| 91精品国产全国免费观看| 婷婷综合另类小说色区| 欧美日韩国产天堂| 偷拍自拍另类欧美| 欧美一级欧美三级在线观看| 天天av天天翘天天综合网色鬼国产| 欧美色图一区二区三区| 亚洲一二三四久久| 91.com视频| 老司机精品视频导航| 久久午夜免费电影| 成人app软件下载大全免费| 国产精品久久久一本精品 | 依依成人综合视频| 制服丝袜亚洲精品中文字幕| 免费人成在线不卡| 国产日韩欧美一区二区三区乱码| 99精品久久免费看蜜臀剧情介绍| 亚洲国产中文字幕在线视频综合 | 日韩视频在线观看一区二区| 免费成人在线视频观看| 亚洲视频一区在线| 日韩欧美国产精品一区| 欧美亚洲另类激情小说| 国产在线播精品第三| 一区二区在线观看不卡| 欧美在线观看一区| 久草在线在线精品观看| 国产精品灌醉下药二区| 欧美午夜寂寞影院| 国产成人av一区二区三区在线| 亚洲美女区一区| 精品久久久网站| 91浏览器在线视频| 麻豆成人av在线| 亚洲欧洲色图综合| 日韩精品一区二区三区四区 | 国产欧美视频一区二区三区| 欧美图区在线视频| 国产精品综合av一区二区国产馆| 亚洲精品你懂的| 国产日韩精品一区二区三区 | 欧美视频日韩视频在线观看| 国产福利不卡视频| 天天av天天翘天天综合网| 一区在线播放视频| 久久日韩精品一区二区五区| 欧美日韩午夜在线视频| 91在线视频免费观看| 韩国欧美国产1区| 天天影视涩香欲综合网| 亚洲欧美另类图片小说| 国产欧美一区二区三区网站| 欧美一级在线观看| 欧美丝袜自拍制服另类| 成人丝袜视频网| 国产成人午夜99999| 经典三级一区二区| 日韩成人dvd| 亚洲国产日韩在线一区模特| 国产精品乱码久久久久久| 久久噜噜亚洲综合| 久久久美女毛片| 久久久久久久一区| 久久久久久久久久电影| wwwwxxxxx欧美| 国产色综合久久| 久久精品人人爽人人爽| 精品国产露脸精彩对白| 精品国产麻豆免费人成网站| 欧美一级日韩一级| 欧美成人激情免费网| 日韩美女在线视频| 久久综合精品国产一区二区三区| 精品福利视频一区二区三区| 日韩美女主播在线视频一区二区三区 | 色婷婷久久一区二区三区麻豆| 99久久精品99国产精品| 色哟哟日韩精品| 欧美精品aⅴ在线视频| 欧美一区二区免费| 国产亚洲人成网站| 亚洲图片你懂的| 亚洲v日本v欧美v久久精品| 丝袜诱惑制服诱惑色一区在线观看| 三级不卡在线观看| 国产高清久久久久| 99九九99九九九视频精品| 日本久久电影网| 精品伦理精品一区| 中文字幕不卡一区| 亚洲福利视频导航| 韩国三级电影一区二区| 99久久精品99国产精品| 欧美日韩国产不卡| 国产欧美日韩综合| 首页国产欧美久久| aaa亚洲精品| 欧美一级理论性理论a| 中文字幕乱码一区二区免费| 夜夜嗨av一区二区三区网页| 久久国产精品第一页| 色综合久久久久网| 久久精品视频在线免费观看| 亚洲一区二区三区影院| 国产成人超碰人人澡人人澡| 欧美乱熟臀69xxxxxx| 中文字幕永久在线不卡| 久久精品国产澳门| 欧美性感一类影片在线播放| 国产欧美日韩综合| 麻豆精品视频在线观看视频| 91亚洲精品久久久蜜桃网站| 亚洲精品在线免费播放| 午夜电影一区二区| 在线亚洲人成电影网站色www| 精品久久久久一区二区国产| 性感美女久久精品| 色悠悠亚洲一区二区| 国产精品视频麻豆| 国内精品伊人久久久久av一坑| 7777精品伊人久久久大香线蕉|