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

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

?? connectionregressiontest.java

?? mysql jdbc驅動程序 mysql jdbc驅動程序 mysql jdbc驅動程序 mysql jdbc驅動程序
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
			Properties props = new Properties();			props.setProperty("profileSQL", "true");			props.setProperty("maxQuerySizeToLog", "2");			props.setProperty("logger", "com.mysql.jdbc.log.StandardLogger");			profileConn = getConnectionWithProps(props);			StringBuffer queryBuf = new StringBuffer("SELECT '");			for (int i = 0; i < 500; i++) {				queryBuf.append("a");			}			queryBuf.append("'");			this.rs = profileConn.createStatement().executeQuery(					queryBuf.toString());			this.rs.close();			String logString = new String(bOut.toString("ISO8859-1"));			assertTrue(logString.indexOf("... (truncated)") != -1);			bOut = new ByteArrayOutputStream();			System.setErr(new PrintStream(bOut));			this.rs = profileConn.prepareStatement(queryBuf.toString())					.executeQuery();			logString = new String(bOut.toString("ISO8859-1"));			assertTrue(logString.indexOf("... (truncated)") != -1);		} finally {			System.setErr(oldErr);			if (profileConn != null) {				profileConn.close();			}			if (this.rs != null) {				ResultSet toClose = this.rs;				this.rs = null;				toClose.close();			}		}	}	/**	 * Tests fix for BUG#13453 - can't use & or = in URL configuration values	 * (we now allow you to use www-form-encoding).	 * 	 * @throws Exception	 *             if the test fails	 */	public void testBug13453() throws Exception {		StringBuffer urlBuf = new StringBuffer(dbUrl);		if (dbUrl.indexOf('?') == -1) {			urlBuf.append('?');		} else {			urlBuf.append('&');		}		urlBuf.append("sessionVariables=@testBug13453='%25%26+%3D'");		Connection encodedConn = null;		try {			encodedConn = DriverManager.getConnection(urlBuf.toString(), null);			this.rs = encodedConn.createStatement().executeQuery(					"SELECT @testBug13453");			assertTrue(this.rs.next());			assertEquals("%& =", this.rs.getString(1));		} finally {			if (this.rs != null) {				this.rs.close();				this.rs = null;			}			if (encodedConn != null) {				encodedConn.close();			}		}	}	/**	 * Tests fix for BUG#15065 - Usage advisor complains about unreferenced	 * columns, even though they've been referenced.	 * 	 * @throws Exception	 *             if the test fails.	 */	public void testBug15065() throws Exception {		if (isRunningOnJdk131()) {			return; // test not valid on JDK-1.3.1		}		createTable("testBug15065", "(field1 int)");		this.stmt.executeUpdate("INSERT INTO testBug15065 VALUES (1)");		Connection advisorConn = null;		Statement advisorStmt = null;		try {			Properties props = new Properties();			props.setProperty("useUsageAdvisor", "true");			props.setProperty("logger", "com.mysql.jdbc.log.StandardLogger");			advisorConn = getConnectionWithProps(props);			advisorStmt = advisorConn.createStatement();			Method[] getMethods = ResultSet.class.getMethods();			PrintStream oldErr = System.err;			try {				ByteArrayOutputStream bOut = new ByteArrayOutputStream();				System.setErr(new PrintStream(bOut));								HashMap methodsToSkipMap = new HashMap();								// Needs an actual URL				methodsToSkipMap.put("getURL", null);								// Java6 JDBC4.0 methods we don't implement				methodsToSkipMap.put("getNCharacterStream", null);				methodsToSkipMap.put("getNClob", null);				methodsToSkipMap.put("getNString", null);				methodsToSkipMap.put("getRowId", null);				methodsToSkipMap.put("getSQLXML", null);								for (int j = 0; j < 2; j++) {					for (int i = 0; i < getMethods.length; i++) {						String methodName = getMethods[i].getName();						if (methodName.startsWith("get")								&& !methodsToSkipMap.containsKey(methodName)) {							Class[] parameterTypes = getMethods[i]									.getParameterTypes();							if (parameterTypes.length == 1									&& parameterTypes[0] == Integer.TYPE) {								if (j == 0) {									this.rs = advisorStmt											.executeQuery("SELECT COUNT(*) FROM testBug15065");								} else {									this.rs = advisorConn											.prepareStatement(													"SELECT COUNT(*) FROM testBug15065")											.executeQuery();								}								this.rs.next();								try {									getMethods[i].invoke(this.rs,											new Object[] { new Integer(1) });								} catch (InvocationTargetException invokeEx) {									// we don't care about bad values, just that									// the									// column gets "touched"									if (!invokeEx											.getCause()											.getClass()											.isAssignableFrom(													java.sql.SQLException.class)											&& !invokeEx													.getCause()													.getClass()													.getName()													.equals(															"com.mysql.jdbc.NotImplemented")) {										throw invokeEx;									}								}								this.rs.close();								this.rs = null;							}						}					}				}				String logOut = bOut.toString("ISO8859-1");				if (logOut.indexOf(".Level") != -1) {					return; // we ignore for warnings				}				assertTrue("Usage advisor complained about columns:\n\n"						+ logOut, logOut.indexOf("columns") == -1);			} finally {				System.setErr(oldErr);			}		} finally {			if (advisorConn != null) {				advisorConn.close();			}		}	}		/**	 * Tests fix for BUG#15544, no "dos" character set in MySQL > 4.1.0	 * 	 * @throws Exception	 *             if the test fails	 */	public void testBug15544() throws Exception {		Properties props = new Properties();		props.setProperty("characterEncoding", "Cp437");		Connection dosConn = null;		try {			dosConn = getConnectionWithProps(props);		} finally {			if (dosConn != null) {				dosConn.close();			}		}	}	public void testCSC5765() throws Exception {		if (isRunningOnJdk131()) {			return; // test not valid on JDK-1.3.1		}		Properties props = new Properties();		props.setProperty("useUnicode", "true");		props.setProperty("characterEncoding", "utf8");		props.setProperty("characterSetResults", "utf8");		props.setProperty("connectionCollation", "utf8_bin");		Connection utf8Conn = null;		try {			utf8Conn = getConnectionWithProps(props);			this.rs = utf8Conn.createStatement().executeQuery(					"SHOW VARIABLES LIKE 'character_%'");			while (this.rs.next()) {				System.out.println(this.rs.getString(1) + " = "						+ this.rs.getString(2));			}			this.rs = utf8Conn.createStatement().executeQuery(					"SHOW VARIABLES LIKE 'collation_%'");			while (this.rs.next()) {				System.out.println(this.rs.getString(1) + " = "						+ this.rs.getString(2));			}		} finally {			if (utf8Conn != null) {				utf8Conn.close();			}		}	}	private Connection getMasterSlaveReplicationConnection()			throws SQLException {		Connection replConn = new ReplicationDriver().connect(				getMasterSlaveUrl(), getMasterSlaveProps());		return replConn;	}	protected String getMasterSlaveUrl() throws SQLException {		StringBuffer urlBuf = new StringBuffer("jdbc:mysql://");		Properties defaultProps = getPropertiesFromTestsuiteUrl();		String hostname = defaultProps				.getProperty(NonRegisteringDriver.HOST_PROPERTY_KEY);		int colonIndex = hostname.indexOf(":");		String portNumber = "3306";		if (colonIndex != -1 && !hostname.startsWith(":")) {			portNumber = hostname.substring(colonIndex + 1);			hostname = hostname.substring(0, colonIndex);		} else if (hostname.startsWith(":")) {			portNumber = hostname.substring(1);			hostname = "localhost";		} else {			portNumber = defaultProps					.getProperty(NonRegisteringDriver.PORT_PROPERTY_KEY);		}		for (int i = 0; i < 2; i++) {			urlBuf.append(hostname);			urlBuf.append(":");			urlBuf.append(portNumber);			if (i == 0) {				urlBuf.append(",");			}		}		urlBuf.append("/");		return urlBuf.toString();	}	protected Properties getMasterSlaveProps() throws SQLException {		Properties props = getPropertiesFromTestsuiteUrl();		props.remove(NonRegisteringDriver.HOST_PROPERTY_KEY);		props.remove(NonRegisteringDriver.PORT_PROPERTY_KEY);		return props;	}	/**	 * Tests fix for BUG#15570 - ReplicationConnection incorrectly copies state,	 * doesn't transfer connection context correctly when transitioning between	 * the same read-only states.	 * 	 * (note, this test will fail if the test user doesn't have permission to	 * "USE 'mysql'".	 * 	 * @throws Exception	 *             if the test fails.	 */	public void testBug15570() throws Exception {		Connection replConn = null;		try {			replConn = getMasterSlaveReplicationConnection();			int masterConnectionId = Integer					.parseInt(getSingleIndexedValueWithQuery(replConn, 1,							"SELECT CONNECTION_ID()").toString());			replConn.setReadOnly(false);			assertEquals(masterConnectionId, Integer					.parseInt(getSingleIndexedValueWithQuery(replConn, 1,							"SELECT CONNECTION_ID()").toString()));			String currentCatalog = replConn.getCatalog();			replConn.setCatalog(currentCatalog);			assertEquals(currentCatalog, replConn.getCatalog());			replConn.setReadOnly(true);			int slaveConnectionId = Integer					.parseInt(getSingleIndexedValueWithQuery(replConn, 1,							"SELECT CONNECTION_ID()").toString());			// The following test is okay for now, as the chance			// of MySQL wrapping the connection id counter during our			// testsuite is very small.			assertTrue("Slave id " + slaveConnectionId					+ " is not newer than master id " + masterConnectionId,					slaveConnectionId > masterConnectionId);			assertEquals(currentCatalog, replConn.getCatalog());			String newCatalog = "mysql";			replConn.setCatalog(newCatalog);			assertEquals(newCatalog, replConn.getCatalog());			replConn.setReadOnly(true);			assertEquals(newCatalog, replConn.getCatalog());			replConn.setReadOnly(false);			assertEquals(masterConnectionId, Integer					.parseInt(getSingleIndexedValueWithQuery(replConn, 1,							"SELECT CONNECTION_ID()").toString()));		} finally {			if (replConn != null) {				replConn.close();			}		}	}	/**	 * Tests bug where downed slave caused round robin load balance not to	 * cycle back to first host in the list.	 * 	 * @throws Exception	 *             if the test fails...Note, test is timing-dependent, but	 *             should work in most cases.	 */	public void testBug23281() throws Exception {		Properties props = new Driver().parseURL(BaseTestCase.dbUrl, null);		props.setProperty("autoReconnect", "false");		props.setProperty("roundRobinLoadBalance", "true");		props.setProperty("failoverReadOnly", "false");				if (!isRunningOnJdk131()) {			props.setProperty("connectTimeout", "5000");		}				// 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);		if (port != null) {			newHostBuf.append(":");			newHostBuf.append(port);		}			newHostBuf.append(",");		//newHostBuf.append(host);		newHostBuf.append("192.0.2.1"); // non-exsitent machine from RFC3330 test network		newHostBuf.append(":65532"); // make sure the slave fails		

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91亚洲精品乱码久久久久久蜜桃| 精品99一区二区三区| 国产一区二区三区视频在线播放| 天堂一区二区在线| 日日摸夜夜添夜夜添国产精品| 久久精品国产一区二区三| 亚洲综合小说图片| 国产精品美女久久久久久2018| 国产三级三级三级精品8ⅰ区| 久久影院午夜论| 国产日产精品一区| 中文字幕一区二区不卡| 亚洲综合免费观看高清完整版在线| 樱花影视一区二区| 日本欧美一区二区| 国产精品18久久久久| 91美女在线视频| 欧美丰满高潮xxxx喷水动漫| 精品国产网站在线观看| 中国av一区二区三区| 亚洲一区二区影院| 久久99久久久欧美国产| 成人免费高清视频在线观看| 91福利社在线观看| 日韩亚洲欧美成人一区| 国产精品久久久久aaaa| 午夜成人在线视频| 丁香婷婷综合五月| 欧美嫩在线观看| 国产精品视频免费| 亚洲成人你懂的| 国产福利一区在线| 欧美高清视频不卡网| 国产精品素人视频| 毛片av一区二区三区| 成人18精品视频| 日韩精品在线看片z| 亚洲码国产岛国毛片在线| 另类小说综合欧美亚洲| 91美女在线看| 国产调教视频一区| 日韩一区精品视频| 一本大道久久精品懂色aⅴ| 精品乱人伦小说| 午夜精品福利一区二区三区av| 国产毛片精品一区| 欧美一区二区视频观看视频| 欧美一区中文字幕| 亚洲精品久久7777| 懂色av中文一区二区三区| 欧美一级xxx| 亚洲18色成人| 欧美制服丝袜第一页| 国产女人18水真多18精品一级做| 日韩中文字幕91| 欧美视频三区在线播放| 亚洲天天做日日做天天谢日日欢| 国产激情一区二区三区桃花岛亚洲| 制服丝袜日韩国产| 亚洲午夜精品一区二区三区他趣| 成人av影院在线| 国产精品色婷婷| 风间由美性色一区二区三区| 精品成人一区二区三区四区| 三级影片在线观看欧美日韩一区二区| 一本色道**综合亚洲精品蜜桃冫| 日本一区二区三区高清不卡| 国产成人av福利| 久久久国际精品| 国产成都精品91一区二区三| 久久久亚洲精华液精华液精华液| 久久99精品久久久久久国产越南 | 亚洲成人激情自拍| 色噜噜狠狠成人中文综合| 中文字幕永久在线不卡| 懂色av一区二区三区蜜臀| 日韩精品一区国产麻豆| 亚洲妇女屁股眼交7| 欧美亚洲另类激情小说| 一区二区三区精品视频在线| 97久久超碰精品国产| 亚洲码国产岛国毛片在线| 色综合久久久久网| 亚洲人精品午夜| 欧美男女性生活在线直播观看| 一区二区三区美女视频| 91在线精品秘密一区二区| 亚洲四区在线观看| 欧美视频一区在线| 久久99九九99精品| 亚洲欧洲在线观看av| 欧美日韩精品久久久| 免费三级欧美电影| 国产人久久人人人人爽| eeuss鲁一区二区三区| 亚洲国产乱码最新视频| 日韩一二三四区| 成人少妇影院yyyy| 亚洲国产精品一区二区久久恐怖片| 制服丝袜亚洲色图| 国产不卡视频在线观看| 亚洲激情五月婷婷| 精品国产麻豆免费人成网站| 成人美女视频在线观看18| 亚洲国产欧美另类丝袜| 久久青草欧美一区二区三区| 972aa.com艺术欧美| 三级在线观看一区二区| 国产亚洲1区2区3区| 国产一区二区三区黄视频| 国产精品丝袜久久久久久app| 色婷婷国产精品综合在线观看| 日韩精品电影在线| 中文字幕中文字幕一区| 777亚洲妇女| 91在线观看成人| 久久69国产一区二区蜜臀| 亚洲精品一二三四区| 欧美大片国产精品| 欧美影院午夜播放| 国产在线精品一区二区三区不卡| 一区二区三区日韩欧美| 国产网站一区二区| 亚洲自拍偷拍综合| 中文字幕精品一区二区精品绿巨人| 欧美日韩美女一区二区| 99re8在线精品视频免费播放| 美女一区二区在线观看| 亚洲精品水蜜桃| 欧美国产日韩a欧美在线观看 | 国产一区二区主播在线| 亚洲午夜精品17c| 亚洲欧美日韩在线不卡| 久久久久久久网| 欧美一区二区三区免费视频| 欧美自拍偷拍午夜视频| 99久久久久免费精品国产| 国产福利不卡视频| 激情综合色播五月| 美女免费视频一区二区| 亚洲国产成人高清精品| 亚洲黄色尤物视频| 亚洲天天做日日做天天谢日日欢 | 日韩免费成人网| 欧美日韩一区二区电影| 在线观看成人小视频| 91蜜桃网址入口| 91色|porny| 97精品超碰一区二区三区| av一区二区三区| 色综合久久久网| 日本丶国产丶欧美色综合| 色偷偷一区二区三区| 色久综合一二码| 91国偷自产一区二区三区成为亚洲经典 | 精品久久久久久久人人人人传媒 | 欧美日韩精品免费观看视频| 在线一区二区视频| 欧美在线免费播放| 欧美日本一道本在线视频| 欧美剧在线免费观看网站| 欧美日韩不卡在线| 91精品国产色综合久久不卡电影 | 国产欧美一二三区| 日韩精品专区在线| 久久久久久麻豆| 国产精品色呦呦| 综合激情成人伊人| 午夜欧美电影在线观看| 日本v片在线高清不卡在线观看| 日韩av电影免费观看高清完整版 | av中文字幕一区| 在线观看亚洲精品| 日韩一级二级三级| 欧美国产日韩在线观看| 一区二区高清免费观看影视大全 | 久久久91精品国产一区二区精品| 久久精品人人做人人爽人人| 日韩美女久久久| 亚洲成a人在线观看| 久久精品国产亚洲一区二区三区 | 午夜影院久久久| 久久99精品一区二区三区| 成人av电影免费在线播放| 日本久久精品电影| 精品国产一区二区三区久久久蜜月 | 亚洲一区中文在线| 久久精品噜噜噜成人88aⅴ| 成人激情校园春色| 91精品蜜臀在线一区尤物| 欧美激情自拍偷拍| 青青国产91久久久久久 | 一级特黄大欧美久久久| 精品在线一区二区| 91久久精品日日躁夜夜躁欧美| 精品国产99国产精品| 亚洲自拍偷拍av| 高清国产一区二区| 日韩视频免费直播| 亚洲成人午夜电影|