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

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

?? connectionimpl.java

?? 用于JAVA數據庫連接.解壓就可用,方便得很
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
	/** The logger we're going to use */	private Log log = NULL_LOGGER;	/**	 * If gathering metrics, what was the execution time of the longest query so	 * far ?	 */	private long longestQueryTimeMs = 0;	/** Is the server configured to use lower-case table names only? */	private boolean lowerCaseTableNames = false;	/** When did the master fail? */	private long masterFailTimeMillis = 0L;	/**	 * The largest packet we can send (changed once we know what the server	 * supports, we get this at connection init).	 */	private int maxAllowedPacket = 65536;	private long maximumNumberTablesAccessed = 0;	/** Has the max-rows setting been changed from the default? */	private boolean maxRowsChanged = false;	/** When was the last time we reported metrics? */	private long metricsLastReportedMs;	private long minimumNumberTablesAccessed = Long.MAX_VALUE;	/** Mutex */	private final Object mutex = new Object();	/** The JDBC URL we're using */	private String myURL = null;	/** Does this connection need to be tested? */	private boolean needsPing = false;	private int netBufferLength = 16384;	private boolean noBackslashEscapes = false;	private long numberOfPreparedExecutes = 0;	private long numberOfPrepares = 0;	private long numberOfQueriesIssued = 0;	private long numberOfResultSetsCreated = 0;	private long[] numTablesMetricsHistBreakpoints;	private int[] numTablesMetricsHistCounts;	private long[] oldHistBreakpoints = null;	private int[] oldHistCounts = null;	/** A map of currently open statements */	private Map openStatements;	private LRUCache parsedCallableStatementCache;	private boolean parserKnowsUnicode = false;	/** The password we used */	private String password = null;	private long[] perfMetricsHistBreakpoints;	private int[] perfMetricsHistCounts;	/** Point of origin where this Connection was created */	private Throwable pointOfOrigin;	/** The port number we're connected to (defaults to 3306) */	private int port = 3306;	/**	 * Used only when testing failover functionality for regressions, causes the	 * failover code to not retry the master first	 */	private boolean preferSlaveDuringFailover = false;	/** Properties for this connection specified by user */	protected Properties props = null;	/** Number of queries we've issued since the master failed */	private long queriesIssuedFailedOver = 0;	/** Should we retrieve 'info' messages from the server? */	private boolean readInfoMsg = false;	/** Are we in read-only mode? */	private boolean readOnly = false;	/** Cache of ResultSet metadata */	protected LRUCache resultSetMetadataCache;		/** The timezone of the server */	private TimeZone serverTimezoneTZ = null;	/** The map of server variables that we retrieve at connection init. */	private Map serverVariables = null;	private long shortestQueryTimeMs = Long.MAX_VALUE;	/** A map of statements that have had setMaxRows() called on them */	private Map statementsUsingMaxRows;	private double totalQueryTimeMs = 0;	/** Are transactions supported by the MySQL server we are connected to? */	private boolean transactionsSupported = false;	/**	 * The type map for UDTs (not implemented, but used by some third-party	 * vendors, most notably IBM WebSphere)	 */	private Map typeMap;	/** Has ANSI_QUOTES been enabled on the server? */	private boolean useAnsiQuotes = false;	/** The user we're connected as */	private String user = null;		/**	 * Should we use server-side prepared statements? (auto-detected, but can be	 * disabled by user)	 */	private boolean useServerPreparedStmts = false;	private LRUCache serverSideStatementCheckCache;	private LRUCache serverSideStatementCache;	private Calendar sessionCalendar;		private Calendar utcCalendar;		private String origHostToConnectTo;	// we don't want to be able to publicly clone this...		private int origPortToConnectTo;	private String origDatabaseToConnectTo;	private String errorMessageEncoding = "Cp1252"; // to begin with, changes after we talk to the server		private boolean usePlatformCharsetConverters;		/*	 * For testing failover scenarios	 */	private boolean hasTriedMasterFlag = false;	/**	 * The comment (if any) that we'll prepend to all statements	 * sent to the server (to show up in "SHOW PROCESSLIST")	 */	private String statementComment = null;	/**'	 * For the delegate only	 */	protected ConnectionImpl() {		}		/**	 * Creates a connection to a MySQL Server.	 * 	 * @param hostToConnectTo	 *            the hostname of the database server	 * @param portToConnectTo	 *            the port number the server is listening on	 * @param info	 *            a Properties[] list holding the user and password	 * @param databaseToConnectTo	 *            the database to connect to	 * @param url	 *            the URL of the connection	 * @param d	 *            the Driver instantation of the connection	 * @exception SQLException	 *                if a database access error occurs	 */	protected ConnectionImpl(String hostToConnectTo, int portToConnectTo, Properties info,			String databaseToConnectTo, String url)			throws SQLException {		this.charsetToNumBytesMap = new HashMap();			this.connectionCreationTimeMillis = System.currentTimeMillis();		this.pointOfOrigin = new Throwable();				// Stash away for later, used to clone this connection for Statement.cancel		// and Statement.setQueryTimeout().		//				this.origHostToConnectTo = hostToConnectTo;		this.origPortToConnectTo = portToConnectTo;		this.origDatabaseToConnectTo = databaseToConnectTo;		try {			Blob.class.getMethod("truncate", new Class[] {Long.TYPE});						this.isRunningOnJDK13 = false;		} catch (NoSuchMethodException nsme) {			this.isRunningOnJDK13 = true;		}				this.sessionCalendar = new GregorianCalendar();		this.utcCalendar = new GregorianCalendar();		this.utcCalendar.setTimeZone(TimeZone.getTimeZone("GMT"));				//		// Normally, this code would be in initializeDriverProperties,		// but we need to do this as early as possible, so we can start		// logging to the 'correct' place as early as possible...this.log		// points to 'NullLogger' for every connection at startup to avoid		// NPEs and the overhead of checking for NULL at every logging call.		//		// We will reset this to the configured logger during properties		// initialization.		//		this.log = LogFactory.getLogger(getLogger(), LOGGER_INSTANCE_NAME);		// We store this per-connection, due to static synchronization		// issues in Java's built-in TimeZone class...		this.defaultTimeZone = Util.getDefaultTimeZone();				if ("GMT".equalsIgnoreCase(this.defaultTimeZone.getID())) {			this.isClientTzUTC = true;		} else {			this.isClientTzUTC = false;		}		this.openStatements = new HashMap();		this.serverVariables = new HashMap();		this.hostList = new ArrayList();		if (hostToConnectTo == null) {			this.host = "localhost";			this.hostList.add(this.host);		} else if (hostToConnectTo.indexOf(',') != -1) {			// multiple hosts separated by commas (failover)			StringTokenizer hostTokenizer = new StringTokenizer(					hostToConnectTo, ",", false);			while (hostTokenizer.hasMoreTokens()) {				this.hostList.add(hostTokenizer.nextToken().trim());			}		} else {			this.host = hostToConnectTo;			this.hostList.add(this.host);		}		this.hostListSize = this.hostList.size();		this.port = portToConnectTo;		if (databaseToConnectTo == null) {			databaseToConnectTo = "";		}		this.database = databaseToConnectTo;		this.myURL = url;		this.user = info.getProperty(NonRegisteringDriver.USER_PROPERTY_KEY);		this.password = info				.getProperty(NonRegisteringDriver.PASSWORD_PROPERTY_KEY);		if ((this.user == null) || this.user.equals("")) {			this.user = "";		}		if (this.password == null) {			this.password = "";		}		this.props = info;		initializeDriverProperties(info);		try {			createNewIO(false);			this.dbmd = getMetaData();		} catch (SQLException ex) {			cleanup(ex);			// don't clobber SQL exceptions			throw ex;		} catch (Exception ex) {			cleanup(ex);			StringBuffer mesg = new StringBuffer(128);			if (getParanoid()) {				mesg.append("Cannot connect to MySQL server on ");				mesg.append(this.host);				mesg.append(":");				mesg.append(this.port);				mesg.append(".\n\n");				mesg.append("Make sure that there is a MySQL server ");				mesg.append("running on the machine/port you are trying ");				mesg						.append("to connect to and that the machine this software is "								+ "running on ");				mesg.append("is able to connect to this host/port "						+ "(i.e. not firewalled). ");				mesg						.append("Also make sure that the server has not been started "								+ "with the --skip-networking ");				mesg.append("flag.\n\n");			} else {				mesg.append("Unable to connect to database.");			}			mesg.append("Underlying exception: \n\n");			mesg.append(ex.getClass().getName());			if (!getParanoid()) {				mesg.append(Util.stackTraceToString(ex));			}			throw SQLError.createSQLException(mesg.toString(),					SQLError.SQL_STATE_COMMUNICATION_LINK_FAILURE);		}	}	private void addToHistogram(int[] histogramCounts,			long[] histogramBreakpoints, long value, int numberOfTimes,			long currentLowerBound, long currentUpperBound) {		if (histogramCounts == null) {			createInitialHistogram(histogramBreakpoints,					currentLowerBound, currentUpperBound);		}		for (int i = 0; i < HISTOGRAM_BUCKETS; i++) {			if (histogramBreakpoints[i] >= value) {				histogramCounts[i] += numberOfTimes;				break;			}		}	}	private void addToPerformanceHistogram(long value, int numberOfTimes) {		checkAndCreatePerformanceHistogram();		addToHistogram(this.perfMetricsHistCounts,				this.perfMetricsHistBreakpoints, value, numberOfTimes,				this.shortestQueryTimeMs == Long.MAX_VALUE ? 0						: this.shortestQueryTimeMs, this.longestQueryTimeMs);	}	private void addToTablesAccessedHistogram(long value, int numberOfTimes) {		checkAndCreateTablesAccessedHistogram();		addToHistogram(this.numTablesMetricsHistCounts,				this.numTablesMetricsHistBreakpoints, value, numberOfTimes,				this.minimumNumberTablesAccessed == Long.MAX_VALUE ? 0						: this.minimumNumberTablesAccessed,				this.maximumNumberTablesAccessed);	}		/**	 * Builds the map needed for 4.1.0 and newer servers that maps field-level	 * charset/collation info to a java character encoding name.	 * 	 * @throws SQLException	 *             DOCUMENT ME!	 */	private void buildCollationMapping() throws SQLException {		if (versionMeetsMinimum(4, 1, 0)) {			TreeMap sortedCollationMap = null;			if (getCacheServerConfiguration()) {				synchronized (serverConfigByUrl) {					sortedCollationMap = (TreeMap) serverCollationByUrl							.get(getURL());				}			}			java.sql.Statement stmt = null;			java.sql.ResultSet results = null;			try {				if (sortedCollationMap == null) {					sortedCollationMap = new TreeMap();					stmt = createStatement();					if (stmt.getMaxRows() != 0) {						stmt.setMaxRows(0);					}					results = stmt							.executeQuery("SHOW COLLATION");					while (results.next()) {						String charsetName = results.getString(2);						Integer charsetIndex = Constants.integerValueOf(results.getInt(3));						sortedCollationMap.put(charsetIndex, charsetName);					}					if (getCacheServerConfiguration()) {						synchronized (serverConfigByUrl) {							serverCollationByUrl.put(getURL(),									sortedCollationMap);						}					}				}				// Now, merge with what we already know				int highestIndex = ((Integer) sortedCollationMap.lastKey())						.intValue();				if (CharsetMapping.INDEX_TO_CHARSET.length > highestIndex) {					highestIndex = CharsetMapping.INDEX_TO_CHARSET.length;				}				this.indexToCharsetMapping = new String[highestIndex + 1];				for (int i = 0; i < CharsetMapping.INDEX_TO_CHARSET.length; i++) {					this.indexToCharsetMapping[i] = CharsetMapping.INDEX_TO_CHARSET[i];				}				for (Iterator indexIter = sortedCollationMap.entrySet()						.iterator(); indexIter.hasNext();) {					Map.Entry indexEntry = (Map.Entry) indexIter.next();					String mysqlCharsetName = (String) indexEntry.getValue();					this.indexToCharsetMapping[((Integer) indexEntry.getKey())							.intValue()] = CharsetMapping							.getJavaEncodingForMysqlEncoding(mysqlCharsetName,									this);				}			} catch (java.sql.SQLException e) {				throw e;			} finally {				if (results != null) {					try {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人小视频免费在线观看| 欧美高清视频不卡网| 日韩天堂在线观看| 亚洲九九爱视频| 五月综合激情婷婷六月色窝| 日本高清视频一区二区| 亚洲欧美日韩国产中文在线| av电影天堂一区二区在线观看| 在线播放/欧美激情| 亚洲午夜视频在线观看| 在线观看亚洲一区| 无码av免费一区二区三区试看| 欧美视频一区二区| 人人狠狠综合久久亚洲| 日韩精品自拍偷拍| 久久成人羞羞网站| 国产精品久久久久久久久免费桃花 | 91精彩视频在线观看| 亚洲欧洲av色图| 在线观看91视频| 天天色天天操综合| 国产亚洲一区字幕| 成人91在线观看| 亚洲一级二级在线| 久久久久久免费| 不卡一卡二卡三乱码免费网站| 亚洲精品乱码久久久久久| 欧美日韩一卡二卡三卡 | 国产精品短视频| 在线一区二区三区四区| 日日夜夜精品视频天天综合网| 日韩一区二区三区免费观看| 成人免费的视频| 亚洲精品久久久蜜桃| 欧美电影免费观看高清完整版| 国产福利精品一区二区| 亚洲色图欧洲色图| 日韩免费在线观看| 成a人片国产精品| 麻豆精品一区二区| 中文一区二区完整视频在线观看| 国产馆精品极品| 午夜亚洲福利老司机| 欧美sm极限捆绑bd| 一本色道a无线码一区v| 日韩va欧美va亚洲va久久| 精品免费视频.| 色综合咪咪久久| 精品中文字幕一区二区| 亚洲网友自拍偷拍| 久久综合国产精品| 色婷婷久久一区二区三区麻豆| 日韩国产高清在线| 亚洲欧洲另类国产综合| 欧美精品视频www在线观看| 国产一区欧美一区| 中文字幕色av一区二区三区| 欧美一级日韩一级| 99久久精品国产一区| 久久99日本精品| 亚洲精品日产精品乱码不卡| 国产日韩欧美激情| 欧美一级欧美三级在线观看| 国产一区二区三区免费播放| 毛片av一区二区| 亚洲国产精品久久久久秋霞影院 | 日韩欧美国产三级电影视频| 一本色道久久综合亚洲aⅴ蜜桃| 精品一区二区三区免费观看| 日本欧美一区二区在线观看| 一区二区三区久久| 一区二区三区精品在线观看| 久久男人中文字幕资源站| 欧美大黄免费观看| 555www色欧美视频| 欧美三级乱人伦电影| 99re亚洲国产精品| 丁香婷婷综合色啪| 99久久夜色精品国产网站| 狠狠色丁香久久婷婷综合_中| 日韩精品乱码免费| 亚洲一区二区欧美激情| 国产午夜精品一区二区三区视频| 久久久久久久久久久久久女国产乱| 欧美浪妇xxxx高跟鞋交| 欧美高清视频不卡网| 欧美主播一区二区三区| 欧美熟乱第一页| 在线看不卡av| 欧美日韩精品免费| 欧美日韩中文字幕一区| 91极品视觉盛宴| 欧美日韩在线电影| 欧美日韩一级大片网址| 欧美一区日韩一区| 日韩午夜激情免费电影| 久久精品视频一区| 欧美激情一区二区三区四区| 中文字幕欧美区| 亚洲视频在线观看一区| 国产女同互慰高潮91漫画| 国产精品对白交换视频| 一区二区在线观看视频在线观看| 亚洲成国产人片在线观看| 亚洲成人综合在线| 国产麻豆91精品| 成人永久免费视频| 欧美色综合久久| 欧美一区二区三区小说| 欧美一区午夜视频在线观看| 日韩女同互慰一区二区| 国产三级精品三级| 亚洲视频资源在线| 日韩专区中文字幕一区二区| 亚洲成人动漫av| 国产成人鲁色资源国产91色综| 成人av集中营| 欧美一级淫片007| 国产日本欧美一区二区| 性欧美大战久久久久久久久| 麻豆国产欧美一区二区三区| 91色porny在线视频| 欧美日韩中文一区| 国产精品久久久爽爽爽麻豆色哟哟| 亚洲乱码国产乱码精品精可以看| 免费视频最近日韩| 9色porny自拍视频一区二区| 色拍拍在线精品视频8848| 精品久久久三级丝袜| 国产精品日韩成人| 老司机精品视频一区二区三区| 成人妖精视频yjsp地址| 欧美一区二区三区日韩| 国产精品美女一区二区| 九九精品一区二区| 色就色 综合激情| 日本一区二区三区视频视频| 亚洲国产精品精华液网站 | 国产露脸91国语对白| 成人av在线看| 欧美丰满高潮xxxx喷水动漫| 久久精品视频在线看| 日韩黄色一级片| a亚洲天堂av| 国产视频一区二区在线| 亚洲午夜一区二区| 成人免费观看男女羞羞视频| 欧美一级二级三级乱码| 中文字幕一区二区三区精华液 | 天天综合色天天| 91丨九色丨国产丨porny| 精品日本一线二线三线不卡| 国产欧美日本一区视频| 日韩有码一区二区三区| 91成人国产精品| 亚洲天堂免费在线观看视频| 国产精品一级黄| 欧美成人精品福利| 喷水一区二区三区| 欧美色网站导航| 国产精品蜜臀在线观看| 国产精品影音先锋| 久久久午夜精品| 麻豆精品视频在线| 日韩精品一区二区在线观看| 亚洲图片欧美色图| 久久精品99国产国产精| 777色狠狠一区二区三区| 玉米视频成人免费看| 91精品1区2区| 亚洲黄色小视频| 欧美日韩精品专区| 亚洲另类春色校园小说| 91首页免费视频| 国产精品美女久久久久久| 99国产一区二区三精品乱码| 久久久99精品久久| 粉嫩aⅴ一区二区三区四区 | 欧美不卡在线视频| 日韩av在线播放中文字幕| 欧美人狂配大交3d怪物一区| 亚洲大片一区二区三区| 欧美日韩精品欧美日韩精品一| 午夜精品久久久久久久久| 欧美日韩极品在线观看一区| 亚洲不卡在线观看| 777a∨成人精品桃花网| 日本va欧美va欧美va精品| 欧美一区二区三区白人| 午夜激情综合网| 日韩写真欧美这视频| 午夜久久久影院| 91精品久久久久久久91蜜桃| 亚洲bdsm女犯bdsm网站| 日韩欧美aaaaaa| 成人福利视频网站| 一区二区在线观看免费视频播放| 欧美老年两性高潮| 国产一区二区三区综合| 国产精品久久毛片av大全日韩|