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

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

?? connectionregressiontest.java

?? mysql jdbc驅動程序 mysql jdbc驅動程序 mysql jdbc驅動程序 mysql jdbc驅動程序
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
				this.rs = windows31JConn.createStatement().executeQuery(						"SHOW VARIABLES LIKE 'character_set_client'");				assertTrue(this.rs.next());				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 = windows31JConn.createStatement().executeQuery(						"SELECT 'abc'");				assertTrue(this.rs.next());				if (!versionMeetsMinimum(4, 1, 11)) {					assertEquals("sjis".toLowerCase(Locale.ENGLISH),							((com.mysql.jdbc.ResultSetMetaData) this.rs									.getMetaData()).getColumnCharacterSet(1)									.toLowerCase(Locale.ENGLISH));				} else {					assertEquals("windows-31j".toLowerCase(Locale.ENGLISH),							((com.mysql.jdbc.ResultSetMetaData) this.rs									.getMetaData()).getColumnCharacterSet(1)									.toLowerCase(Locale.ENGLISH));				}				props = new Properties();				props.setProperty("characterEncoding", "CP943");				cp943Conn = getConnectionWithProps(props);				this.rs = cp943Conn.createStatement().executeQuery(						"SHOW VARIABLES LIKE 'character_set_client'");				assertTrue(this.rs.next());				encoding = this.rs.getString(2);				assertTrue("sjis".equalsIgnoreCase(encoding));				this.rs = cp943Conn.createStatement().executeQuery(						"SELECT 'abc'");				assertTrue(this.rs.next());				charSetUC = ((com.mysql.jdbc.ResultSetMetaData) this.rs						.getMetaData()).getColumnCharacterSet(1).toUpperCase(						Locale.US);				if (isRunningOnJdk131()) {					assertEquals("WINDOWS-31J", charSetUC);				} else {					assertEquals("CP943", charSetUC);				}			} finally {				if (ms932Conn != null) {					ms932Conn.close();				}				if (shiftJisConn != null) {					shiftJisConn.close();				}				if (windows31JConn != null) {					windows31JConn.close();				}				if (cp943Conn != null) {					cp943Conn.close();				}			}		}	}	/**	 * In some case Connector/J's round-robin function doesn't work.	 * 	 * I had 2 mysqld, node1 "localhost:3306" and node2 "localhost:3307".	 * 	 * 1. node1 is up, node2 is up	 * 	 * 2. java-program connect to node1 by using properties	 * "autoRecconect=true","roundRobinLoadBalance=true","failOverReadOnly=false".	 * 	 * 3. node1 is down, node2 is up	 * 	 * 4. java-program execute a query and fail, but Connector/J's round-robin	 * fashion failover work and if java-program retry a query it can succeed	 * (connection is change to node2 by Connector/j)	 * 	 * 5. node1 is up, node2 is up	 * 	 * 6. node1 is up, node2 is down	 * 	 * 7. java-program execute a query, but this time Connector/J doesn't work	 * althought node1 is up and usable.	 * 	 * 	 * @throws Exception	 */	public void testBug8643() throws Exception {		if (runMultiHostTests()) {			Properties defaultProps = getMasterSlaveProps();			defaultProps.remove(NonRegisteringDriver.HOST_PROPERTY_KEY);			defaultProps.remove(NonRegisteringDriver.PORT_PROPERTY_KEY);			defaultProps.put("autoReconnect", "true");			defaultProps.put("roundRobinLoadBalance", "true");			defaultProps.put("failOverReadOnly", "false");			Connection con = null;			try {				con = DriverManager.getConnection(getMasterSlaveUrl(),						defaultProps);				Statement stmt1 = con.createStatement();				ResultSet rs1 = stmt1						.executeQuery("show variables like 'port'");				rs1.next();				rs1 = stmt1.executeQuery("select connection_id()");				rs1.next();				String originalConnectionId = rs1.getString(1);				this.stmt.executeUpdate("kill " + originalConnectionId);				int numLoops = 8;				SQLException caughtException = null;				while (caughtException == null && numLoops > 0) {					numLoops--;					try {						rs1 = stmt1.executeQuery("show variables like 'port'");					} catch (SQLException sqlEx) {						caughtException = sqlEx;					}				}				assertNotNull(caughtException);				// failover and retry				rs1 = stmt1.executeQuery("show variables like 'port'");				rs1.next();				assertTrue(!((com.mysql.jdbc.Connection) con)						.isMasterConnection());				rs1 = stmt1.executeQuery("select connection_id()");				rs1.next();				String nextConnectionId = rs1.getString(1);				assertTrue(!nextConnectionId.equals(originalConnectionId));				this.stmt.executeUpdate("kill " + nextConnectionId);				numLoops = 8;				caughtException = null;				while (caughtException == null && numLoops > 0) {					numLoops--;					try {						rs1 = stmt1.executeQuery("show variables like 'port'");					} catch (SQLException sqlEx) {						caughtException = sqlEx;					}				}				assertNotNull(caughtException);				// failover and retry				rs1 = stmt1.executeQuery("show variables like 'port'");				rs1.next();				assertTrue(((com.mysql.jdbc.Connection) con)						.isMasterConnection());			} finally {				if (con != null) {					try {						con.close();					} catch (Exception e) {						e.printStackTrace();					}				}			}		}	}	/**	 * Tests fix for BUG#9206, can not use 'UTF-8' for characterSetResults	 * configuration property.	 */	public void testBug9206() throws Exception {		Properties props = new Properties();		props.setProperty("characterSetResults", "UTF-8");		getConnectionWithProps(props).close();	}	/**	 * These two charsets have different names depending on version of MySQL	 * server.	 * 	 * @throws Exception	 *             if the test fails.	 */	public void testNewCharsetsConfiguration() throws Exception {		Properties props = new Properties();		props.setProperty("useUnicode", "true");		props.setProperty("characterEncoding", "EUC_KR");		getConnectionWithProps(props).close();		props = new Properties();		props.setProperty("useUnicode", "true");		props.setProperty("characterEncoding", "KOI8_R");		getConnectionWithProps(props).close();	}	/**	 * Tests fix for BUG#10144 - Memory leak in ServerPreparedStatement if	 * serverPrepare() fails.	 */	public void testBug10144() throws Exception {		if (versionMeetsMinimum(4, 1)) {			Properties props = new Properties();			props.setProperty("emulateUnsupportedPstmts", "false");			props.setProperty("useServerPrepStmts", "true");			Connection bareConn = getConnectionWithProps(props);			int currentOpenStatements = ((com.mysql.jdbc.Connection) bareConn)					.getActiveStatementCount();			try {				bareConn.prepareStatement("Boo!");				fail("Should not've been able to prepare that one!");			} catch (SQLException sqlEx) {				assertEquals(currentOpenStatements,						((com.mysql.jdbc.Connection) bareConn)								.getActiveStatementCount());			} finally {				if (bareConn != null) {					bareConn.close();				}			}		}	}	/**	 * Tests fix for BUG#10496 - SQLException is thrown when using property	 * "characterSetResults"	 */	public void testBug10496() throws Exception {		if (versionMeetsMinimum(5, 0, 3)) {			Properties props = new Properties();			props.setProperty("useUnicode", "true");			props.setProperty("characterEncoding", "WINDOWS-31J");			props.setProperty("characterSetResults", "WINDOWS-31J");			getConnectionWithProps(props).close();			props = new Properties();			props.setProperty("useUnicode", "true");			props.setProperty("characterEncoding", "EUC_JP");			props.setProperty("characterSetResults", "EUC_JP");			getConnectionWithProps(props).close();		}	}	/**	 * Tests fix for BUG#11259, autoReconnect ping causes exception on	 * connection startup.	 * 	 * @throws Exception	 *             if the test fails.	 */	public void testBug11259() throws Exception {		Connection dsConn = null;		try {			Properties props = new Properties();			props.setProperty("autoReconnect", "true");			dsConn = getConnectionWithProps(props);		} finally {			if (dsConn != null) {				dsConn.close();			}		}	}	/**	 * Tests fix for BUG#11879 -- ReplicationConnection won't switch to slave,	 * throws "Catalog can't be null" exception.	 * 	 * @throws Exception	 *             if the test fails	 */	public void testBug11879() throws Exception {		if (runMultiHostTests()) {			Connection replConn = null;			try {				replConn = getMasterSlaveReplicationConnection();				replConn.setReadOnly(true);				replConn.setReadOnly(false);			} finally {				if (replConn != null) {					replConn.close();				}			}		}	}	/**	 * Tests fix for BUG#11976 - maxPerformance.properties mis-spells	 * "elideSetAutoCommits".	 * 	 * @throws Exception	 *             if the test fails.	 */	public void testBug11976() throws Exception {		if (isRunningOnJdk131()) {			return; // test not valid on JDK-1.3.1		}		Properties props = new Properties();		props.setProperty("useConfigs", "maxPerformance");		Connection maxPerfConn = getConnectionWithProps(props);		assertEquals(true, ((com.mysql.jdbc.Connection) maxPerfConn)				.getElideSetAutoCommits());	}	/**	 * Tests fix for BUG#12218, properties shared between master and slave with	 * replication connection.	 * 	 * @throws Exception	 *             if the test fails.	 */	public void testBug12218() throws Exception {		if (runMultiHostTests()) {			Connection replConn = null;			try {				replConn = getMasterSlaveReplicationConnection();				assertTrue(!((ReplicationConnection) replConn)						.getMasterConnection().hasSameProperties(								((ReplicationConnection) replConn)										.getSlavesConnection()));			} finally {				if (replConn != null) {					replConn.close();				}			}		}	}	/**	 * Tests fix for BUG#12229 - explainSlowQueries hangs with server-side	 * prepared statements.	 * 	 * @throws Exception	 *             if the test fails.	 */	public void testBug12229() throws Exception {		createTable("testBug12229", "(`int_field` integer )");		this.stmt.executeUpdate("insert into testBug12229 values (123456),(1)");		Properties props = new Properties();		props.put("profileSQL", "true");		props.put("slowQueryThresholdMillis", "0");		props.put("logSlowQueries", "true");		props.put("explainSlowQueries", "true");		props.put("useServerPrepStmts", "true");		Connection explainConn = getConnectionWithProps(props);		this.pstmt = explainConn				.prepareStatement("SELECT `int_field` FROM `testBug12229` WHERE `int_field` = ?");		this.pstmt.setInt(1, 1);		this.rs = this.pstmt.executeQuery();		assertTrue(this.rs.next());		this.rs = this.pstmt.executeQuery();		assertTrue(this.rs.next());		this.rs = this.pstmt.executeQuery();		assertTrue(this.rs.next());	}	/**	 * Tests fix for BUG#12752 - Cp1251 incorrectly mapped to win1251 for	 * servers newer than 4.0.x.	 * 	 * @throws Exception	 *             if the test fails.	 */	public void testBug12752() throws Exception {		Properties props = new Properties();		props.setProperty("characterEncoding", "Cp1251");		getConnectionWithProps(props).close();	}	/**	 * Tests fix for BUG#12753, sessionVariables=....=...., doesn't work as it's	 * tokenized incorrectly.	 * 	 * @throws Exception	 *             if the test fails.	 */	public void testBug12753() throws Exception {		if (versionMeetsMinimum(4, 1)) {			Properties props = new Properties();			props.setProperty("sessionVariables", "sql_mode=ansi");			Connection sessionConn = null;			try {				sessionConn = getConnectionWithProps(props);				String sqlMode = getMysqlVariable(sessionConn, "sql_mode");				assertTrue(sqlMode.indexOf("ANSI") != -1);			} finally {				if (sessionConn != null) {					sessionConn.close();					sessionConn = null;				}			}		}	}	/**	 * Tests fix for BUG#13048 - maxQuerySizeToLog is not respected.	 * 	 * @throws Exception	 *             if the test fails	 */	public void testBug13048() throws Exception {		Connection profileConn = null;		PrintStream oldErr = System.err;		try {			ByteArrayOutputStream bOut = new ByteArrayOutputStream();			System.setErr(new PrintStream(bOut));

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产麻豆视频精品| 在线观看视频91| 欧美少妇bbb| 精品久久久久一区| 亚洲影视资源网| 国产传媒久久文化传媒| 欧美色精品天天在线观看视频| 26uuu国产日韩综合| 午夜欧美2019年伦理| 成人午夜激情视频| 久久久久久久网| 日本不卡123| 欧美日韩成人综合在线一区二区| 中文字幕欧美一| 风流少妇一区二区| 国产欧美日韩另类一区| 麻豆成人久久精品二区三区红| 在线欧美一区二区| 亚洲精品日韩综合观看成人91| 国产成都精品91一区二区三| 欧美高清视频不卡网| 亚洲国产人成综合网站| 在线免费av一区| 一区二区三区四区在线免费观看| av不卡在线播放| 国产精品久久久久久久久久久免费看| 国内精品久久久久影院色| 日韩欧美一区中文| 久久国产精品色| 久久久99免费| 国产传媒欧美日韩成人| 国产精品免费久久久久| 成人视屏免费看| 国产精品久久久久久久久久久免费看| 成人免费黄色大片| 亚洲精品国产a| 欧美乱熟臀69xxxxxx| 日韩成人一区二区三区在线观看| 91精品国产综合久久婷婷香蕉 | 亚洲成av人片观看| 欧美日韩1区2区| 奇米影视在线99精品| 日韩欧美一区二区三区在线| 久久99精品视频| 亚洲国产精品成人综合色在线婷婷 | 国产一区二区三区在线观看免费视频| 91精品国产综合久久久久久漫画| 日本美女一区二区| 日韩精品中文字幕一区| 91久久久免费一区二区| 亚洲一区二区三区四区在线观看 | 亚洲国产日韩一级| 日韩亚洲欧美成人一区| 国产精品白丝jk黑袜喷水| 国产精品福利一区二区三区| 欧美亚日韩国产aⅴ精品中极品| 日韩av一区二区三区四区| 久久新电视剧免费观看| 99国内精品久久| 免费在线观看视频一区| 国产欧美日韩三级| 欧美精品久久一区| 国产成人av一区二区三区在线| 亚洲精品水蜜桃| 精品国产乱码久久久久久牛牛| 不卡的av电影| 蜜臀a∨国产成人精品| 1024亚洲合集| 日韩精品一区二区三区三区免费| 成人av网址在线观看| 亚洲成国产人片在线观看| 久久精品一区四区| 欧美电影一区二区| 99精品视频一区| 黑人巨大精品欧美一区| 亚洲乱码中文字幕综合| 精品久久久久久久久久久院品网 | 欧美一区二区精品在线| 成人av在线影院| 久久精品噜噜噜成人av农村| 一区在线观看免费| 久久久综合精品| 69久久夜色精品国产69蝌蚪网| 91亚洲永久精品| 国产在线精品不卡| 午夜一区二区三区视频| 欧美国产1区2区| 久久久噜噜噜久久人人看| 欧美日韩不卡在线| 在线免费观看日韩欧美| 99精品久久只有精品| 国产成人一区在线| 久久99精品国产| 日韩电影一区二区三区| 亚洲国产视频一区二区| 亚洲欧洲无码一区二区三区| 国产人伦精品一区二区| 日韩久久久精品| 制服丝袜中文字幕一区| 日本二三区不卡| 色综合久久久久综合体桃花网| 国产成人精品影视| 国产一区二区三区综合| 韩国精品主播一区二区在线观看| 日韩国产精品久久久| 国产精品亚洲午夜一区二区三区 | voyeur盗摄精品| 国产成人精品www牛牛影视| 免费国产亚洲视频| 日韩av在线播放中文字幕| 午夜成人免费视频| 视频一区欧美精品| 天堂久久久久va久久久久| 亚洲一区二区偷拍精品| 亚洲国产色一区| 男人的j进女人的j一区| 蜜桃视频在线一区| 精品一区二区在线看| 狠狠色丁香九九婷婷综合五月| 激情五月播播久久久精品| 激情欧美日韩一区二区| 国产成人免费视频网站| 99精品国产一区二区三区不卡| 99精品视频在线观看| 欧美性videosxxxxx| 欧美精品v国产精品v日韩精品 | 国产精品久久久久久妇女6080| 国产欧美日韩不卡| 18成人在线观看| 亚洲国产日韩一区二区| 精品一区二区三区香蕉蜜桃| 国产一本一道久久香蕉| 99久久婷婷国产综合精品电影| av在线播放不卡| 欧美午夜精品久久久| 日韩手机在线导航| 国产精品欧美一级免费| 一区二区三区鲁丝不卡| 日韩精品免费专区| 成人免费视频一区| 欧美亚一区二区| 久久久久久免费毛片精品| 中文字幕一区二区三区在线观看 | 亚洲蜜臀av乱码久久精品蜜桃| 亚洲一区二区黄色| 另类小说图片综合网| av日韩在线网站| 欧美一区二区成人6969| 国产精品嫩草99a| 日韩电影在线一区二区三区| 福利电影一区二区| 欧美一区二区三区四区五区| 国产精品乱码妇女bbbb| 婷婷中文字幕综合| 成人av在线一区二区| 日韩一卡二卡三卡| 亚洲欧美一区二区不卡| 极品美女销魂一区二区三区 | 亚洲成人av电影| 国产福利91精品一区二区三区| 在线观看一区日韩| 久久精品水蜜桃av综合天堂| 亚洲一区二区欧美| 成a人片国产精品| 精品国产一区二区三区忘忧草| 久久精品国产一区二区三| 不卡电影免费在线播放一区| 在线播放国产精品二区一二区四区 | 美女一区二区视频| 色哟哟国产精品| 国产精品久久二区二区| 国产在线播精品第三| 欧美日韩美少妇| 一区二区三区在线不卡| 99久久777色| 国产欧美在线观看一区| 久久国产剧场电影| 91麻豆精品国产91久久久久久 | 亚洲激情第一区| 成人免费精品视频| 国产午夜精品一区二区三区视频| 午夜精品一区二区三区免费视频| av在线这里只有精品| 日本一区二区久久| 国内精品国产成人国产三级粉色| 6080yy午夜一二三区久久| 亚洲一区二区三区小说| 91啪在线观看| 亚洲日本在线a| 成人精品国产一区二区4080| 久久精品欧美日韩精品| 久久国产精品99精品国产| 欧美一区二区三区啪啪| 亚洲va在线va天堂| 欧美电影一区二区三区| 日韩国产一二三区| 精品人在线二区三区| 蜜桃av一区二区在线观看| 精品免费视频一区二区| 精品一区二区三区免费|