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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? statementstest.java

?? mysql jdbc驅(qū)動程序 mysql jdbc驅(qū)動程序 mysql jdbc驅(qū)動程序 mysql jdbc驅(qū)動程序
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
/* Copyright (C) 2002-2007 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.simple;import java.io.ByteArrayInputStream;import java.io.ByteArrayOutputStream;import java.io.CharArrayReader;import java.io.InputStream;import java.io.Reader;import java.io.StringReader;import java.math.BigDecimal;import java.rmi.server.UID;import java.sql.CallableStatement;import java.sql.Connection;import java.sql.Date;import java.sql.PreparedStatement;import java.sql.ResultSet;import java.sql.SQLException;import java.sql.Statement;import java.sql.Time;import java.sql.Timestamp;import java.sql.Types;import java.text.SimpleDateFormat;import java.util.Locale;import java.util.Properties;import testsuite.BaseTestCase;import com.mysql.jdbc.NotImplemented;import com.mysql.jdbc.SQLError;import com.mysql.jdbc.StringUtils;/** * DOCUMENT ME! *  * @author Mark Matthews * @version $Id: StatementsTest.java 4494 2005-10-31 22:30:34 -0600 (Mon, 31 Oct *          2005) mmatthews $ */public class StatementsTest extends BaseTestCase {	private static final int MAX_COLUMN_LENGTH = 255;	private static final int MAX_COLUMNS_TO_TEST = 40;	private static final int MIN_COLUMN_LENGTH = 10;	private static final int STEP = 8;	/**	 * Runs all test cases in this test suite	 * 	 * @param args	 */	public static void main(String[] args) {		junit.textui.TestRunner.run(StatementsTest.class);	}	/**	 * Creates a new StatementsTest object.	 * 	 * @param name	 *            DOCUMENT ME!	 */	public StatementsTest(String name) {		super(name);	}	/**	 * DOCUMENT ME!	 * 	 * @throws Exception	 *             DOCUMENT ME!	 */	public void setUp() throws Exception {		super.setUp();		this.stmt.executeUpdate("DROP TABLE IF EXISTS statement_test");		this.stmt.executeUpdate("DROP TABLE IF EXISTS statement_batch_test");		this.stmt				.executeUpdate("CREATE TABLE statement_test (id int not null primary key auto_increment, strdata1 varchar(255) not null, strdata2 varchar(255))");		this.stmt.executeUpdate("CREATE TABLE statement_batch_test "				+ "(id int not null primary key auto_increment, "				+ "strdata1 varchar(255) not null, strdata2 varchar(255), "				+ "UNIQUE INDEX (strdata1))");		for (int i = 6; i < MAX_COLUMNS_TO_TEST; i += STEP) {			this.stmt.executeUpdate("DROP TABLE IF EXISTS statement_col_test_"					+ i);			StringBuffer insertBuf = new StringBuffer(					"INSERT INTO statement_col_test_");			StringBuffer stmtBuf = new StringBuffer(					"CREATE TABLE IF NOT EXISTS statement_col_test_");			stmtBuf.append(i);			insertBuf.append(i);			stmtBuf.append(" (");			insertBuf.append(" VALUES (");			boolean firstTime = true;			for (int j = 0; j < i; j++) {				if (!firstTime) {					stmtBuf.append(",");					insertBuf.append(",");				} else {					firstTime = false;				}				stmtBuf.append("col_");				stmtBuf.append(j);				stmtBuf.append(" VARCHAR(");				stmtBuf.append(MAX_COLUMN_LENGTH);				stmtBuf.append(")");				insertBuf.append("'");				int numChars = 16;				for (int k = 0; k < numChars; k++) {					insertBuf.append("A");				}				insertBuf.append("'");			}			stmtBuf.append(")");			insertBuf.append(")");			this.stmt.executeUpdate(stmtBuf.toString());			this.stmt.executeUpdate(insertBuf.toString());		}		// explicitly set the catalog to exercise code in execute(),		// executeQuery() and		// executeUpdate()		// FIXME: Only works on Windows!		// this.conn.setCatalog(this.conn.getCatalog().toUpperCase());	}	/**	 * DOCUMENT ME!	 * 	 * @throws Exception	 *             DOCUMENT ME!	 */	public void tearDown() throws Exception {		this.stmt.executeUpdate("DROP TABLE statement_test");		for (int i = 0; i < MAX_COLUMNS_TO_TEST; i += STEP) {			StringBuffer stmtBuf = new StringBuffer(					"DROP TABLE IF EXISTS statement_col_test_");			stmtBuf.append(i);			this.stmt.executeUpdate(stmtBuf.toString());		}		try {			this.stmt.executeUpdate("DROP TABLE statement_batch_test");		} catch (SQLException sqlEx) {			;		}		super.tearDown();	}	/**	 * DOCUMENT ME!	 * 	 * @throws SQLException	 *             DOCUMENT ME!	 */	public void testAccessorsAndMutators() throws SQLException {		assertTrue("Connection can not be null, and must be same connection",				this.stmt.getConnection() == this.conn);		// Set max rows, to exercise code in execute(), executeQuery() and		// executeUpdate()		Statement accessorStmt = null;		try {			accessorStmt = this.conn.createStatement();			accessorStmt.setMaxRows(1);			accessorStmt.setMaxRows(0); // FIXME, test that this actually			// affects rows returned			accessorStmt.setMaxFieldSize(255);			assertTrue("Max field size should match what was set", accessorStmt					.getMaxFieldSize() == 255);			try {				accessorStmt.setMaxFieldSize(Integer.MAX_VALUE);				fail("Should not be able to set max field size > max_packet_size");			} catch (SQLException sqlEx) {				;			}			accessorStmt.setCursorName("undef");			accessorStmt.setEscapeProcessing(true);			accessorStmt.setFetchDirection(java.sql.ResultSet.FETCH_FORWARD);			int fetchDirection = accessorStmt.getFetchDirection();			assertTrue("Set fetch direction != get fetch direction",					fetchDirection == java.sql.ResultSet.FETCH_FORWARD);			try {				accessorStmt.setFetchDirection(Integer.MAX_VALUE);				fail("Should not be able to set fetch direction to invalid value");			} catch (SQLException sqlEx) {				;			}			try {				accessorStmt.setMaxRows(50000000 + 10);				fail("Should not be able to set max rows > 50000000");			} catch (SQLException sqlEx) {				;			}			try {				accessorStmt.setMaxRows(Integer.MIN_VALUE);				fail("Should not be able to set max rows < 0");			} catch (SQLException sqlEx) {				;			}			int fetchSize = this.stmt.getFetchSize();			try {				accessorStmt.setMaxRows(4);				accessorStmt.setFetchSize(Integer.MAX_VALUE);				fail("Should not be able to set FetchSize > max rows");			} catch (SQLException sqlEx) {				;			}			try {				accessorStmt.setFetchSize(-2);				fail("Should not be able to set FetchSize < 0");			} catch (SQLException sqlEx) {				;			}			assertTrue(					"Fetch size before invalid setFetchSize() calls should match fetch size now",					fetchSize == this.stmt.getFetchSize());		} finally {			if (accessorStmt != null) {				try {					accessorStmt.close();				} catch (SQLException sqlEx) {					;				}				accessorStmt = null;			}		}	}	/**	 * DOCUMENT ME!	 * 	 * @throws SQLException	 *             DOCUMENT ME!	 */	public void testAutoIncrement() throws SQLException {		if (!isRunningOnJdk131()) {			try {				this.stmt = this.conn.createStatement(						java.sql.ResultSet.TYPE_FORWARD_ONLY,						java.sql.ResultSet.CONCUR_READ_ONLY);				this.stmt.setFetchSize(Integer.MIN_VALUE);				this.stmt						.executeUpdate("INSERT INTO statement_test (strdata1) values ('blah')");				int autoIncKeyFromApi = -1;				this.rs = this.stmt.getGeneratedKeys();				if (this.rs.next()) {					autoIncKeyFromApi = this.rs.getInt(1);				} else {					fail("Failed to retrieve AUTO_INCREMENT using Statement.getGeneratedKeys()");				}				this.rs.close();				int autoIncKeyFromFunc = -1;				this.rs = this.stmt.executeQuery("SELECT LAST_INSERT_ID()");				if (this.rs.next()) {					autoIncKeyFromFunc = this.rs.getInt(1);				} else {					fail("Failed to retrieve AUTO_INCREMENT using LAST_INSERT_ID()");				}				if ((autoIncKeyFromApi != -1) && (autoIncKeyFromFunc != -1)) {					assertTrue(							"Key retrieved from API ("									+ autoIncKeyFromApi									+ ") does not match key retrieved from LAST_INSERT_ID() "									+ autoIncKeyFromFunc + ") function",							autoIncKeyFromApi == autoIncKeyFromFunc);				} else {					fail("AutoIncrement keys were '0'");				}			} finally {				if (this.rs != null) {					try {						this.rs.close();					} catch (Exception ex) { /* ignore */						;					}				}				this.rs = null;			}		}	}	/**	 * Tests all variants of numerical types (signed/unsigned) for correct	 * operation when used as return values from a prepared statement.	 * 	 * @throws Exception	 */	public void testBinaryResultSetNumericTypes() throws Exception {		/*		 * TINYINT 1 -128 127 SMALLINT 2 -32768 32767 MEDIUMINT 3 -8388608		 * 8388607 INT 4 -2147483648 2147483647 BIGINT 8 -9223372036854775808		 * 9223372036854775807		 */		String unsignedMinimum = "0";		String tiMinimum = "-128";		String tiMaximum = "127";		String utiMaximum = "255";		String siMinimum = "-32768";		String siMaximum = "32767";		String usiMaximum = "65535";		String miMinimum = "-8388608";		String miMaximum = "8388607";		String umiMaximum = "16777215";		String iMinimum = "-2147483648";		String iMaximum = "2147483647";		String uiMaximum = "4294967295";		String biMinimum = "-9223372036854775808";		String biMaximum = "9223372036854775807";		String ubiMaximum = "18446744073709551615";		try {			this.stmt					.executeUpdate("DROP TABLE IF EXISTS testBinaryResultSetNumericTypes");			this.stmt					.executeUpdate("CREATE TABLE testBinaryResultSetNumericTypes(rowOrder TINYINT, ti TINYINT,"							+ "uti TINYINT UNSIGNED, si SMALLINT,"							+ "usi SMALLINT UNSIGNED, mi MEDIUMINT,"							+ "umi MEDIUMINT UNSIGNED, i INT, ui INT UNSIGNED,"							+ "bi BIGINT, ubi BIGINT UNSIGNED)");			PreparedStatement inserter = this.conn					.prepareStatement("INSERT INTO testBinaryResultSetNumericTypes VALUES (?,?,?,?,?,?,?,?,?,?,?)");			inserter.setInt(1, 0);			inserter.setString(2, tiMinimum);			inserter.setString(3, unsignedMinimum);			inserter.setString(4, siMinimum);			inserter.setString(5, unsignedMinimum);			inserter.setString(6, miMinimum);			inserter.setString(7, unsignedMinimum);			inserter.setString(8, iMinimum);			inserter.setString(9, unsignedMinimum);			inserter.setString(10, biMinimum);			inserter.setString(11, unsignedMinimum);			inserter.executeUpdate();			inserter.setInt(1, 1);			inserter.setString(2, tiMaximum);			inserter.setString(3, utiMaximum);			inserter.setString(4, siMaximum);			inserter.setString(5, usiMaximum);			inserter.setString(6, miMaximum);			inserter.setString(7, umiMaximum);			inserter.setString(8, iMaximum);			inserter.setString(9, uiMaximum);			inserter.setString(10, biMaximum);			inserter.setString(11, ubiMaximum);			inserter.executeUpdate();			PreparedStatement selector = this.conn					.prepareStatement("SELECT * FROM testBinaryResultSetNumericTypes ORDER by rowOrder ASC");			this.rs = selector.executeQuery();			assertTrue(this.rs.next());			assertTrue(this.rs.getString(2).equals(tiMinimum));			assertTrue(this.rs.getString(3).equals(unsignedMinimum));			assertTrue(this.rs.getString(4).equals(siMinimum));			assertTrue(this.rs.getString(5).equals(unsignedMinimum));			assertTrue(this.rs.getString(6).equals(miMinimum));			assertTrue(this.rs.getString(7).equals(unsignedMinimum));			assertTrue(this.rs.getString(8).equals(iMinimum));			assertTrue(this.rs.getString(9).equals(unsignedMinimum));			assertTrue(this.rs.getString(10).equals(biMinimum));			assertTrue(this.rs.getString(11).equals(unsignedMinimum));			assertTrue(this.rs.next());			assertTrue(this.rs.getString(2) + " != " + tiMaximum, this.rs					.getString(2).equals(tiMaximum));			assertTrue(this.rs.getString(3) + " != " + utiMaximum, this.rs					.getString(3).equals(utiMaximum));			assertTrue(this.rs.getString(4) + " != " + siMaximum, this.rs					.getString(4).equals(siMaximum));			assertTrue(this.rs.getString(5) + " != " + usiMaximum, this.rs					.getString(5).equals(usiMaximum));

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
免费观看91视频大全| 亚洲精品高清视频在线观看| 精品一区二区免费在线观看| 久久综合久久99| 成人性视频网站| 亚洲综合清纯丝袜自拍| 在线成人免费观看| 国产酒店精品激情| **网站欧美大片在线观看| 91免费看片在线观看| 图片区小说区国产精品视频| 日韩限制级电影在线观看| 国内精品不卡在线| 中文字幕在线播放不卡一区| 欧美日韩国产影片| 国产精品自在在线| 精品久久久久久亚洲综合网| 日本va欧美va精品| 国产精品久久久久久久久久久免费看 | 欧美成人精精品一区二区频| 北条麻妃国产九九精品视频| 日韩不卡免费视频| 国产欧美精品区一区二区三区 | 欧美视频一区二区三区| 精品一区二区三区视频| 亚洲欧美日韩一区| 久久久久久久久99精品| 欧美午夜理伦三级在线观看| 国产精品123区| 天天色天天操综合| 亚洲综合成人网| 欧美激情综合五月色丁香 | 国产日韩欧美精品在线| 欧美精品日日鲁夜夜添| 99精品国产99久久久久久白柏| 美女视频一区二区| 亚洲成人免费影院| 亚洲天堂a在线| 中文字幕av一区二区三区| 日韩久久久久久| 日韩视频一区二区在线观看| 欧美日韩精品一区二区三区四区 | 国产日韩影视精品| 成a人片亚洲日本久久| 麻豆精品精品国产自在97香蕉| 亚洲综合在线视频| 亚洲一区二区三区四区中文字幕 | 欧美在线三级电影| 97精品电影院| 一本一本久久a久久精品综合麻豆| 成人性生交大片免费看中文| 成人深夜福利app| 不卡一区二区中文字幕| 成人国产精品免费| 99re视频这里只有精品| 欧美天堂亚洲电影院在线播放| 91在线精品一区二区| 91在线看国产| 欧美日韩一区二区在线观看| 欧美精品777| 日韩欧美国产系列| 欧美激情一区三区| 亚洲欧洲综合另类| 性感美女极品91精品| 日韩福利视频导航| 国产+成+人+亚洲欧洲自线| 99精品久久只有精品| 欧美日韩不卡在线| 久久久久久久免费视频了| 国产精品久久久久影院色老大 | 久久成人av少妇免费| 成人做爰69片免费看网站| 在线观看91精品国产入口| 欧美一区日韩一区| 国产精品色哟哟| 肉肉av福利一精品导航| 国产91高潮流白浆在线麻豆| 色视频一区二区| 色吧成人激情小说| 在线观看日韩国产| 日韩精品一区二区三区四区| 国产欧美精品在线观看| 亚洲一区二区三区自拍| 久久99在线观看| 在线观看日韩毛片| 国产精品日韩精品欧美在线| 五月天激情综合| 91视频在线看| 国产欧美精品一区aⅴ影院| 天天影视网天天综合色在线播放| 成人性生交大片免费看视频在线| 欧美狂野另类xxxxoooo| 日韩一区日韩二区| 国产精品中文有码| 欧美一卡2卡3卡4卡| 亚洲国产精品久久艾草纯爱| 欧美高清激情brazzers| 亚洲欧美在线aaa| 国产一区免费电影| 欧美一区二区成人6969| 爽爽淫人综合网网站| 色狠狠av一区二区三区| 中文字幕一区二区不卡| 国产一区免费电影| 精品国产髙清在线看国产毛片| 亚洲成人手机在线| 欧美日产在线观看| 亚洲福中文字幕伊人影院| 色视频一区二区| 亚洲精品国产一区二区精华液 | 色88888久久久久久影院野外| 日本一区二区免费在线观看视频 | 一本大道久久a久久精二百| 椎名由奈av一区二区三区| 波多野结衣中文字幕一区二区三区| 2020日本不卡一区二区视频| 亚洲成人免费看| av一区二区久久| 久久精品一区四区| 高清成人在线观看| 亚洲欧美日韩国产综合| 色狠狠一区二区三区香蕉| 一区二区免费视频| 6080日韩午夜伦伦午夜伦| 日韩av中文字幕一区二区三区| 欧美一级二级三级蜜桃| 激情综合色综合久久综合| 中文字幕电影一区| 欧美亚洲动漫另类| 久久激情五月激情| 亚洲欧洲av一区二区三区久久| 欧美性猛交xxxxxxxx| 久久99精品视频| 亚洲视频1区2区| 91精品免费在线观看| 成人免费毛片片v| 五月天久久比比资源色| 国产精品你懂的| 亚洲视频在线一区观看| 日本韩国精品在线| 久久99深爱久久99精品| 亚洲欧美激情一区二区| 日韩一级二级三级| 91碰在线视频| 国产原创一区二区| 一区二区高清在线| 国产欧美日韩另类视频免费观看| 欧美亚洲国产一区二区三区| 国产一二三精品| 日欧美一区二区| 亚洲欧美日韩久久精品| 久久网这里都是精品| 欧美一区二区黄色| 欧美网站大全在线观看| 成人国产一区二区三区精品| 激情综合色综合久久综合| 亚洲v精品v日韩v欧美v专区| 日韩码欧中文字| 日本一区二区高清| 精品成人一区二区三区四区| 欧美一区二区日韩一区二区| 色噜噜偷拍精品综合在线| www.亚洲精品| 蜜桃视频第一区免费观看| 国产精品午夜电影| 国产欧美综合在线| 久久精品视频一区二区三区| 日韩一区二区三区电影| 欧美日韩第一区日日骚| 欧美少妇性性性| 91激情在线视频| 91麻豆国产福利精品| fc2成人免费人成在线观看播放| 国产乱人伦偷精品视频免下载| 国产在线精品一区二区夜色| 久久国产精品99久久久久久老狼| 美腿丝袜亚洲色图| 激情小说欧美图片| 国产很黄免费观看久久| 成人免费av网站| 91小宝寻花一区二区三区| 91电影在线观看| 91久久精品一区二区二区| 欧美在线观看一二区| 欧美区一区二区三区| 欧美成人三级电影在线| 国产日本一区二区| 国产精品日韩成人| 亚洲1区2区3区4区| 奇米影视一区二区三区| 国产馆精品极品| 欧美综合天天夜夜久久| 国产精品久久久久久久久免费相片| 亚洲精品国产一区二区三区四区在线| 亚洲国产欧美一区二区三区丁香婷| 日本视频一区二区| 懂色av一区二区在线播放| 欧美综合天天夜夜久久| 欧美精品一区二| 一区二区三区免费在线观看|