亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
国产蜜臀av在线一区二区三区 | 性久久久久久久久| 99久久精品免费精品国产| 国产**成人网毛片九色| 99re66热这里只有精品3直播| 91色视频在线| 91精品国产综合久久精品app| 欧美三级电影一区| 久久夜色精品国产噜噜av | 91免费看视频| 91精品国产高清一区二区三区蜜臀 | 一区二区高清视频在线观看| 青椒成人免费视频| 亚洲综合男人的天堂| 日韩和欧美一区二区三区| 在线精品观看国产| 91丨九色丨国产丨porny| 精品视频999| 日韩丝袜美女视频| 亚洲老妇xxxxxx| 国产精品一区二区在线播放 | 欧美激情综合五月色丁香小说| 亚洲女人****多毛耸耸8| 久久综合综合久久综合| 日本道免费精品一区二区三区| 日韩一卡二卡三卡| 亚洲成人资源网| 91在线国产福利| 国产三区在线成人av| 蜜臀av性久久久久蜜臀av麻豆| 99免费精品视频| 欧美日韩大陆一区二区| 五月婷婷色综合| 欧美中文字幕久久| 国产精品国产a级| 国产·精品毛片| 精品欧美乱码久久久久久1区2区| 一区二区三区在线不卡| 99热99精品| 国产精品午夜春色av| 韩日av一区二区| 日韩无一区二区| 日韩1区2区日韩1区2区| 欧美精品vⅰdeose4hd| 亚洲欧洲精品天堂一级| 成人手机电影网| 国产亚洲欧美一级| 国产一区二区三区在线观看免费| 日韩精品一区国产麻豆| 免费观看一级特黄欧美大片| 91麻豆精品久久久久蜜臀| 日韩精品三区四区| 综合中文字幕亚洲| 久久久一区二区三区捆绑**| 在线视频亚洲一区| 亚洲视频免费观看| 99久久99久久久精品齐齐| 亚洲国产精品v| 在线观看日韩精品| 裸体一区二区三区| 日本一区二区三区在线不卡| 在线欧美小视频| 久久机这里只有精品| 国产精品乱人伦一区二区| 欧美日韩成人激情| 国产一区二区三区av电影| 亚洲男同性恋视频| 欧美成人video| 99久久精品免费观看| 日本欧美在线看| 一区精品在线播放| 日韩精品资源二区在线| 91在线精品一区二区三区| 美女视频一区二区三区| 最新日韩在线视频| 一区二区三区欧美在线观看| 免费成人性网站| 色偷偷成人一区二区三区91| 欧美一区二区免费视频| 国产精品18久久久久久vr| 亚洲一区在线看| 久久久久久免费网| 欧美一区二区视频网站| 北条麻妃一区二区三区| 奇米色一区二区| 一区二区三区免费在线观看| 久久精品一二三| 欧美一区二区福利视频| 色欧美片视频在线观看| 国产精品羞羞答答xxdd| 日本不卡一二三区黄网| 亚洲黄一区二区三区| 欧美激情一二三区| 亚洲精品福利视频网站| 国产日产欧美精品一区二区三区| 欧美精品一二三区| 欧美性生活一区| 95精品视频在线| 麻豆精品视频在线观看视频| 国产精品久久看| 欧美性大战久久久| 国产乱码一区二区三区| 久久综合九色综合97婷婷女人 | 亚洲丝袜制服诱惑| 久久久精品国产99久久精品芒果 | 麻豆精品久久精品色综合| 亚洲大片免费看| 亚洲综合无码一区二区| 最新热久久免费视频| 国产精品午夜久久| 国产精品污www在线观看| 久久婷婷综合激情| 欧美精品一区二区久久婷婷| 91精品国产乱码| 欧美一级片在线| 日韩亚洲国产中文字幕欧美| 91精品国产综合久久久久久久久久| 国产欧美综合色| 国产精品一区二区91| 国产精品天美传媒| 国产拍揄自揄精品视频麻豆| 国产丝袜欧美中文另类| 国产精品网站导航| 国产精品久久一级| 亚洲女与黑人做爰| 一区二区三区av电影| 亚洲午夜激情av| 婷婷综合在线观看| 亚洲国产精品一区二区www在线| 亚洲一区二区高清| 亚洲1区2区3区视频| 日韩av中文字幕一区二区三区 | 麻豆国产欧美一区二区三区| 日韩精品欧美精品| 国内精品国产三级国产a久久| 久久精品国产亚洲a| 国产精品资源站在线| 99久久久久久99| 欧美性大战久久久久久久| 欧美一区二区在线观看| 欧美sm美女调教| 国产精品天干天干在线综合| 亚洲精品国产品国语在线app| 三级在线观看一区二区| 国产一区二区视频在线播放| av网站免费线看精品| 777色狠狠一区二区三区| 久久一留热品黄| 亚洲欧美国产高清| 日本韩国视频一区二区| 日韩一区二区三区三四区视频在线观看| 久久综合国产精品| 亚洲精品免费一二三区| 日韩综合小视频| 成人教育av在线| 欧美一区二区三区免费视频| 欧美激情中文字幕| 亚洲成人精品在线观看| 国产成人综合网站| 欧美日韩精品综合在线| 国产精品天天摸av网| 老汉av免费一区二区三区| 成人动漫在线一区| 日韩免费高清电影| 亚洲一区二区偷拍精品| 国产91丝袜在线播放0| 欧美一区二区视频在线观看2020| 国产精品视频免费看| 日韩成人午夜电影| 在线免费视频一区二区| 国产欧美综合在线观看第十页 | 国产精品亚洲午夜一区二区三区| 在线免费观看日本欧美| 国产欧美日韩不卡免费| 久久久噜噜噜久久人人看| 精品一区在线看| 欧美性受xxxx| 一区二区高清在线| av动漫一区二区| 国产精品无人区| 国产精品自拍一区| 制服丝袜国产精品| 亚洲一区免费观看| 97超碰欧美中文字幕| 久久久不卡网国产精品二区| 美女看a上一区| 欧美一区二区视频在线观看| 一区二区三区免费在线观看| 色综合天天综合| 国产精品久久久久久久裸模| 国产精品一级二级三级| 久久久久久免费网| 国产乱码精品一区二区三区忘忧草 | 国产乱子伦视频一区二区三区 | 国产制服丝袜一区| 美女被吸乳得到大胸91| 欧美精品视频www在线观看 | 成人免费高清视频| 久久精品一区二区三区av| 国产精品77777|