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

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

?? statementregressiontest.java

?? 用于JAVA數據庫連接.解壓就可用,方便得很
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
			System.out					.println(Math.abs(pStmtDeltaTWithCal - pointInTimeOffset)							+ " < "							+ epsillon							+ (Math.abs(pStmtDeltaTWithCal - pointInTimeOffset) < epsillon));			assertTrue(					"Difference between original timestamp and timestamp retrieved using java.sql.PreparedStatement "							+ "set in database using UTC calendar is not ~= "							+ epsillon							+ ", it is actually "							+ pStmtDeltaTWithCal, (Math.abs(pStmtDeltaTWithCal							- pointInTimeOffset) < epsillon));			System.out					.println("Difference between original ts and ts with no calendar: "							+ (ts.getTime() - tsValuePstmtNoCal.getTime())							+ ", offset should be " + pointInTimeOffset);		} finally {			this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug3620");		}	}	/**	 * Tests that DataTruncation is thrown when data is truncated.	 * 	 * @throws Exception	 *             if the test fails.	 */	public void testBug3697() throws Exception {		try {			this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug3697");			this.stmt					.executeUpdate("CREATE TABLE testBug3697 (field1 VARCHAR(255))");			StringBuffer updateBuf = new StringBuffer(					"INSERT INTO testBug3697 VALUES ('");			for (int i = 0; i < 512; i++) {				updateBuf.append("A");			}			updateBuf.append("')");			try {				this.stmt.executeUpdate(updateBuf.toString());			} catch (DataTruncation dtEx) {				// This is an expected exception....			}			SQLWarning warningChain = this.stmt.getWarnings();			System.out.println(warningChain);		} finally {			this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug3697");		}	}	/**	 * Tests fix for BUG#3804, data truncation on server should throw	 * DataTruncation exception.	 * 	 * @throws Exception	 *             if the test fails	 */	public void testBug3804() throws Exception {		if (versionMeetsMinimum(4, 1)) {			try {				this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug3804");				this.stmt						.executeUpdate("CREATE TABLE testBug3804 (field1 VARCHAR(5))");				boolean caughtTruncation = false;				try {					this.stmt							.executeUpdate("INSERT INTO testBug3804 VALUES ('1234567')");				} catch (DataTruncation truncationEx) {					caughtTruncation = true;					System.out.println(truncationEx);				}				assertTrue("Data truncation exception should've been thrown",						caughtTruncation);			} finally {				this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug3804");			}		}	}	/**	 * Tests BUG#3873 - PreparedStatement.executeBatch() not returning all	 * generated keys (even though that's not JDBC compliant).	 * 	 * @throws Exception	 *             if the test fails	 */	public void testBug3873() throws Exception {		if (isRunningOnJdk131()) {			return; // test not valid on JDK-1.3.1		}		PreparedStatement batchStmt = null;		try {			this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug3873");			this.stmt					.executeUpdate("CREATE TABLE testBug3873 (keyField INT NOT NULL PRIMARY KEY AUTO_INCREMENT, dataField VARCHAR(32))");			batchStmt = this.conn.prepareStatement(					"INSERT INTO testBug3873 (dataField) VALUES (?)",					Statement.RETURN_GENERATED_KEYS);			batchStmt.setString(1, "abc");			batchStmt.addBatch();			batchStmt.setString(1, "def");			batchStmt.addBatch();			batchStmt.setString(1, "ghi");			batchStmt.addBatch();			int[] updateCounts = batchStmt.executeBatch();			this.rs = batchStmt.getGeneratedKeys();			while (this.rs.next()) {				System.out.println(this.rs.getInt(1));			}			this.rs = batchStmt.getGeneratedKeys();			assertTrue(this.rs.next());			assertTrue(1 == this.rs.getInt(1));			assertTrue(this.rs.next());			assertTrue(2 == this.rs.getInt(1));			assertTrue(this.rs.next());			assertTrue(3 == this.rs.getInt(1));			assertTrue(!this.rs.next());		} finally {			if (batchStmt != null) {				batchStmt.close();			}			this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug3873");		}	}	/**	 * Tests fix for BUG#4119 -- misbehavior in a managed environment from	 * MVCSoft JDO	 * 	 * @throws Exception	 *             if the test fails.	 */	public void testBug4119() throws Exception {		try {			this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug4119");			this.stmt.executeUpdate("CREATE TABLE `testBug4119` ("					+ "`field1` varchar(255) NOT NULL default '',"					+ "`field2` bigint(20) default NULL,"					+ "`field3` int(11) default NULL,"					+ "`field4` datetime default NULL,"					+ "`field5` varchar(75) default NULL,"					+ "`field6` varchar(75) default NULL,"					+ "`field7` varchar(75) default NULL,"					+ "`field8` datetime default NULL,"					+ " PRIMARY KEY  (`field1`)" + ")");			PreparedStatement pStmt = this.conn					.prepareStatement("insert into testBug4119 (field2, field3,"							+ "field4, field5, field6, field7, field8, field1) values (?, ?,"							+ "?, ?, ?, ?, ?, ?)");			pStmt.setString(1, "0");			pStmt.setString(2, "0");			pStmt.setTimestamp(3, new java.sql.Timestamp(System					.currentTimeMillis()));			pStmt.setString(4, "ABC");			pStmt.setString(5, "DEF");			pStmt.setString(6, "AA");			pStmt.setTimestamp(7, new java.sql.Timestamp(System					.currentTimeMillis()));			pStmt.setString(8, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA");			pStmt.executeUpdate();		} finally {			this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug4119");		}	}	/**	 * Tests fix for BUG#4311 - Error in JDBC retrieval of mediumint column when	 * using prepared statements and binary result sets.	 * 	 * @throws Exception	 *             if the test fails.	 */	public void testBug4311() throws Exception {		try {			int lowValue = -8388608;			int highValue = 8388607;			this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug4311");			this.stmt					.executeUpdate("CREATE TABLE testBug4311 (low MEDIUMINT, high MEDIUMINT)");			this.stmt.executeUpdate("INSERT INTO testBug4311 VALUES ("					+ lowValue + ", " + highValue + ")");			PreparedStatement pStmt = this.conn					.prepareStatement("SELECT low, high FROM testBug4311");			this.rs = pStmt.executeQuery();			assertTrue(this.rs.next());			assertTrue(this.rs.getInt(1) == lowValue);			assertTrue(this.rs.getInt(2) == highValue);		} finally {			this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug4311");		}	}	/**	 * Tests fix for BUG#4510 -- Statement.getGeneratedKeys() fails when key >	 * 32767	 * 	 * @throws Exception	 *             if the test fails	 */	public void testBug4510() throws Exception {		if (isRunningOnJdk131()) {			return; // test not valid on JDK-1.3.1		}		try {			this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug4510");			this.stmt.executeUpdate("CREATE TABLE testBug4510 ("					+ "field1 INT NOT NULL PRIMARY KEY AUTO_INCREMENT,"					+ "field2 VARCHAR(100))");			this.stmt					.executeUpdate("INSERT INTO testBug4510 (field1, field2) VALUES (32767, 'bar')");			PreparedStatement p = this.conn.prepareStatement(					"insert into testBug4510 (field2) values (?)",					Statement.RETURN_GENERATED_KEYS);			p.setString(1, "blah");			p.executeUpdate();			ResultSet rs = p.getGeneratedKeys();			rs.next();			System.out.println("Id: " + rs.getInt(1));			rs.close();		} finally {			this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug4510");		}	}	/**	 * Server doesn't accept everything as a server-side prepared statement, so	 * by default we scan for stuff it can't handle.	 * 	 * @throws SQLException	 */	public void testBug4718() throws SQLException {		if (versionMeetsMinimum(4, 1, 0)				&& ((com.mysql.jdbc.Connection) this.conn)						.getUseServerPreparedStmts()) {			this.pstmt = this.conn.prepareStatement("SELECT 1 LIMIT ?");			assertTrue(this.pstmt instanceof com.mysql.jdbc.PreparedStatement);			this.pstmt = this.conn.prepareStatement("SELECT 1 LIMIT 1");			assertTrue(this.pstmt instanceof com.mysql.jdbc.ServerPreparedStatement);			this.pstmt = this.conn.prepareStatement("SELECT 1 LIMIT 1, ?");			assertTrue(this.pstmt instanceof com.mysql.jdbc.PreparedStatement);			try {				this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug4718");				this.stmt						.executeUpdate("CREATE TABLE testBug4718 (field1 char(32))");				this.pstmt = this.conn						.prepareStatement("ALTER TABLE testBug4718 ADD INDEX (field1)");				assertTrue(this.pstmt instanceof com.mysql.jdbc.PreparedStatement);				this.pstmt = this.conn.prepareStatement("SELECT 1");				assertTrue(this.pstmt instanceof ServerPreparedStatement);				this.pstmt = this.conn						.prepareStatement("UPDATE testBug4718 SET field1=1");				assertTrue(this.pstmt instanceof ServerPreparedStatement);				this.pstmt = this.conn						.prepareStatement("UPDATE testBug4718 SET field1=1 LIMIT 1");				assertTrue(this.pstmt instanceof ServerPreparedStatement);				this.pstmt = this.conn						.prepareStatement("UPDATE testBug4718 SET field1=1 LIMIT ?");				assertTrue(this.pstmt instanceof com.mysql.jdbc.PreparedStatement);				this.pstmt = this.conn						.prepareStatement("UPDATE testBug4718 SET field1='Will we ignore LIMIT ?,?'");				assertTrue(this.pstmt instanceof ServerPreparedStatement);			} finally {				this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug4718");			}		}	}	/**	 * Tests fix for BUG#5012 -- ServerPreparedStatements dealing with return of	 * DECIMAL type don't work.	 * 	 * @throws Exception	 *             if the test fails.	 */	public void testBug5012() throws Exception {		PreparedStatement pStmt = null;		String valueAsString = "12345.12";		try {			this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug5012");			this.stmt					.executeUpdate("CREATE TABLE testBug5012(field1 DECIMAL(10,2))");			this.stmt.executeUpdate("INSERT INTO testBug5012 VALUES ("					+ valueAsString + ")");			pStmt = this.conn					.prepareStatement("SELECT field1 FROM testBug5012");			this.rs = pStmt.executeQuery();			assertTrue(this.rs.next());			assertEquals(new BigDecimal(valueAsString), this.rs					.getBigDecimal(1));		} finally {			this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug5012");			if (pStmt != null) {				pStmt.close();			}		}	}	/**	 * Tests fix for BUG#5133 -- PreparedStatement.toString() doesn't return	 * correct value if no parameters are present in statement.	 * 	 * @throws Exception	 */	public void testBug5133() throws Exception {		String query = "SELECT 1";		String output = this.conn.prepareStatement(query).toString();		System.out.println(output);		assertTrue(output.indexOf(query) != -1);	}	/**	 * Tests for BUG#5191 -- PreparedStatement.executeQuery() gives	 * OutOfMemoryError	 * 	 * @throws Exception	 *             if the test fails.	 */	public void testBug5191() throws Exception {		PreparedStatement pStmt = null;		try {			this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug5191Q");			this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug5191C");			this.stmt.executeUpdate("CREATE TABLE testBug5191Q"					+ "(QuestionId int NOT NULL AUTO_INCREMENT, "					+ "Text VARCHAR(200), " + "PRIMARY KEY(QuestionId))");			this.stmt.executeUpdate("CREATE TABLE testBug5191C"					+ "(CategoryId int, " + "QuestionId int)");			String[] questions = new String[] { "What is your name?",					"What is your quest?",					"What is the airspeed velocity of an unladen swollow?",					"How many roads must a man walk?", "Where's the tea?", };			for (int i = 0; i < questions.length; i++) {				this.stmt.executeUpdate("INSERT INTO testBug5191Q(Text)"						+ " VALUES (\"" + questions[i] + "\")");				int catagory = (i < 3) ? 0 : i;				this.stmt.executeUpdate("INSERT INTO testBug5191C"						+ "(CategoryId, QuestionId) VALUES (" + catagory + ", "						+ i + ")");				/*				 * this.stmt.executeUpdate("INSERT INTO testBug5191C" +				 * "(CategoryId, QuestionId) VALUES (" + catagory + ", (SELECT				 * testBug5191Q.QuestionId" + " FROM testBug5191Q " + "WHERE				 * testBug5191Q.Text LIKE '" + questions[i] + "'))");				 */			}			pStmt = this.conn.prepareStatement("SELECT qc.QuestionId, q.Text "					+ "FROM testBug5191Q q, testBug5191C qc "					+ "WHERE qc.CategoryId = ? "					+ " AND q.QuestionId = qc.QuestionId");			int catId = 0;			for (int i = 0; i < 100; i++) {				execQueryBug5191(pStmt, catId);			}		} finally {			this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug5191Q");			this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug5191C");			if (pStmt != null) {				pStmt.close();			}		}	}	public void testBug5235() throws Exception {		Properties props = new Properties();		props.setProperty("zeroDateTimeBehavior", "convertToNull");		Connection convertToNullConn = getConnectionWithProps(props);		Statement convertToNullStmt = convertToNullConn.createStatement();		try {			convertToNullStmt.executeUpdate("DROP TABLE IF EXISTS testBug5235");			convertToNullStmt					.executeUpdate("CREATE TABLE testBug5235(field1 DATE)");			convertToNullStmt					.executeUpdate("INSERT INTO testBug5235 (field1) VALUES ('0000-00-00')");			PreparedStatement ps = convertToNullConn					.prepareStatement("SELECT field1 FROM testBug5235");			this.rs = ps.executeQuery();			if (this.rs.next()) {				Date d = (Date) this.rs.getObject("field1");				System.out.println("date: " + d);			}		} finally {			convertToNullStmt.executeUpdate("DROP TABLE IF EXISTS testBug5235");		}	}	public void testBug5450() throws Exception {		if (versionMeetsMinimum(4, 1)) {			String table = "testBug5450";			String column = "policyname";			try {				Properties props = new Properties();				props.setProperty("characterEncoding", "utf-8");				Connection utf8Conn = getConnectionWithProps(props);				Statement utfStmt = utf8Conn.createStatement();				this.stmt.executeUpdate("DROP TABLE IF EXISTS " + table);				this.stmt.executeUpdate("CREATE TABLE " + table						+ "(policyid int NOT NULL AUTO_INCREMENT, " + column						+ " VARCHAR(200), "						+ "PRIMARY KEY(policyid)) DEFAULT CHARACTER SET utf8");				String pname0 = "inserted \uac00 - foo - \u4e00";				utfStmt.executeUpdate("INSERT INTO " + table + "(" + column						+ ")" + " VALUES (\"" + pname0 + "\")");				this.rs = utfStmt.executeQuery("SELECT " + column + " FROM "						+ table);				this.rs.first();

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
3atv在线一区二区三区| 中文字幕亚洲综合久久菠萝蜜| 在线综合+亚洲+欧美中文字幕| 亚洲人精品一区| 午夜久久久久久久久| 波多野结衣欧美| 国产精品不卡一区| 国产一区二区三区黄视频| 精品视频999| 一区二区三区欧美激情| 欧美自拍丝袜亚洲| 午夜精品久久久久久久久久久| 91片在线免费观看| 国产精品久久久久久亚洲伦| 国产九色精品成人porny| 久久久精品免费观看| 一区二区三区精品在线观看| 色综合久久99| 亚洲成人免费电影| 欧美色综合影院| 亚洲福利视频一区二区| 在线视频一区二区三区| 午夜精品福利一区二区三区蜜桃| 日韩精品中午字幕| 国产成人在线视频免费播放| 一区二区日韩电影| 91麻豆产精品久久久久久| 亚洲国产精品久久久久婷婷884 | 亚洲成人久久影院| 精品一区二区在线视频| 久久久久久久综合狠狠综合| 色综合久久99| 欧美成人一区二区三区片免费| 国产一区在线看| 成人精品视频.| 国产高清不卡一区| 秋霞影院一区二区| 天天色天天操综合| 亚洲激情网站免费观看| 国产欧美一区二区精品忘忧草| 欧美一区二区观看视频| 欧美性大战久久久久久久| 成人app在线| 99热这里都是精品| 成人av网站免费| aaa亚洲精品| 成人av影视在线观看| 国产成人精品亚洲777人妖| 蜜桃视频免费观看一区| 午夜激情一区二区三区| 亚洲v日本v欧美v久久精品| 亚洲综合清纯丝袜自拍| 一区二区三区四区乱视频| 亚洲欧美另类在线| 亚洲精品网站在线观看| 一区二区三区免费网站| 亚洲狼人国产精品| 丝袜美腿亚洲色图| 视频一区中文字幕| 寂寞少妇一区二区三区| 国内精品久久久久影院薰衣草| 97国产一区二区| 色综合久久久久久久| 欧美大白屁股肥臀xxxxxx| 精品国产欧美一区二区| 国产精品色呦呦| 亚洲激情一二三区| 国产一区二区三区免费| 91黄色免费看| 国产亚洲短视频| 亚洲在线视频免费观看| 麻豆国产91在线播放| 99久久精品99国产精品| 日韩美女视频在线| 亚洲福利一区二区三区| 成人福利视频在线| 欧美日韩精品一区二区三区蜜桃 | 精品一区二区三区在线视频| 国产成人午夜电影网| 欧美三级一区二区| 国产精品成人网| 顶级嫩模精品视频在线看| 91麻豆精品国产91久久久久久| 国产精品久久久爽爽爽麻豆色哟哟 | 精品在线观看免费| 欧美三区在线观看| 亚洲成人动漫av| 在线这里只有精品| 精品制服美女丁香| 51久久夜色精品国产麻豆| 亚洲一区二区三区小说| 欧美亚洲综合在线| 亚洲国产综合色| 欧美亚男人的天堂| 成人午夜av影视| 亚洲欧美一区二区在线观看| 成人综合在线观看| 亚洲人成在线观看一区二区| 99久久精品99国产精品| 中文字幕视频一区| 在线观看免费成人| 毛片av中文字幕一区二区| 日韩三级视频在线观看| 久久精品国产99| 国产婷婷色一区二区三区在线| 极品美女销魂一区二区三区免费 | 波多野结衣中文字幕一区二区三区| 国产亚洲美州欧州综合国| 国产福利一区在线观看| 国产精品国产三级国产普通话99| 国产suv精品一区二区6| 午夜亚洲国产au精品一区二区| 欧美精品vⅰdeose4hd| 国产一区二区三区免费| 一区二区三区精品视频| 欧美一区二区女人| 成人激情小说网站| av一二三不卡影片| 日本中文字幕一区| 亚洲欧美福利一区二区| 日韩精品中文字幕一区| 成人精品国产福利| 日本三级亚洲精品| 一区二区三区中文在线| 久久五月婷婷丁香社区| 欧美日韩国产高清一区二区三区| 狠狠色综合日日| 五月天久久比比资源色| 国产精品毛片大码女人| wwwwxxxxx欧美| 精品国产a毛片| 日韩一区二区三区电影在线观看| 成+人+亚洲+综合天堂| 国产高清亚洲一区| 加勒比av一区二区| 成人av综合一区| 国产精品自拍网站| 国产综合色视频| 精品一区二区三区在线播放视频| 亚洲影院免费观看| 亚洲免费三区一区二区| 亚洲欧洲色图综合| 亚洲精品成人精品456| 亚洲女人小视频在线观看| 亚洲欧美色一区| 亚洲伊人伊色伊影伊综合网| 国产精品久久三| 亚洲日本青草视频在线怡红院| 国产精品久久久久四虎| 亚洲激情网站免费观看| 亚洲福利电影网| 麻豆精品视频在线| 岛国精品在线播放| 91浏览器打开| 日韩一区国产二区欧美三区| 日韩三级电影网址| 中文一区在线播放| 一区二区三区在线观看欧美| 日日夜夜免费精品| 国产99久久精品| 欧美私人免费视频| 国产亚洲精品久| av亚洲精华国产精华精华| 欧美一区二区三区色| 国产视频不卡一区| 午夜精品久久久久久久蜜桃app| 日本美女一区二区| 不卡的电视剧免费网站有什么| 欧美伦理影视网| 专区另类欧美日韩| 久久精品国产一区二区三| 99精品久久只有精品| 精品日韩一区二区| 亚洲成人久久影院| 99精品热视频| 国产亚洲一区二区在线观看| 石原莉奈在线亚洲二区| 欧洲一区二区av| 亚洲色图第一区| 成人黄色在线看| 国产香蕉久久精品综合网| 免费精品视频在线| 欧美性猛片aaaaaaa做受| 久久久天堂av| 蜜臀精品久久久久久蜜臀 | 色综合久久99| 亚洲三级在线播放| 92国产精品观看| 国产欧美va欧美不卡在线| 91久久人澡人人添人人爽欧美 | 成人h动漫精品一区二| 国产精品不卡一区二区三区| 丁香婷婷综合激情五月色| 国产偷国产偷精品高清尤物| 成人黄动漫网站免费app| 国产精品久久网站| 97久久精品人人澡人人爽| 中日韩av电影| 不卡视频一二三四| 亚洲精品视频在线看|