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

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

?? statementregressiontest.java

?? mysql jdbc驅動程序 mysql jdbc驅動程序 mysql jdbc驅動程序 mysql jdbc驅動程序
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
	/**	 * Tests fix for BUG#1901 -- PreparedStatement.setObject(int, Object, int,	 * int) doesn't support CLOB or BLOB types.	 * 	 * @throws Exception	 *             if this test fails for any reason	 */	public void testBug1901() throws Exception {		try {			this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug1901");			this.stmt					.executeUpdate("CREATE TABLE testBug1901 (field1 VARCHAR(255))");			this.stmt.executeUpdate("INSERT INTO testBug1901 VALUES ('aaa')");			this.rs = this.stmt.executeQuery("SELECT field1 FROM testBug1901");			this.rs.next();			Clob valueAsClob = this.rs.getClob(1);			Blob valueAsBlob = this.rs.getBlob(1);			PreparedStatement pStmt = this.conn					.prepareStatement("INSERT INTO testBug1901 VALUES (?)");			pStmt.setObject(1, valueAsClob, java.sql.Types.CLOB, 0);			pStmt.executeUpdate();			pStmt.setObject(1, valueAsBlob, java.sql.Types.BLOB, 0);			pStmt.executeUpdate();		} finally {			this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug1901");		}	}	/**	 * Test fix for BUG#1933 -- Driver property 'maxRows' has no effect.	 * 	 * @throws Exception	 *             if the test fails.	 */	public void testBug1933() throws Exception {		if (versionMeetsMinimum(4, 0)) {			Connection maxRowsConn = null;			PreparedStatement maxRowsPrepStmt = null;			Statement maxRowsStmt = null;			try {				Properties props = new Properties();				props.setProperty("maxRows", "1");				maxRowsConn = getConnectionWithProps(props);				maxRowsStmt = maxRowsConn.createStatement();				assertTrue(maxRowsStmt.getMaxRows() == 1);				this.rs = maxRowsStmt.executeQuery("SELECT 1 UNION SELECT 2");				this.rs.next();				maxRowsPrepStmt = maxRowsConn						.prepareStatement("SELECT 1 UNION SELECT 2");				assertTrue(maxRowsPrepStmt.getMaxRows() == 1);				this.rs = maxRowsPrepStmt.executeQuery();				this.rs.next();				assertTrue(!this.rs.next());				props.setProperty("useServerPrepStmts", "false");				maxRowsConn = getConnectionWithProps(props);				maxRowsPrepStmt = maxRowsConn						.prepareStatement("SELECT 1 UNION SELECT 2");				assertTrue(maxRowsPrepStmt.getMaxRows() == 1);				this.rs = maxRowsPrepStmt.executeQuery();				this.rs.next();				assertTrue(!this.rs.next());			} finally {				maxRowsConn.close();			}		}	}	/**	 * Tests the fix for BUG#1934 -- prepareStatement dies silently when	 * encountering Statement.RETURN_GENERATED_KEY	 * 	 * @throws Exception	 *             if the test fails	 */	public void testBug1934() throws Exception {		if (isRunningOnJdk131()) {			return; // test not valid on JDK-1.3.1		}		try {			this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug1934");			this.stmt.executeUpdate("CREATE TABLE testBug1934 (field1 INT)");			System.out.println("Before prepareStatement()");			this.pstmt = this.conn.prepareStatement(					"INSERT INTO testBug1934 VALUES (?)",					java.sql.Statement.RETURN_GENERATED_KEYS);			assertTrue(this.pstmt != null);			System.out.println("After prepareStatement() - " + this.pstmt);		} finally {			this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug1934");		}	}	/**	 * Tests fix for BUG#1958 - Improper bounds checking on	 * PreparedStatement.setFoo().	 * 	 * @throws Exception	 *             if the test fails.	 */	public void testBug1958() throws Exception {		PreparedStatement pStmt = null;		try {			this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug1958");			this.stmt.executeUpdate("CREATE TABLE testBug1958 (field1 int)");			pStmt = this.conn					.prepareStatement("SELECT * FROM testBug1958 WHERE field1 IN (?, ?, ?)");			try {				pStmt.setInt(4, 1);			} catch (SQLException sqlEx) {				assertTrue(SQLError.SQL_STATE_ILLEGAL_ARGUMENT.equals(sqlEx						.getSQLState()));			}		} finally {			if (pStmt != null) {				pStmt.close();			}			this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug1958");		}	}	/**	 * Tests the fix for BUG#2606, server-side prepared statements not returning	 * datatype YEAR correctly.	 * 	 * @throws Exception	 *             if the test fails.	 */	public void testBug2606() throws Exception {		try {			this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug2606");			this.stmt					.executeUpdate("CREATE TABLE testBug2606(year_field YEAR)");			this.stmt.executeUpdate("INSERT INTO testBug2606 VALUES (2004)");			PreparedStatement yrPstmt = this.conn					.prepareStatement("SELECT year_field FROM testBug2606");			this.rs = yrPstmt.executeQuery();			assertTrue(this.rs.next());			assertEquals(2004, this.rs.getInt(1));		} finally {			this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug2606");		}	}	/**	 * Tests the fix for BUG#2671, nulls encoded incorrectly in server-side	 * prepared statements.	 * 	 * @throws Exception	 *             if an error occurs.	 */	public void testBug2671() throws Exception {		if (versionMeetsMinimum(4, 1)) {			try {				this.stmt.executeUpdate("DROP TABLE IF EXISTS test3");				this.stmt						.executeUpdate("CREATE TABLE test3 ("								+ " `field1` int(8) NOT NULL auto_increment,"								+ " `field2` int(8) unsigned zerofill default NULL,"								+ " `field3` varchar(30) binary NOT NULL default '',"								+ " `field4` varchar(100) default NULL,"								+ " `field5` datetime NULL default '0000-00-00 00:00:00',"								+ " PRIMARY KEY  (`field1`),"								+ " UNIQUE KEY `unq_id` (`field2`),"								+ " UNIQUE KEY  (`field3`),"								+ " UNIQUE KEY  (`field2`)"								+ " ) TYPE=InnoDB CHARACTER SET utf8");				this.stmt						.executeUpdate("insert into test3 (field1, field3, field4) values (1,'blewis','Bob Lewis')");				String query = "              " + "UPDATE                   "						+ "  test3                  "						+ "SET                      "						+ "  field2=?               " + "  ,field3=?          "						+ "  ,field4=?           " + "  ,field5=?        "						+ "WHERE                    "						+ "  field1 = ?                 ";				java.sql.Date mydate = null;				this.pstmt = this.conn.prepareStatement(query);				this.pstmt.setInt(1, 13);				this.pstmt.setString(2, "abc");				this.pstmt.setString(3, "def");				this.pstmt.setDate(4, mydate);				this.pstmt.setInt(5, 1);				int retval = this.pstmt.executeUpdate();				assertTrue(retval == 1);			} finally {				this.stmt.executeUpdate("DROP TABLE IF EXISTS test3");			}		}	}	/**	 * Tests fix for BUG#3103 -- java.util.Date not accepted as parameter to	 * PreparedStatement.setObject().	 * 	 * @throws Exception	 *             if the test fails	 * 	 * @deprecated uses deprecated methods of Date class	 */	public void testBug3103() throws Exception {		try {			this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug3103");			this.stmt					.executeUpdate("CREATE TABLE testBug3103 (field1 DATETIME)");			PreparedStatement pStmt = this.conn					.prepareStatement("INSERT INTO testBug3103 VALUES (?)");			java.util.Date utilDate = new java.util.Date();			pStmt.setObject(1, utilDate);			pStmt.executeUpdate();			this.rs = this.stmt.executeQuery("SELECT field1 FROM testBug3103");			this.rs.next();			java.util.Date retrUtilDate = new java.util.Date(this.rs					.getTimestamp(1).getTime());			// We can only compare on the day/month/year hour/minute/second			// interval, because the timestamp has added milliseconds to the			// internal date...			assertTrue("Dates not equal", (utilDate.getMonth() == retrUtilDate					.getMonth())					&& (utilDate.getDate() == retrUtilDate.getDate())					&& (utilDate.getYear() == retrUtilDate.getYear())					&& (utilDate.getHours() == retrUtilDate.getHours())					&& (utilDate.getMinutes() == retrUtilDate.getMinutes())					&& (utilDate.getSeconds() == retrUtilDate.getSeconds()));		} finally {			this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug3103");		}	}	/**	 * Tests fix for BUG#3520	 * 	 * @throws Exception	 *             ...	 */	public void testBug3520() throws Exception {		try {			this.stmt.executeUpdate("DROP TABLE IF EXISTS t");			this.stmt.executeUpdate("CREATE TABLE t (s1 int,primary key (s1))");			this.stmt.executeUpdate("INSERT INTO t VALUES (1)");			this.stmt.executeUpdate("INSERT INTO t VALUES (1)");		} catch (SQLException sqlEx) {			System.out.println(sqlEx.getSQLState());		} finally {			this.stmt.executeUpdate("DROP TABLE IF EXISTS t");		}	}	/**	 * Test fix for BUG#3557 -- UpdatableResultSet not picking up default values	 * 	 * @throws Exception	 *             if test fails.	 */	public void testBug3557() throws Exception {		boolean populateDefaults = ((com.mysql.jdbc.ConnectionProperties) this.conn)				.getPopulateInsertRowWithDefaultValues();		try {			((com.mysql.jdbc.ConnectionProperties) this.conn)					.setPopulateInsertRowWithDefaultValues(true);			this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug3557");			this.stmt.executeUpdate("CREATE TABLE testBug3557 ( "					+ "`a` varchar(255) NOT NULL default 'XYZ', "					+ "`b` varchar(255) default '123', "					+ "PRIMARY KEY  (`a`))");			Statement updStmt = this.conn					.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,							ResultSet.CONCUR_UPDATABLE);			this.rs = updStmt.executeQuery("SELECT * FROM testBug3557");			assertTrue(this.rs.getConcurrency() == ResultSet.CONCUR_UPDATABLE);			this.rs.moveToInsertRow();			assertEquals("XYZ", this.rs.getObject(1));			assertEquals("123", this.rs.getObject(2));		} finally {			((com.mysql.jdbc.ConnectionProperties) this.conn)					.setPopulateInsertRowWithDefaultValues(populateDefaults);			this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug3557");		}	}	/**	 * Tests fix for BUG#3620 -- Timezone not respected correctly.	 * 	 * @throws SQLException	 *             if the test fails.	 */	public void testBug3620() throws SQLException {		if (isRunningOnJRockit()) {			// bug with their timezones			return;		}				if (isRunningOnJdk131()) {			// bug with timezones, no update			// for new DST in USA			return;		}				long epsillon = 3000; // 3 seconds time difference		try {			this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug3620");			this.stmt					.executeUpdate("CREATE TABLE testBug3620 (field1 TIMESTAMP)");			PreparedStatement tsPstmt = this.conn					.prepareStatement("INSERT INTO testBug3620 VALUES (?)");			Calendar pointInTime = Calendar.getInstance();			pointInTime.set(2004, 02, 29, 10, 0, 0);			long pointInTimeOffset = pointInTime.getTimeZone().getRawOffset();			java.sql.Timestamp ts = new java.sql.Timestamp(pointInTime					.getTime().getTime());			tsPstmt.setTimestamp(1, ts);			tsPstmt.executeUpdate();			String tsValueAsString = getSingleValue("testBug3620", "field1",					null).toString();			System.out.println("Timestamp as string with no calendar: "					+ tsValueAsString.toString());			Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("UTC"));			this.stmt.executeUpdate("DELETE FROM testBug3620");			Properties props = new Properties();			props.put("useTimezone", "true");			// props.put("serverTimezone", "UTC");			Connection tzConn = getConnectionWithProps(props);			Statement tsStmt = tzConn.createStatement();			tsPstmt = tzConn					.prepareStatement("INSERT INTO testBug3620 VALUES (?)");			tsPstmt.setTimestamp(1, ts, cal);			tsPstmt.executeUpdate();			tsValueAsString = getSingleValue("testBug3620", "field1", null)					.toString();			Timestamp tsValueAsTimestamp = (Timestamp) getSingleValue(					"testBug3620", "field1", null);			System.out.println("Timestamp as string with UTC calendar: "					+ tsValueAsString.toString());			System.out.println("Timestamp as Timestamp with UTC calendar: "					+ tsValueAsTimestamp);			this.rs = tsStmt.executeQuery("SELECT field1 FROM testBug3620");			this.rs.next();			Timestamp tsValueUTC = this.rs.getTimestamp(1, cal);			//			// We use this testcase with other vendors, JDBC spec			// requires result set fields can only be read once,			// although MySQL doesn't require this ;)			//			this.rs = tsStmt.executeQuery("SELECT field1 FROM testBug3620");			this.rs.next();			Timestamp tsValueStmtNoCal = this.rs.getTimestamp(1);			System.out					.println("Timestamp specifying UTC calendar from normal statement: "							+ tsValueUTC.toString());			PreparedStatement tsPstmtRetr = tzConn					.prepareStatement("SELECT field1 FROM testBug3620");			this.rs = tsPstmtRetr.executeQuery();			this.rs.next();			Timestamp tsValuePstmtUTC = this.rs.getTimestamp(1, cal);			System.out					.println("Timestamp specifying UTC calendar from prepared statement: "							+ tsValuePstmtUTC.toString());			//			// We use this testcase with other vendors, JDBC spec			// requires result set fields can only be read once,			// although MySQL doesn't require this ;)			//			this.rs = tsPstmtRetr.executeQuery();			this.rs.next();			Timestamp tsValuePstmtNoCal = this.rs.getTimestamp(1);			System.out					.println("Timestamp specifying no calendar from prepared statement: "							+ tsValuePstmtNoCal.toString());			long stmtDeltaTWithCal = (ts.getTime() - tsValueStmtNoCal.getTime());			long deltaOrig = Math.abs(stmtDeltaTWithCal - pointInTimeOffset);			assertTrue(					"Difference between original timestamp and timestamp retrieved using java.sql.Statement "							+ "set in database using UTC calendar is not ~= "							+ epsillon + ", it is actually " + deltaOrig,					(deltaOrig < epsillon));			long pStmtDeltaTWithCal = (ts.getTime() - tsValuePstmtNoCal					.getTime());

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品一区二区在线观看网站 | 丰满放荡岳乱妇91ww| 国产高清精品在线| 欧美日韩国产大片| 国产精品人妖ts系列视频| 日本欧美一区二区三区乱码 | 国产精品青草综合久久久久99| 偷拍日韩校园综合在线| voyeur盗摄精品| 久久综合五月天婷婷伊人| 午夜伦理一区二区| 在线观看一区二区视频| 中文字幕乱码亚洲精品一区| 日本不卡高清视频| 欧美精品免费视频| 午夜不卡av在线| 欧美在线免费观看亚洲| 亚洲男同1069视频| 久久99精品视频| 亚洲自拍另类综合| 国产精品资源在线观看| 91视频.com| 亚洲欧洲日韩av| 不卡高清视频专区| 中文字幕av一区 二区| 国产精品一二三区| 国产网站一区二区三区| 国产精品自拍在线| 国产亚洲综合色| 国产精华液一区二区三区| 国产欧美精品一区| 成人综合在线观看| 亚洲欧美在线高清| 色婷婷亚洲婷婷| 亚洲国产精品欧美一二99| 在线国产电影不卡| 日日摸夜夜添夜夜添亚洲女人| 欧美挠脚心视频网站| 蜜桃久久精品一区二区| 欧美精品一区二| 丰满少妇久久久久久久| 亚洲日本电影在线| 欧美视频精品在线| 美女免费视频一区二区| 2021国产精品久久精品| 成人午夜av电影| 亚洲激情六月丁香| 欧美肥妇free| 国产一区二区成人久久免费影院 | 国产精品久久看| 日本国产一区二区| 麻豆精品在线看| 中文字幕免费不卡在线| 91福利在线观看| 久草中文综合在线| 亚洲欧洲国产专区| 911精品国产一区二区在线| 国产麻豆午夜三级精品| 亚洲欧美日韩系列| 日韩精品一区二区三区swag| 成人99免费视频| 婷婷综合另类小说色区| 国产午夜精品久久| 欧美色倩网站大全免费| 国产一区日韩二区欧美三区| 一区二区在线观看视频| 日韩欧美国产综合| 色综合天天做天天爱| 美女脱光内衣内裤视频久久网站 | 2023国产一二三区日本精品2022| 成人国产电影网| 日日夜夜一区二区| 国产精品女同一区二区三区| 欧美日韩精品一二三区| 国产成人av网站| 免费人成精品欧美精品| 一区二区三区资源| 中文一区一区三区高中清不卡| 欧美人体做爰大胆视频| av爱爱亚洲一区| 激情综合网最新| 亚洲成人综合在线| 亚洲欧美中日韩| 久久久久久日产精品| 51精品秘密在线观看| 色一区在线观看| 成人黄色一级视频| 韩国一区二区在线观看| 性做久久久久久久久| 亚洲男人的天堂一区二区| 国产亚洲精久久久久久| 欧美一级二级在线观看| 欧美视频一区在线| 欧洲一区在线电影| 91日韩精品一区| 成人一区二区三区中文字幕| 久久av中文字幕片| 青青草原综合久久大伊人精品| 一区二区在线观看视频| 中文字幕中文字幕中文字幕亚洲无线| 精品国产乱码久久久久久老虎| 欧美一区二区三区白人| 欧美日韩一级片网站| 在线精品视频小说1| 91无套直看片红桃| 97久久久精品综合88久久| 99热这里都是精品| 97se狠狠狠综合亚洲狠狠| 色综合久久综合中文综合网| 97久久精品人人澡人人爽| 99精品欧美一区二区蜜桃免费| 成人小视频免费在线观看| 成人黄页在线观看| 99久久国产免费看| 色综合天天狠狠| 欧美综合在线视频| 欧美肥妇bbw| 精品久久久久香蕉网| 国产日韩欧美在线一区| 国产精品久久免费看| 亚洲精品免费视频| 亚洲大尺度视频在线观看| 石原莉奈在线亚洲三区| 奇米精品一区二区三区在线观看| 久久疯狂做爰流白浆xx| 国产精品99久| av不卡免费电影| 欧美男人的天堂一二区| 日韩美女在线视频| 中文字幕精品在线不卡| 亚洲人成精品久久久久久| 五月天中文字幕一区二区| 婷婷久久综合九色综合伊人色| 日本亚洲欧美天堂免费| 精品亚洲成a人在线观看| 成人一区二区三区中文字幕| 欧美亚洲国产一区二区三区va | 亚洲欧美日韩在线不卡| 亚洲成人黄色影院| 久久国产免费看| 94色蜜桃网一区二区三区| 欧美日韩精品福利| 久久精品一区蜜桃臀影院| 亚洲精品视频在线看| 麻豆精品一区二区综合av| 成人网页在线观看| 欧美理论片在线| 欧美经典一区二区三区| 亚洲自拍另类综合| 国产高清在线观看免费不卡| 欧美亚洲一区三区| 久久久不卡影院| 丝袜脚交一区二区| av电影在线观看一区| 欧美一区二区三区在线观看视频| 久久精品亚洲乱码伦伦中文 | 日韩一区二区三区在线| 国产欧美视频在线观看| 亚洲成av人片在www色猫咪| 国产精品一卡二卡| 欧美精品久久久久久久多人混战 | 欧美日韩免费观看一区二区三区 | 日韩欧美综合在线| 亚洲欧美另类小说| 国产精品18久久久| 91精品国产综合久久香蕉麻豆| 国产精品热久久久久夜色精品三区| 午夜欧美2019年伦理| 99视频有精品| 久久久久国产精品麻豆| 天天做天天摸天天爽国产一区 | 国产精品中文字幕日韩精品| 91精彩视频在线观看| 国产日本亚洲高清| 精品一区二区三区蜜桃| 8v天堂国产在线一区二区| 亚洲综合视频在线| 91日韩精品一区| 中文字幕在线一区| 成人精品小蝌蚪| 久久综合色之久久综合| 免费高清成人在线| 91精品国产综合久久蜜臀| 亚洲一卡二卡三卡四卡| 一本高清dvd不卡在线观看| 国产精品卡一卡二| 99久免费精品视频在线观看| 国产三级精品在线| 国产麻豆精品在线观看| 欧美成人一区二区三区| 久久国内精品视频| 精品国产一区二区在线观看| 老色鬼精品视频在线观看播放| 91精品午夜视频| 日本不卡中文字幕| 欧美一级片在线观看| 免播放器亚洲一区| 欧美电影免费观看高清完整版 | av中文字幕亚洲| 亚洲三级久久久|