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

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

?? numbersregressiontest.java

?? 用于JAVA數據庫連接.解壓就可用,方便得很
?? JAVA
字號:
/* Copyright (C) 2002-2004 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as  published by the Free Software Foundation. There are special exceptions to the terms and conditions of the GPL  as it is applied to this software. View the full text of the  exception in file EXCEPTIONS-CONNECTOR-J in the directory of this  software distribution. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */package testsuite.regression;import java.sql.ResultSetMetaData;import java.sql.SQLException;import testsuite.BaseTestCase;/** * Tests various number-handling issues that have arrisen in the JDBC driver at * one time or another. *  * @author Mark Matthews */public class NumbersRegressionTest extends BaseTestCase {	/**	 * Constructor for NumbersRegressionTest.	 * 	 * @param name	 *            the test name	 */	public NumbersRegressionTest(String name) {		super(name);	}	/**	 * Runs all test cases	 * 	 * @param args	 *            command-line args	 * 	 * @throws Exception	 *             if any errors occur	 */	public static void main(String[] args) {		junit.textui.TestRunner.run(NumbersRegressionTest.class);	}	/**	 * Tests that BIGINT retrieval works correctly	 * 	 * @throws Exception	 *             if any errors occur	 */	public void testBigInt() throws Exception {		try {			this.stmt.executeUpdate("DROP TABLE IF EXISTS bigIntRegression");			this.stmt					.executeUpdate("CREATE TABLE bigIntRegression ( val BIGINT NOT NULL)");			this.stmt					.executeUpdate("INSERT INTO bigIntRegression VALUES (6692730313872877584)");			this.rs = this.stmt					.executeQuery("SELECT val FROM bigIntRegression");			while (this.rs.next()) {				// check retrieval				long retrieveAsLong = this.rs.getLong(1);				assertTrue(retrieveAsLong == 6692730313872877584L);			}			this.rs.close();			this.stmt.executeUpdate("DROP TABLE IF EXISTS bigIntRegression");			String bigIntAsString = "6692730313872877584";			long parsedBigIntAsLong = Long.parseLong(bigIntAsString);			// check JDK parsing			assertTrue(bigIntAsString					.equals(String.valueOf(parsedBigIntAsLong)));		} finally {			this.stmt.executeUpdate("DROP TABLE IF EXISTS bigIntRegression");		}	}	/**	 * Tests correct type assignment for MySQL FLOAT and REAL datatypes.	 * 	 * @throws Exception	 *             if the test fails.	 */	public void testFloatsAndReals() throws Exception {		try {			this.stmt.executeUpdate("DROP TABLE IF EXISTS floatsAndReals");			this.stmt					.executeUpdate("CREATE TABLE IF NOT EXISTS floatsAndReals(floatCol FLOAT, realCol REAL, doubleCol DOUBLE)");			this.stmt					.executeUpdate("INSERT INTO floatsAndReals VALUES (0, 0, 0)");			this.rs = this.stmt					.executeQuery("SELECT floatCol, realCol, doubleCol FROM floatsAndReals");			ResultSetMetaData rsmd = this.rs.getMetaData();			this.rs.next();			assertTrue(rsmd.getColumnClassName(1).equals("java.lang.Float"));			assertTrue(this.rs.getObject(1).getClass().getName().equals(					"java.lang.Float"));			assertTrue(rsmd.getColumnClassName(2).equals("java.lang.Double"));			assertTrue(this.rs.getObject(2).getClass().getName().equals(					"java.lang.Double"));			assertTrue(rsmd.getColumnClassName(3).equals("java.lang.Double"));			assertTrue(this.rs.getObject(3).getClass().getName().equals(					"java.lang.Double"));		} finally {			this.stmt.executeUpdate("DROP TABLE IF EXISTS floatsAndReals");		}	}	/**	 * Tests that ResultSetMetaData precision and scale methods work correctly	 * for all numeric types.	 * 	 * @throws Exception	 *             if any errors occur	 */	public void testPrecisionAndScale() throws Exception {		testPrecisionForType("TINYINT", 8, -1, false);		testPrecisionForType("TINYINT", 8, -1, true);		testPrecisionForType("SMALLINT", 8, -1, false);		testPrecisionForType("SMALLINT", 8, -1, true);		testPrecisionForType("MEDIUMINT", 8, -1, false);		testPrecisionForType("MEDIUMINT", 8, -1, true);		testPrecisionForType("INT", 8, -1, false);		testPrecisionForType("INT", 8, -1, true);		testPrecisionForType("BIGINT", 8, -1, false);		testPrecisionForType("BIGINT", 8, -1, true);		testPrecisionForType("FLOAT", 8, 4, false);		testPrecisionForType("FLOAT", 8, 4, true);		testPrecisionForType("DOUBLE", 8, 4, false);		testPrecisionForType("DOUBLE", 8, 4, true);		testPrecisionForType("DECIMAL", 8, 4, false);		testPrecisionForType("DECIMAL", 8, 4, true);		testPrecisionForType("DECIMAL", 9, 0, false);		testPrecisionForType("DECIMAL", 9, 0, true);	}	private void testPrecisionForType(String typeName, int m, int d,			boolean unsigned) throws Exception {		try {			this.stmt					.executeUpdate("DROP TABLE IF EXISTS precisionAndScaleRegression");			StringBuffer createStatement = new StringBuffer(					"CREATE TABLE precisionAndScaleRegression ( val ");			createStatement.append(typeName);			createStatement.append("(");			createStatement.append(m);			if (d != -1) {				createStatement.append(",");				createStatement.append(d);			}			createStatement.append(")");			if (unsigned) {				createStatement.append(" UNSIGNED ");			}			createStatement.append(" NOT NULL)");			this.stmt.executeUpdate(createStatement.toString());			this.rs = this.stmt					.executeQuery("SELECT val FROM precisionAndScaleRegression");			ResultSetMetaData rsmd = this.rs.getMetaData();			assertTrue("Precision returned incorrectly for type " + typeName					+ ", " + m + " != rsmd.getPrecision() = "					+ rsmd.getPrecision(1), rsmd.getPrecision(1) == m);			if (d != -1) {				assertTrue("Scale returned incorrectly for type " + typeName						+ ", " + d + " != rsmd.getScale() = "						+ rsmd.getScale(1), rsmd.getScale(1) == d);			}		} finally {			if (this.rs != null) {				try {					this.rs.close();				} catch (Exception ex) {					// ignore				}			}			this.stmt					.executeUpdate("DROP TABLE IF EXISTS precisionAndScaleRegression");		}	}	public void testIntShouldReturnLong() throws Exception {		try {			this.stmt.executeUpdate("DROP TABLE IF EXISTS testIntRetLong");			this.stmt.executeUpdate("CREATE TABLE testIntRetLong(field1 INT)");			this.stmt.executeUpdate("INSERT INTO testIntRetLong VALUES (1)");			this.rs = this.stmt.executeQuery("SELECT * FROM testIntRetLong");			this.rs.next();			assertTrue(this.rs.getObject(1).getClass().equals(					java.lang.Integer.class));		} finally {			if (this.rs != null) {				try {					this.rs.close();				} catch (SQLException sqlEx) {					// ignore				}				this.rs = null;			}			this.stmt.executeUpdate("DROP TABLE IF EXISTS testIntRetLong");		}	}	/**	 * Tests fix for BUG#5729, UNSIGNED BIGINT returned incorrectly	 * 	 * @throws Exception	 *             if the test fails	 */	public void testBug5729() throws Exception {		if (versionMeetsMinimum(4, 1)) {			String valueAsString = "1095923280000";			try {				this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug5729");				this.stmt						.executeUpdate("CREATE TABLE testBug5729(field1 BIGINT UNSIGNED)");				this.stmt.executeUpdate("INSERT INTO testBug5729 VALUES ("						+ valueAsString + ")");				this.rs = this.conn.prepareStatement(						"SELECT * FROM testBug5729").executeQuery();				this.rs.next();				assertTrue(this.rs.getObject(1).toString()						.equals(valueAsString));			} finally {				this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug5729");			}		}	}	/**	 * Tests fix for BUG#8484 - ResultSet.getBigDecimal() throws exception when	 * rounding would need to occur to set scale.	 * 	 * @throws Exception	 *             if the test fails	 * @deprecated	 */	public void testBug8484() throws Exception {		try {			this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug8484");			this.stmt					.executeUpdate("CREATE TABLE testBug8484 (field1 DECIMAL(16, 8), field2 varchar(32))");			this.stmt					.executeUpdate("INSERT INTO testBug8484 VALUES (12345678.12345678, '')");			this.rs = this.stmt					.executeQuery("SELECT field1, field2 FROM testBug8484");			this.rs.next();			assertEquals("12345678.123", this.rs.getBigDecimal(1, 3).toString());			assertEquals("0.000", this.rs.getBigDecimal(2, 3).toString());			this.pstmt = this.conn					.prepareStatement("SELECT field1, field2 FROM testBug8484");			this.rs = this.pstmt.executeQuery();			this.rs.next();			assertEquals("12345678.123", this.rs.getBigDecimal(1, 3).toString());			assertEquals("0.000", this.rs.getBigDecimal(2, 3).toString());		} finally {			this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug8484");		}	}}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91久久国产最好的精华液| heyzo一本久久综合| 欧美国产一区二区在线观看| 欧美日韩一区高清| 97久久精品人人澡人人爽| 激情文学综合插| 亚洲愉拍自拍另类高清精品| 精品国产乱码久久久久久老虎| 91色.com| 欧洲一区在线观看| jlzzjlzz亚洲日本少妇| 91污在线观看| 国产白丝网站精品污在线入口| 免费三级欧美电影| 免费在线观看精品| 免费观看30秒视频久久| 青青草国产成人av片免费| 婷婷中文字幕综合| 日本欧美肥老太交大片| 日韩精品视频网| 久久99久久99小草精品免视看| 日韩在线一区二区| 日韩精品一二三| 久久精品国产精品青草| 国产自产v一区二区三区c| 极品少妇一区二区三区精品视频| 久久国产精品99精品国产| 蜜桃av一区二区三区电影| 黄页网站大全一区二区| 国产精品77777| 91亚洲永久精品| 欧美日韩和欧美的一区二区| 日韩一区二区三区视频| 久久综合久久鬼色| 自拍偷自拍亚洲精品播放| 亚洲影院在线观看| 美国av一区二区| 国产精品系列在线观看| 欧美性色黄大片手机版| 欧美电影免费观看高清完整版在线| 精品国产乱码久久久久久蜜臀| 国产精品嫩草影院av蜜臀| 亚洲欧美日韩久久精品| 韩国v欧美v日本v亚洲v| 97成人超碰视| 2欧美一区二区三区在线观看视频| 国产精品国模大尺度视频| 蜜臀av一区二区| 色综合色狠狠综合色| 精品国产伦一区二区三区免费| 亚洲男人电影天堂| 高潮精品一区videoshd| 91精选在线观看| 亚洲国产成人va在线观看天堂| 国产精品一区二区免费不卡 | 成人久久久精品乱码一区二区三区| 色吊一区二区三区| 国产精品久久久久久久裸模| 久久国产精品99久久人人澡| 欧美在线观看视频一区二区三区| 久久精子c满五个校花| 久久精品国产一区二区三区免费看| www.日韩大片| 中文字幕一区二区视频| 国内精品国产三级国产a久久| 777久久久精品| 日本伊人精品一区二区三区观看方式| 91香蕉视频污在线| 中文字幕一区二区三区四区| 成人av网站免费观看| 国产精品美女久久福利网站| 成人黄色片在线观看| 国产喷白浆一区二区三区| 国产精品综合在线视频| 久久这里只精品最新地址| 七七婷婷婷婷精品国产| 欧美成人性战久久| 国产一区不卡在线| 国产欧美日韩卡一| 色综合色综合色综合| 亚洲综合一区在线| 欧美一三区三区四区免费在线看 | 成人a免费在线看| 亚洲乱码日产精品bd| 色噜噜狠狠色综合中国| 亚洲一区二区视频在线观看| 欧美日韩国产片| 精品在线播放免费| 国产精品久久久久7777按摩| 91理论电影在线观看| 日日噜噜夜夜狠狠视频欧美人 | 中文字幕免费不卡| 欧美日韩中文另类| 九九国产精品视频| 亚洲天堂福利av| 欧美一级二级三级乱码| 国产不卡视频在线播放| 亚洲大片精品永久免费| 久久久久9999亚洲精品| 欧美日本乱大交xxxxx| 国产精品伊人色| 午夜精品成人在线视频| 久久九九国产精品| 日韩一区国产二区欧美三区| 91亚洲精品久久久蜜桃网站| 久久电影国产免费久久电影| 一区二区三区四区五区视频在线观看| 日韩精品一区二区三区视频| 日本道免费精品一区二区三区| 国产在线视视频有精品| 日韩和欧美一区二区| 樱花草国产18久久久久| 国产精品免费免费| 久久精品在这里| 精品国产91久久久久久久妲己 | 91色九色蝌蚪| jlzzjlzz亚洲日本少妇| 成人综合婷婷国产精品久久免费| 日韩电影在线观看网站| 亚洲午夜久久久久中文字幕久| 亚洲欧美日韩一区二区| 亚洲乱码日产精品bd| 综合久久综合久久| 亚洲美女淫视频| 一区二区三国产精华液| 亚洲大片精品永久免费| 蜜臀av性久久久久蜜臀aⅴ流畅 | 91香蕉视频黄| 欧美性一二三区| 欧美人牲a欧美精品| 欧美区一区二区三区| 日韩一区二区免费视频| 精品国产免费人成电影在线观看四季| 日韩精品一区二区三区视频在线观看| 欧美一区二区免费观在线| 精品国产乱码久久久久久牛牛| 2023国产精华国产精品| 国产精品久久夜| 亚洲一区二区三区在线| 日产欧产美韩系列久久99| 国产一区二区三区在线观看精品| 成人永久看片免费视频天堂| 91玉足脚交白嫩脚丫在线播放| 欧美视频精品在线| 精品美女在线观看| 一区二区三区鲁丝不卡| 经典三级一区二区| 日本精品免费观看高清观看| 欧美大黄免费观看| 亚洲欧洲日产国码二区| 蜜桃视频免费观看一区| jiyouzz国产精品久久| 日韩视频一区二区三区| 一区二区三区自拍| 国产精品一区二区在线观看不卡 | 亚洲国产精品久久久男人的天堂| 久久福利资源站| 欧美无砖专区一中文字| 国产日韩精品一区| 蜜臀久久99精品久久久画质超高清 | 777午夜精品视频在线播放| 中文字幕制服丝袜一区二区三区 | 在线视频国内自拍亚洲视频| 久久精品一区四区| 老色鬼精品视频在线观看播放| aaa欧美色吧激情视频| 久久久精品一品道一区| 日日夜夜免费精品视频| 欧美日韩在线电影| 亚洲一区二区三区影院| 一本一本久久a久久精品综合麻豆| 精品电影一区二区| 狠狠网亚洲精品| 日韩欧美国产三级电影视频| 免费看日韩精品| 日韩一区二区精品| 久久97超碰国产精品超碰| 88在线观看91蜜桃国自产| 视频一区视频二区中文字幕| 欧美嫩在线观看| 久久成人免费网| 久久精品一区二区三区不卡牛牛| 国模一区二区三区白浆 | 国产欧美一区二区在线| 国内久久婷婷综合| 国产丝袜欧美中文另类| 成人精品高清在线| 一区二区三区91| 欧美一区二区三区在线视频 | 毛片一区二区三区| 久久噜噜亚洲综合| 91浏览器在线视频| 男女视频一区二区| 国产精品女主播av| 这里只有精品视频在线观看| 久久不见久久见免费视频1| 国产精品无码永久免费888| 欧美日韩国产一级二级| 国产精品影视在线| 亚洲国产另类精品专区|