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

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? connectionregressiontest.java

?? mysql jdbc驅(qū)動(dòng)程序 mysql jdbc驅(qū)動(dòng)程序 mysql jdbc驅(qū)動(dòng)程序 mysql jdbc驅(qū)動(dòng)程序
?? JAVA
?? 第 1 頁(yè) / 共 5 頁(yè)
字號(hào):
					}				}				Properties autoReconnectProps = new Properties();				autoReconnectProps.put("autoReconnect", "true");				System.out.println(newUrlToTestPortNum);				//				// First test that port #'s are being correctly picked up				//				// We do this by looking at the error message that is returned				//				Connection portNumConn = DriverManager.getConnection(						newUrlToTestPortNum.toString(), autoReconnectProps);				Statement portNumStmt = portNumConn.createStatement();				this.rs = portNumStmt.executeQuery("SELECT connection_id()");				this.rs.next();				killConnection(adminConnection, this.rs.getString(1));				try {					portNumStmt.executeQuery("SELECT connection_id()");				} catch (SQLException sqlEx) {					// we expect this one				}				try {					portNumStmt.executeQuery("SELECT connection_id()");				} catch (SQLException sqlEx) {					assertTrue(sqlEx.getMessage().toLowerCase().indexOf(							"connection refused") != -1);				}				//				// Now make sure failover works				//				StringBuffer newUrlToTestFailover = new StringBuffer(						"jdbc:mysql://");				if (host != null) {					newUrlToTestFailover.append(host);				}				newUrlToTestFailover.append(":").append(port);				newUrlToTestFailover.append(",");				if (host != null) {					newUrlToTestFailover.append(host);				}				newUrlToTestFailover.append(":").append(bogusPortNumber);				newUrlToTestFailover.append("/");				if (database != null) {					newUrlToTestFailover.append(database);				}				if ((user != null) || (password != null)) {					newUrlToTestFailover.append("?");					if (user != null) {						newUrlToTestFailover.append("user=").append(user);						if (password != null) {							newUrlToTestFailover.append("&");						}					}					if (password != null) {						newUrlToTestFailover.append("password=").append(								password);					}				}				Connection failoverConn = DriverManager.getConnection(						newUrlToTestFailover.toString(), autoReconnectProps);				Statement failoverStmt = portNumConn.createStatement();				this.rs = failoverStmt.executeQuery("SELECT connection_id()");				this.rs.next();				killConnection(adminConnection, this.rs.getString(1));				try {					failoverStmt.executeQuery("SELECT connection_id()");				} catch (SQLException sqlEx) {					// we expect this one				}				failoverStmt.executeQuery("SELECT connection_id()");			} finally {				if (adminConnection != null) {					adminConnection.close();				}			}		}	}	private static void killConnection(Connection adminConn, String threadId)			throws SQLException {		adminConn.createStatement().execute("KILL " + threadId);	}	/**	 * Tests fix for BUG#6966, connections starting up failed-over (due to down	 * master) never retry master.	 * 	 * @throws Exception	 *             if the test fails...Note, test is timing-dependent, but	 *             should work in most cases.	 */	public void testBug6966() throws Exception {		Properties props = new Driver().parseURL(BaseTestCase.dbUrl, null);		props.setProperty("autoReconnect", "true");		// Re-build the connection information		int firstIndexOfHost = BaseTestCase.dbUrl.indexOf("//") + 2;		int lastIndexOfHost = BaseTestCase.dbUrl.indexOf("/", firstIndexOfHost);		String hostPortPair = BaseTestCase.dbUrl.substring(firstIndexOfHost,				lastIndexOfHost);		StringTokenizer st = new StringTokenizer(hostPortPair, ":");		String host = null;		String port = null;		if (st.hasMoreTokens()) {			String possibleHostOrPort = st.nextToken();			if (Character.isDigit(possibleHostOrPort.charAt(0)) && 					(possibleHostOrPort.indexOf(".") == -1 /* IPV4 */)  &&					(possibleHostOrPort.indexOf("::") == -1 /* IPV6 */)) {				port = possibleHostOrPort;				host = "localhost";			} else {				host = possibleHostOrPort;			}		}		if (st.hasMoreTokens()) {			port = st.nextToken();		}		if (host == null) {			host = "";		}		if (port == null) {			port = "3306";		}		StringBuffer newHostBuf = new StringBuffer();		newHostBuf.append(host);		newHostBuf.append(":65532"); // make sure the master fails		newHostBuf.append(",");		newHostBuf.append(host);		if (port != null) {			newHostBuf.append(":");			newHostBuf.append(port);		}		props.remove("PORT");		props.setProperty("HOST", newHostBuf.toString());		props.setProperty("queriesBeforeRetryMaster", "50");		props.setProperty("maxReconnects", "1");		Connection failoverConnection = null;		try {			failoverConnection = getConnectionWithProps("jdbc:mysql://"					+ newHostBuf.toString() + "/", props);			failoverConnection.setAutoCommit(false);			String originalConnectionId = getSingleIndexedValueWithQuery(					failoverConnection, 1, "SELECT CONNECTION_ID()").toString();						for (int i = 0; i < 49; i++) {				failoverConnection.createStatement().executeQuery("SELECT 1");			}			((com.mysql.jdbc.Connection)failoverConnection).clearHasTriedMaster();						failoverConnection.setAutoCommit(true);			String newConnectionId = getSingleIndexedValueWithQuery(					failoverConnection, 1, "SELECT CONNECTION_ID()").toString();						assertTrue(((com.mysql.jdbc.Connection)failoverConnection).hasTriedMaster());						assertTrue(!newConnectionId.equals(originalConnectionId));			failoverConnection.createStatement().executeQuery("SELECT 1");		} finally {			if (failoverConnection != null) {				failoverConnection.close();			}		}	}	/**	 * Test fix for BUG#7952 -- Infinite recursion when 'falling back' to master	 * in failover configuration.	 * 	 * @throws Exception	 *             if the tests fails.	 */	public void testBug7952() throws Exception {		Properties props = new Driver().parseURL(BaseTestCase.dbUrl, null);		props.setProperty("autoReconnect", "true");		// Re-build the connection information		int firstIndexOfHost = BaseTestCase.dbUrl.indexOf("//") + 2;		int lastIndexOfHost = BaseTestCase.dbUrl.indexOf("/", firstIndexOfHost);		String hostPortPair = BaseTestCase.dbUrl.substring(firstIndexOfHost,				lastIndexOfHost);		StringTokenizer st = new StringTokenizer(hostPortPair, ":");		String host = null;		String port = null;		if (st.hasMoreTokens()) {			String possibleHostOrPort = st.nextToken();			if (possibleHostOrPort.indexOf(".") == -1					&& Character.isDigit(possibleHostOrPort.charAt(0))) {				port = possibleHostOrPort;				host = "localhost";			} else {				host = possibleHostOrPort;			}		}		if (st.hasMoreTokens()) {			port = st.nextToken();		}		if (host == null) {			host = "";		}		if (port == null) {			port = "3306";		}		StringBuffer newHostBuf = new StringBuffer();		newHostBuf.append(host);		newHostBuf.append(":");		newHostBuf.append(port);		newHostBuf.append(",");		newHostBuf.append(host);		if (port != null) {			newHostBuf.append(":");			newHostBuf.append(port);		}		props.remove("PORT");		props.setProperty("HOST", newHostBuf.toString());		props.setProperty("queriesBeforeRetryMaster", "10");		props.setProperty("maxReconnects", "1");		Connection failoverConnection = null;		Connection killerConnection = getConnectionWithProps((Properties)null);		try {			failoverConnection = getConnectionWithProps("jdbc:mysql://"					+ newHostBuf + "/", props);			((com.mysql.jdbc.Connection) failoverConnection)					.setPreferSlaveDuringFailover(true);			failoverConnection.setAutoCommit(false);			String failoverConnectionId = getSingleIndexedValueWithQuery(					failoverConnection, 1, "SELECT CONNECTION_ID()").toString();			System.out.println("Connection id: " + failoverConnectionId);			killConnection(killerConnection, failoverConnectionId);			Thread.sleep(3000); // This can take some time....			try {				failoverConnection.createStatement().executeQuery("SELECT 1");			} catch (SQLException sqlEx) {				assertTrue("08S01".equals(sqlEx.getSQLState()));			}			((com.mysql.jdbc.Connection) failoverConnection)					.setPreferSlaveDuringFailover(false);			((com.mysql.jdbc.Connection) failoverConnection)					.setFailedOver(true);			failoverConnection.setAutoCommit(true);			String failedConnectionId = getSingleIndexedValueWithQuery(					failoverConnection, 1, "SELECT CONNECTION_ID()").toString();			System.out.println("Failed over connection id: "					+ failedConnectionId);			((com.mysql.jdbc.Connection) failoverConnection)					.setPreferSlaveDuringFailover(false);			((com.mysql.jdbc.Connection) failoverConnection)					.setFailedOver(true);			for (int i = 0; i < 30; i++) {				failoverConnection.setAutoCommit(true);				System.out.println(getSingleIndexedValueWithQuery(						failoverConnection, 1, "SELECT CONNECTION_ID()"));				// failoverConnection.createStatement().executeQuery("SELECT				// 1");				failoverConnection.setAutoCommit(true);			}			String fallbackConnectionId = getSingleIndexedValueWithQuery(					failoverConnection, 1, "SELECT CONNECTION_ID()").toString();			System.out.println("fallback connection id: "					+ fallbackConnectionId);			/*			 * long begin = System.currentTimeMillis();			 * 			 * failoverConnection.setAutoCommit(true);			 * 			 * long end = System.currentTimeMillis();			 * 			 * assertTrue("Probably didn't try failing back to the			 * master....check test", (end - begin) > 500);			 * 			 * failoverConnection.createStatement().executeQuery("SELECT 1");			 */		} finally {			if (failoverConnection != null) {				failoverConnection.close();			}		}	}	/**	 * Tests fix for BUG#7607 - MS932, SHIFT_JIS and Windows_31J not recog. as	 * aliases for sjis.	 * 	 * @throws Exception	 *             if the test fails.	 */	public void testBug7607() throws Exception {		if (versionMeetsMinimum(4, 1)) {			Connection ms932Conn = null, cp943Conn = null, shiftJisConn = null, windows31JConn = null;			try {				Properties props = new Properties();				props.setProperty("characterEncoding", "MS932");				ms932Conn = getConnectionWithProps(props);				this.rs = ms932Conn.createStatement().executeQuery(						"SHOW VARIABLES LIKE 'character_set_client'");				assertTrue(this.rs.next());				String encoding = this.rs.getString(2);				if (!versionMeetsMinimum(5, 0, 3)						&& !versionMeetsMinimum(4, 1, 11)) {					assertEquals("sjis", encoding.toLowerCase(Locale.ENGLISH));				} else {					assertEquals("cp932", encoding.toLowerCase(Locale.ENGLISH));				}				this.rs = ms932Conn.createStatement().executeQuery(						"SELECT 'abc'");				assertTrue(this.rs.next());				String charsetToCheck = "ms932";				if (versionMeetsMinimum(5, 0, 3)						|| versionMeetsMinimum(4, 1, 11)) {					charsetToCheck = "windows-31j";				}				assertEquals(charsetToCheck,						((com.mysql.jdbc.ResultSetMetaData) this.rs								.getMetaData()).getColumnCharacterSet(1)								.toLowerCase(Locale.ENGLISH));				try {					ms932Conn.createStatement().executeUpdate(							"drop table if exists testBug7607");					ms932Conn							.createStatement()							.executeUpdate(									"create table testBug7607 (sortCol int, col1 varchar(100) ) character set sjis");					ms932Conn.createStatement().executeUpdate(							"insert into testBug7607 values(1, 0x835C)"); // standard					// sjis					ms932Conn.createStatement().executeUpdate(							"insert into testBug7607 values(2, 0x878A)"); // NEC					// kanji					this.rs = ms932Conn							.createStatement()							.executeQuery(									"SELECT col1 FROM testBug7607 ORDER BY sortCol ASC");					assertTrue(this.rs.next());					String asString = this.rs.getString(1);					assertTrue("\u30bd".equals(asString));					// Can't be fixed unless server is fixed,					// this is fixed in 4.1.7.					assertTrue(this.rs.next());					asString = this.rs.getString(1);					assertEquals("\u3231", asString);				} finally {					ms932Conn.createStatement().executeUpdate(							"drop table if exists testBug7607");				}				props = new Properties();				props.setProperty("characterEncoding", "SHIFT_JIS");				shiftJisConn = getConnectionWithProps(props);				this.rs = shiftJisConn.createStatement().executeQuery(						"SHOW VARIABLES LIKE 'character_set_client'");				assertTrue(this.rs.next());				encoding = this.rs.getString(2);				assertTrue("sjis".equalsIgnoreCase(encoding));				this.rs = shiftJisConn.createStatement().executeQuery(						"SELECT 'abc'");				assertTrue(this.rs.next());				String charSetUC = ((com.mysql.jdbc.ResultSetMetaData) this.rs						.getMetaData()).getColumnCharacterSet(1).toUpperCase(						Locale.US);				if (isRunningOnJdk131()) {					assertEquals("WINDOWS-31J", charSetUC);				} else {//					assertEquals("SHIFT_JIS", charSetUC);				}				props = new Properties();				props.setProperty("characterEncoding", "WINDOWS-31J");				windows31JConn = getConnectionWithProps(props);

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
麻豆精品一区二区| 国产精品色噜噜| 国产亚洲精品中文字幕| 日韩一区在线播放| 国内精品久久久久影院薰衣草| 2023国产精品| 亚洲一区二区在线播放相泽| 亚洲精品videosex极品| 午夜视频一区二区| 一区二区三区中文在线| 一区二区久久久久久| 精品三级在线看| 久久精品一区二区三区四区| 午夜国产不卡在线观看视频| 国产综合成人久久大片91| 91精品国产综合久久久蜜臀粉嫩| 中文字幕永久在线不卡| 成人免费视频app| 国产精品久久福利| 在线观看不卡一区| 一区二区三区四区中文字幕| 色天天综合色天天久久| 一区二区三区精密机械公司| 欧美日韩一区中文字幕| 午夜一区二区三区视频| 欧美一级二级在线观看| 国产一区二区网址| 久久久久国产精品免费免费搜索| 成人免费视频caoporn| 99re热这里只有精品免费视频| 在线播放中文字幕一区| 久久久久久免费网| 亚洲成人午夜影院| 欧美午夜精品久久久久久孕妇| 日韩欧美三级在线| 国产麻豆日韩欧美久久| 亚洲欧美日韩系列| 7777精品伊人久久久大香线蕉完整版| 国产高清不卡一区二区| 日韩三级免费观看| 午夜成人在线视频| 欧美三级三级三级爽爽爽| 国产亚洲一区二区在线观看| 麻豆成人久久精品二区三区红| 99精品一区二区| 亚洲人成人一区二区在线观看 | 久久成人18免费观看| 久久精品水蜜桃av综合天堂| 在线精品视频小说1| 国产河南妇女毛片精品久久久| 亚洲综合在线视频| 国产欧美视频在线观看| 欧美电影一区二区三区| www.亚洲在线| 不卡高清视频专区| 久久精品久久久精品美女| 亚洲图片欧美色图| 亚洲欧洲中文日韩久久av乱码| 国产丝袜欧美中文另类| 精品日韩欧美在线| 欧美一区日本一区韩国一区| 91蝌蚪国产九色| 一本色道久久综合狠狠躁的推荐 | 久久免费视频一区| 日韩一区二区免费视频| 欧美精品一级二级| 91精品欧美久久久久久动漫| 91麻豆精品久久久久蜜臀 | 日本亚洲免费观看| 久久久精品人体av艺术| 欧美网站一区二区| 91久久线看在观草草青青| 色综合久久中文字幕| 日韩一级片在线观看| 久久久久99精品国产片| 麻豆精品一区二区三区| 91麻豆免费看| 国产精品久久午夜夜伦鲁鲁| 国产自产高清不卡| 欧美精品欧美精品系列| 五月天久久比比资源色| 高清不卡一区二区| 国产日本亚洲高清| 国产成人99久久亚洲综合精品| 欧美一级xxx| 免费视频最近日韩| 欧美丝袜自拍制服另类| 亚洲综合网站在线观看| 色综合天天天天做夜夜夜夜做| 日本一区二区三区视频视频| 激情小说欧美图片| 2021久久国产精品不只是精品| 狂野欧美性猛交blacked| 欧美一区二区三区四区久久| 蜜桃精品视频在线观看| 91精品国产乱码久久蜜臀| 国内精品伊人久久久久影院对白| 欧美精品一区二区在线播放| 久久99精品久久久久久动态图 | 国产精品看片你懂得| 紧缚捆绑精品一区二区| 久久久久国产精品麻豆ai换脸| av一区二区不卡| 亚洲成人福利片| 欧美经典一区二区| 欧美在线看片a免费观看| 丝袜美腿成人在线| 日韩欧美一区在线| proumb性欧美在线观看| 日韩av不卡一区二区| 精品国产免费人成电影在线观看四季| 国产精品一级片| 另类综合日韩欧美亚洲| 精品国产免费一区二区三区香蕉| 成人国产视频在线观看| 亚洲国产中文字幕在线视频综合| 国产亚洲欧美一级| 色香色香欲天天天影视综合网| 激情深爱一区二区| 亚洲国产欧美在线人成| 亚洲免费成人av| 1000部国产精品成人观看| 久久亚洲精精品中文字幕早川悠里 | av成人动漫在线观看| 欧美aⅴ一区二区三区视频| 亚洲一区二区欧美激情| 中文字幕中文字幕中文字幕亚洲无线| 精品久久久久一区| 精品国产伦一区二区三区观看方式 | 亚洲精品自拍动漫在线| 欧美精品久久一区二区三区| 亚洲综合在线视频| 精品成人佐山爱一区二区| 久久蜜桃av一区二区天堂| 国产日产精品1区| 亚洲丰满少妇videoshd| 美国欧美日韩国产在线播放| 国产激情一区二区三区四区| 欧美在线小视频| 久久久久99精品国产片| 亚洲va欧美va人人爽午夜| 国产成人啪午夜精品网站男同| 成人av影院在线| 日韩免费视频一区二区| 亚洲午夜羞羞片| 日本欧美久久久久免费播放网| 99这里只有精品| 精品三级av在线| 日本中文一区二区三区| 91视频你懂的| 亚洲人成网站色在线观看| 国产盗摄一区二区三区| 久久精品视频在线免费观看| 免费观看日韩av| 在线电影院国产精品| 丝袜国产日韩另类美女| 欧美日韩激情一区二区三区| 一区二区三区欧美久久| 91蜜桃在线免费视频| 亚洲精品一二三| 在线视频一区二区三区| 中文字幕在线观看不卡视频| 不卡大黄网站免费看| 国产欧美一区二区三区在线看蜜臀 | 亚洲精品国产一区二区三区四区在线| 久久99国产精品成人| 欧美国产亚洲另类动漫| 99视频精品免费视频| 中文字幕亚洲综合久久菠萝蜜| av激情综合网| 偷拍亚洲欧洲综合| 日韩美女视频在线| 91免费视频观看| 免费观看在线综合| 国产精品色眯眯| 欧美人狂配大交3d怪物一区| 狠狠狠色丁香婷婷综合久久五月| 久久精品亚洲一区二区三区浴池| 成人综合在线网站| 国产在线精品国自产拍免费| 国产精品人人做人人爽人人添| 欧美色网一区二区| 成人免费看的视频| 精品无人区卡一卡二卡三乱码免费卡| 中文字幕一区二区三区乱码在线| 欧美日韩久久一区二区| 99久久99久久久精品齐齐| 美腿丝袜亚洲色图| 天堂精品中文字幕在线| 国产精品电影一区二区| 欧美成人video| 欧美天天综合网| 色菇凉天天综合网| 成人av资源在线| 国产精品一二三区在线| 久久精品国产一区二区| 日韩成人精品在线观看| 五月天中文字幕一区二区| 亚洲精品高清在线| 亚洲乱码一区二区三区在线观看|