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

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

?? statementregressiontest.java

?? mysql jdbc驅動程序 mysql jdbc驅動程序 mysql jdbc驅動程序 mysql jdbc驅動程序
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
		if (versionMeetsMinimum(4, 1, 0)) {			createTable(tableName,					"(pwd VARBINARY(30)) TYPE=InnoDB DEFAULT CHARACTER SET utf8");			byte[] bytesToTest = new byte[] { 17, 120, -1, -73, -5 };			PreparedStatement insStmt = this.conn					.prepareStatement("INSERT INTO " + tableName							+ " (pwd) VALUES (?)");			insStmt.setBytes(1, bytesToTest);			insStmt.executeUpdate();			this.rs = this.stmt.executeQuery("SELECT pwd FROM " + tableName);			this.rs.next();			byte[] fromDatabase = this.rs.getBytes(1);			assertEquals(bytesToTest.length, fromDatabase.length);			for (int i = 0; i < bytesToTest.length; i++) {				assertEquals(bytesToTest[i], fromDatabase[i]);			}			this.rs = this.conn					.prepareStatement("SELECT pwd FROM " + tableName)					.executeQuery();			this.rs.next();			fromDatabase = this.rs.getBytes(1);			assertEquals(bytesToTest.length, fromDatabase.length);			for (int i = 0; i < bytesToTest.length; i++) {				assertEquals(bytesToTest[i], fromDatabase[i]);			}		}	}	public void testBug11540() throws Exception {		Locale originalLocale = Locale.getDefault();		Connection thaiConn = null;		Statement thaiStmt = null;		PreparedStatement thaiPrepStmt = null;		try {			createTable("testBug11540", "(field1 DATE, field2 TIMESTAMP)");			this.stmt					.executeUpdate("INSERT INTO testBug11540 VALUES (NOW(), NOW())");			Locale.setDefault(new Locale("th", "TH"));			Properties props = new Properties();			props.setProperty("jdbcCompliantTruncation", "false");			thaiConn = getConnectionWithProps(props);			thaiStmt = thaiConn.createStatement();			this.rs = thaiStmt					.executeQuery("SELECT field1, field2 FROM testBug11540");			this.rs.next();			Date origDate = this.rs.getDate(1);			Timestamp origTimestamp = this.rs.getTimestamp(1);			this.rs.close();			thaiStmt.executeUpdate("TRUNCATE TABLE testBug11540");			thaiPrepStmt = ((com.mysql.jdbc.Connection) thaiConn)					.clientPrepareStatement("INSERT INTO testBug11540 VALUES (?,?)");			thaiPrepStmt.setDate(1, origDate);			thaiPrepStmt.setTimestamp(2, origTimestamp);			thaiPrepStmt.executeUpdate();			this.rs = thaiStmt					.executeQuery("SELECT field1, field2 FROM testBug11540");			this.rs.next();			Date testDate = this.rs.getDate(1);			Timestamp testTimestamp = this.rs.getTimestamp(1);			this.rs.close();			assertEquals(origDate, testDate);			assertEquals(origTimestamp, testTimestamp);		} finally {			Locale.setDefault(originalLocale);		}	}	/**	 * Tests fix for BUG#11663, autoGenerateTestcaseScript uses bogus parameter	 * names for server-side prepared statements.	 * 	 * @throws Exception	 *             if the test fails.	 */	public void testBug11663() throws Exception {		if (versionMeetsMinimum(4, 1, 0)				&& ((com.mysql.jdbc.Connection) this.conn)						.getUseServerPreparedStmts()) {			Connection testcaseGenCon = null;			PrintStream oldErr = System.err;			try {				createTable("testBug11663", "(field1 int)");				Properties props = new Properties();				props.setProperty("autoGenerateTestcaseScript", "true");				testcaseGenCon = getConnectionWithProps(props);				ByteArrayOutputStream testStream = new ByteArrayOutputStream();				PrintStream testErr = new PrintStream(testStream);				System.setErr(testErr);				this.pstmt = testcaseGenCon						.prepareStatement("SELECT field1 FROM testBug11663 WHERE field1=?");				this.pstmt.setInt(1, 1);				this.pstmt.execute();				System.setErr(oldErr);				String testString = new String(testStream.toByteArray());				int setIndex = testString.indexOf("SET @debug_stmt_param");				int equalsIndex = testString.indexOf("=", setIndex);				String paramName = testString.substring(setIndex + 4,						equalsIndex);				int usingIndex = testString.indexOf("USING " + paramName,						equalsIndex);				assertTrue(usingIndex != -1);			} finally {				System.setErr(oldErr);				if (this.pstmt != null) {					this.pstmt.close();					this.pstmt = null;				}				if (testcaseGenCon != null) {					testcaseGenCon.close();				}			}		}	}	/**	 * Tests fix for BUG#11798 - Pstmt.setObject(...., Types.BOOLEAN) throws	 * exception.	 * 	 * @throws Exception	 *             if the test fails.	 */	public void testBug11798() throws Exception {		if (isRunningOnJdk131()) {			return; // test not valid on JDK-1.3.1		}		try {			this.pstmt = this.conn.prepareStatement("SELECT ?");			this.pstmt.setObject(1, Boolean.TRUE, Types.BOOLEAN);			this.pstmt.setObject(1, new BigDecimal("1"), Types.BOOLEAN);			this.pstmt.setObject(1, "true", Types.BOOLEAN);		} finally {			if (this.pstmt != null) {				this.pstmt.close();				this.pstmt = null;			}		}	}	/**	 * Tests fix for BUG#13255 - Reconnect during middle of executeBatch()	 * should not happen.	 * 	 * @throws Exception	 *             if the test fails.	 */	public void testBug13255() throws Exception {		createTable("testBug13255", "(field_1 int)");		Properties props = new Properties();		props.setProperty("autoReconnect", "true");		Connection reconnectConn = null;		Statement reconnectStmt = null;		PreparedStatement reconnectPStmt = null;		try {			reconnectConn = getConnectionWithProps(props);			reconnectStmt = reconnectConn.createStatement();			String connectionId = getSingleIndexedValueWithQuery(reconnectConn,					1, "SELECT CONNECTION_ID()").toString();			reconnectStmt.addBatch("INSERT INTO testBug13255 VALUES (1)");			reconnectStmt.addBatch("INSERT INTO testBug13255 VALUES (2)");			reconnectStmt.addBatch("KILL " + connectionId);			for (int i = 0; i < 100; i++) {				reconnectStmt.addBatch("INSERT INTO testBug13255 VALUES (" + i						+ ")");			}			try {				reconnectStmt.executeBatch();			} catch (SQLException sqlEx) {				// We expect this...we killed the connection			}			assertEquals(2, getRowCount("testBug13255"));			this.stmt.executeUpdate("TRUNCATE TABLE testBug13255");			reconnectConn.close();			reconnectConn = getConnectionWithProps(props);			connectionId = getSingleIndexedValueWithQuery(reconnectConn, 1,					"SELECT CONNECTION_ID()").toString();			reconnectPStmt = reconnectConn					.prepareStatement("INSERT INTO testBug13255 VALUES (?)");			reconnectPStmt.setInt(1, 1);			reconnectPStmt.addBatch();			reconnectPStmt.setInt(1, 2);			reconnectPStmt.addBatch();			reconnectPStmt.addBatch("KILL " + connectionId);			for (int i = 3; i < 100; i++) {				reconnectPStmt.setInt(1, i);				reconnectPStmt.addBatch();			}			try {				reconnectPStmt.executeBatch();			} catch (SQLException sqlEx) {				// We expect this...we killed the connection			}			assertEquals(2, getRowCount("testBug13255"));		} finally {			if (reconnectStmt != null) {				reconnectStmt.close();			}			if (reconnectConn != null) {				reconnectConn.close();			}		}	}	/**	 * Tests fix for BUG#15024 - Driver incorrectly closes streams passed as	 * arguments to PreparedStatements.	 * 	 * @throws Exception	 *             if the test fails.	 */	public void testBug15024() throws Exception {		createTable("testBug15024", "(field1 BLOB)");		try {			this.pstmt = this.conn					.prepareStatement("INSERT INTO testBug15024 VALUES (?)");			testStreamsForBug15024(false, false);			Properties props = new Properties();			props.setProperty("useConfigs", "3-0-Compat");			Connection compatConn = null;			try {				compatConn = getConnectionWithProps(props);				this.pstmt = compatConn						.prepareStatement("INSERT INTO testBug15024 VALUES (?)");				testStreamsForBug15024(true, false);			} finally {				if (compatConn != null) {					compatConn.close();				}			}		} finally {			if (this.pstmt != null) {				PreparedStatement toClose = this.pstmt;				this.pstmt = null;				toClose.close();			}		}	}	/**	 * PreparedStatement should call EscapeProcessor.escapeSQL?	 * 	 * @throws Exception	 *             if the test fails	 */	public void testBug15141() throws Exception {		try {			createTable("testBug15141", "(field1 VARCHAR(32))");			this.stmt.executeUpdate("INSERT INTO testBug15141 VALUES ('abc')");			this.pstmt = this.conn					.prepareStatement("select {d '1997-05-24'} FROM testBug15141");			this.rs = this.pstmt.executeQuery();			assertTrue(this.rs.next());			assertEquals("1997-05-24", this.rs.getString(1));			this.rs.close();			this.rs = null;			this.pstmt.close();			this.pstmt = null;			this.pstmt = ((com.mysql.jdbc.Connection) this.conn)					.clientPrepareStatement("select {d '1997-05-24'} FROM testBug15141");			this.rs = this.pstmt.executeQuery();			assertTrue(this.rs.next());			assertEquals("1997-05-24", this.rs.getString(1));			this.rs.close();			this.rs = null;			this.pstmt.close();			this.pstmt = null;		} finally {			if (this.rs != null) {				ResultSet toCloseRs = this.rs;				this.rs = null;				toCloseRs.close();			}			if (this.pstmt != null) {				PreparedStatement toClosePstmt = this.pstmt;				this.pstmt = null;				toClosePstmt.close();			}		}	}	/**	 * Tests fix for BUG#18041 - Server-side prepared statements don't cause	 * truncation exceptions to be thrown.	 * 	 * @throws Exception	 *             if the test fails	 */	public void testBug18041() throws Exception {		if (versionMeetsMinimum(4, 1)) {			createTable("testBug18041", "(`a` tinyint(4) NOT NULL,"					+ "`b` char(4) default NULL)");			Properties props = new Properties();			props.setProperty("jdbcCompliantTruncation", "true");			props.setProperty("useServerPrepStmts", "true");			Connection truncConn = null;			PreparedStatement stm = null;			try {				truncConn = getConnectionWithProps(props);				stm = truncConn						.prepareStatement("insert into testBug18041 values (?,?)");				stm.setInt(1, 1000);				stm.setString(2, "nnnnnnnnnnnnnnnnnnnnnnnnnnnnnn");				stm.executeUpdate();				fail("Truncation exception should have been thrown");			} catch (DataTruncation truncEx) {				// we expect this			} finally {				if (this.stmt != null) {					this.stmt.close();				}				if (truncConn != null) {					truncConn.close();				}			}		}	}	private void testStreamsForBug15024(boolean shouldBeClosedStream,			boolean shouldBeClosedReader) throws SQLException {		IsClosedInputStream bIn = new IsClosedInputStream(new byte[4]);		IsClosedReader readerIn = new IsClosedReader("abcdef");		this.pstmt.setBinaryStream(1, bIn, 4);		this.pstmt.execute();		assertEquals(shouldBeClosedStream, bIn.isClosed());		this.pstmt.setCharacterStream(1, readerIn, 6);		this.pstmt.execute();		assertEquals(shouldBeClosedReader, readerIn.isClosed());		this.pstmt.close();	}	class IsClosedReader extends StringReader {		boolean isClosed = false;		public IsClosedReader(String arg0) {			super(arg0);		}		public void close() {			super.close();			this.isClosed = true;		}		public boolean isClosed() {			return this.isClosed;		}	}	class IsClosedInputStream extends ByteArrayInputStream {		boolean isClosed = false;		public IsClosedInputStream(byte[] arg0, int arg1, int arg2) {			super(arg0, arg1, arg2);		}		public IsClosedInputStream(byte[] arg0) {			super(arg0);		}		public void close() throws IOException {			// TODO Auto-generated method stub			super.close();			this.isClosed = true;		}		public boolean isClosed() {			return this.isClosed;		}	}	/**	 * Tests fix for BUG#1774 -- Truncated words after double quote	 * 	 * @throws Exception	 *             if the test fails.	 */	public void testBug1774() throws Exception {		try {			this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug1774");			this.stmt					.executeUpdate("CREATE TABLE testBug1774 (field1 VARCHAR(255))");			PreparedStatement pStmt = this.conn					.prepareStatement("INSERT INTO testBug1774 VALUES (?)");			String testString = "The word contains \" character";			pStmt.setString(1, testString);			pStmt.executeUpdate();			this.rs = this.stmt.executeQuery("SELECT * FROM testBug1774");			this.rs.next();			assertEquals(this.rs.getString(1), testString);		} finally {			this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug1774");		}	}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品久久久蜜桃| 欧美一区二区三区影视| 国产精品色在线| 国产91精品免费| 亚洲欧洲日本在线| 色综合欧美在线| 亚洲一区在线观看视频| 欧美福利电影网| 国产自产v一区二区三区c| 欧美国产激情二区三区| 色老头久久综合| 日本不卡一区二区三区| 久久女同性恋中文字幕| 成人app在线| 亚洲一区二区成人在线观看| 日韩欧美中文字幕一区| 国产成人免费网站| 一区二区三区免费网站| 日韩午夜在线观看| 成人国产精品视频| 亚洲18影院在线观看| 精品国产三级a在线观看| 国产99久久久国产精品免费看| 91精品婷婷国产综合久久 | 久久精品国产秦先生| 精品国产伦理网| www.欧美色图| 日本成人在线看| 国产精品久久午夜夜伦鲁鲁| 欧美午夜在线观看| 国产精品 欧美精品| 亚洲一区免费观看| 久久久久久久久久久久电影| 欧美日韩欧美一区二区| 波多野结衣中文字幕一区二区三区 | 91国产视频在线观看| 播五月开心婷婷综合| 亚洲国产精品二十页| 国产盗摄视频一区二区三区| 亚洲国产一二三| 国产欧美日韩在线视频| 欧美日韩精品专区| www.亚洲人| 久久精品99久久久| 国产精品久久二区二区| 日韩午夜av一区| 色综合久久久久| 国产一区在线不卡| 午夜不卡av在线| 亚洲色图20p| 欧美极品aⅴ影院| 精品国产自在久精品国产| 欧美在线一区二区| 成人ar影院免费观看视频| 国内精品在线播放| 日韩 欧美一区二区三区| 亚洲欧美日韩系列| 国产日韩欧美一区二区三区综合| 欧美三级在线播放| 91在线观看一区二区| 丁香五精品蜜臀久久久久99网站 | 国产精品日韩成人| 精品国产乱码久久久久久闺蜜| 欧洲日韩一区二区三区| www.亚洲色图.com| 春色校园综合激情亚洲| 国产成人精品综合在线观看| 黄一区二区三区| 精品一区二区国语对白| 麻豆成人91精品二区三区| 日韩电影在线免费观看| 亚洲成人午夜电影| 丝袜美腿成人在线| 亚洲成a人在线观看| 亚洲动漫第一页| 日日夜夜精品视频天天综合网| 一区二区三区在线观看国产| 中文字幕字幕中文在线中不卡视频| 久久久精品2019中文字幕之3| 日韩精品在线一区二区| 日韩一区二区三区观看| 91精品国产福利| 日韩欧美一区二区不卡| 日韩欧美成人一区二区| 久久久精品综合| 国产精品网站在线播放| 国产精品伦理在线| 亚洲免费观看高清完整版在线观看熊| 久久综合久久久久88| 久久久久成人黄色影片| 国产精品久久影院| 亚洲高清免费观看 | 亚洲一二三四在线| 一级中文字幕一区二区| 天堂va蜜桃一区二区三区| 另类的小说在线视频另类成人小视频在线 | 91一区在线观看| 91久久香蕉国产日韩欧美9色| 国产91精品久久久久久久网曝门| 国产ts人妖一区二区| 成人av免费观看| 在线观看一区二区视频| 日韩丝袜情趣美女图片| 欧美激情中文字幕一区二区| 亚洲美女区一区| 日本特黄久久久高潮| 国产剧情一区在线| 在线精品观看国产| 精品91自产拍在线观看一区| 综合久久综合久久| 日本不卡中文字幕| av在线免费不卡| 91精品国产入口| 国产精品乱码人人做人人爱 | 亚洲综合视频在线观看| 免费成人性网站| av一区二区三区四区| 欧美日高清视频| 国产午夜三级一区二区三| 亚洲综合一区在线| 久久se这里有精品| 色偷偷成人一区二区三区91| 日韩欧美一区中文| 国产精品超碰97尤物18| 狠狠v欧美v日韩v亚洲ⅴ| 色综合久久99| 久久久久久久免费视频了| 亚洲成人午夜影院| www.性欧美| 精品久久久久久久久久久久久久久| 久久久国产综合精品女国产盗摄| 亚洲卡通欧美制服中文| 精品一区二区三区免费| 欧美日韩一级二级三级| 中文字幕在线一区免费| 久久99国产精品久久| 欧美日韩在线一区二区| 亚洲欧洲日产国码二区| 国产在线精品不卡| 欧美一区二区三区性视频| 亚洲愉拍自拍另类高清精品| 国产传媒久久文化传媒| 日韩免费看的电影| 天天色综合成人网| 在线观看三级视频欧美| 中文字幕在线不卡| 国产91精品免费| 久久久一区二区三区捆绑**| 日本成人在线一区| 欧美日韩精品一区二区天天拍小说| 国产日韩欧美激情| 免费在线看一区| 制服丝袜中文字幕亚洲| 亚洲成人一区在线| 欧美三级日韩三级国产三级| 亚洲在线视频免费观看| 欧美在线视频日韩| 一区二区欧美视频| 色婷婷av一区二区三区软件| 国产精品每日更新在线播放网址 | 蜜臀久久99精品久久久久久9| 91丨九色porny丨蝌蚪| 欧美国产日产图区| 国产91精品久久久久久久网曝门| 精品久久国产字幕高潮| 久久国产精品99久久久久久老狼| 欧美性大战xxxxx久久久| 亚洲五月六月丁香激情| 在线观看国产精品网站| 亚洲国产精品久久艾草纯爱| 欧美天天综合网| 日韩福利电影在线观看| 日韩视频一区二区在线观看| 日本成人在线不卡视频| 精品久久久久久亚洲综合网| 国产美女视频91| 国产精品久久久久一区二区三区| 国产高清久久久| 国产精品久久久久影院亚瑟| 91在线码无精品| 亚洲1区2区3区4区| 日韩欧美精品在线视频| 国产成人福利片| 亚洲视频每日更新| 91福利在线看| 青草国产精品久久久久久| 337p粉嫩大胆色噜噜噜噜亚洲| 日韩成人一级片| 精品国产91九色蝌蚪| 播五月开心婷婷综合| 亚洲成av人片在线| 精品电影一区二区| 99精品视频一区二区三区| 精品一区二区精品| 亚洲欧美经典视频| 日韩视频一区二区在线观看| 国产成人免费视频精品含羞草妖精| 国产欧美一区二区精品久导航| 丁香激情综合五月| 午夜精品久久久久久不卡8050|