提交 18bb2a2e authored 作者: Thomas Mueller's avatar Thomas Mueller

--no commit message

--no commit message
上级 cf291f53
......@@ -109,6 +109,7 @@ via PayPal:
</li><li>lumber-mill.co.jp, Japan
</li><li>Oliver Computing LLC, USA
</li><li>Harpal Grover Consulting Inc., USA
</li><li>Elisabetta Berlini, Italy
</li></ul>
</div></td></tr></table></body></html>
......@@ -42,9 +42,9 @@ public class RuleFixed implements Rule {
case ANY_WORD:
case ANY_UNTIL_END: {
StringBuffer buff = new StringBuffer();
int len = r.nextInt(10);
int len = r.nextBoolean() ? 1 : r.nextInt(5);
for (int i = 0; i < len; i++) {
buff.append((char) ('A' + r.nextInt('Z' - 'A')));
buff.append((char) ('A' + r.nextInt('C' - 'A')));
}
return buff.toString();
}
......@@ -53,7 +53,7 @@ public class RuleFixed implements Rule {
case CONCAT:
return "||";
case AZ_UNDERLINE:
return "" + (char) ('A' + r.nextInt('Z' - 'A'));
return "" + (char) ('A' + r.nextInt('C' - 'A'));
case AF:
return "" + (char) ('A' + r.nextInt('F' - 'A'));
case DIGIT:
......
......@@ -22,7 +22,7 @@ public class RuleOptional implements Rule {
}
public String random(Bnf config, int level) {
if (level > 10 ? config.getRandom().nextInt(level) == 1 : config.getRandom().nextBoolean()) {
if (level > 10 ? config.getRandom().nextInt(level) == 1 : config.getRandom().nextInt(4) == 1) {
return rule.random(config, level + 1);
} else {
return "";
......
......@@ -92,6 +92,10 @@ public class User extends RightOwner {
}
}
if (!isRightGrantedRecursive(table, rightMask)) {
if (table.getTemporary() && !table.getGlobalTemporary()) {
// the owner has all rights on local temporary tables
return;
}
throw Message.getSQLException(ErrorCode.NOT_ENOUGH_RIGHTS_FOR_1, table.getSQL());
}
}
......
......@@ -33,7 +33,6 @@ import org.h2.util.CacheObject;
import org.h2.util.CacheWriter;
import org.h2.util.FileUtils;
import org.h2.util.IntArray;
import org.h2.util.IntHashMap;
import org.h2.util.MathUtils;
import org.h2.util.ObjectArray;
import org.h2.util.ObjectUtils;
......@@ -80,9 +79,6 @@ public class DiskFile implements CacheWriter {
private HashSet potentiallyFreePages;
private int fileBlockCount;
private IntArray pageOwners;
// the latest delete in a page
private IntArray pageDelete;
private Cache cache;
private LogSystem log;
private DataPage rowBuff;
......@@ -138,7 +134,6 @@ public class DiskFile implements CacheWriter {
used = new BitField();
deleted = new BitField();
pageOwners = new IntArray();
pageDelete = new IntArray();
// init pageOwners
setBlockCount(fileBlockCount);
redoBuffer = new ObjectArray();
......@@ -150,7 +145,6 @@ public class DiskFile implements CacheWriter {
int pages = getPage(count);
while (pages >= pageOwners.size()) {
pageOwners.add(FREE_PAGE);
pageDelete.add(0);
}
}
......@@ -609,10 +603,6 @@ public class DiskFile implements CacheWriter {
freePage(getPage(i));
}
}
int start = getPage(pos), end = getPage(pos + blockCount);
for (int i = start; i <= end; i++) {
pageDelete.set(i, nextDeleteId);
}
}
void reuseSpace() throws SQLException {
......@@ -622,14 +612,13 @@ public class DiskFile implements CacheWriter {
int oldest = 0;
for (int i = 0; i < sessions.length; i++) {
int deleteId = sessions[i].getLastUncommittedDelete();
if (oldest == 0 || deleteId < oldest) {
if (oldest == 0 || (deleteId != 0 && deleteId < oldest)) {
oldest = deleteId;
}
}
for (Iterator it = potentiallyFreePages.iterator(); it.hasNext();) {
int p = ((Integer) it.next()).intValue();
int testingReallyCareful;
if (oldest == 0 /*|| oldest > pageDelete.get(p)*/) {
if (oldest == 0) {
setPageOwner(p, FREE_PAGE);
it.remove();
}
......@@ -698,7 +687,6 @@ public class DiskFile implements CacheWriter {
database.getStorage(storageId, this).addPage(page);
if (SysProperties.REUSE_SPACE_QUICKLY) {
potentiallyFreePages.remove(ObjectUtils.getInteger(page));
pageDelete.set(page, 0);
}
}
pageOwners.set(page, storageId);
......
......@@ -149,6 +149,7 @@ public class Storage {
}
record.setDeleted(true);
int blockCount = record.getBlockCount();
file.uncommittedDelete(session);
free(pos, blockCount);
recordCount--;
file.removeRecord(session, pos, record, blockCount);
......@@ -266,7 +267,7 @@ public class Storage {
pageCheckIndex = (pageCheckIndex + 1) % pages.size();
int page = pages.get(pageCheckIndex);
if (file.isPageFree(page) && file.getPageOwner(page) == id) {
file.freePage(page);
// file.freePage(page);
}
}
......
......@@ -156,6 +156,9 @@ java org.h2.test.TestAll timer
Test space re-use
REUSE_SPACE_AFTER=20 or so
delete old ipowerb content (first filter, then remove)
link to new changelog and roadmap, remove pages from google groups
sourceDocs.html: move
Automate real power off tests
......@@ -163,33 +166,18 @@ timer test
Can sometimes not delete log file? need test case
link to new changelog and roadmap, remove pages from google groups
Adjust cache memory usage
// test with garbage at the end of the log file (must be consistently detected as such)
// TestRandomSQL is too random; most statements fails
// extend the random join test that compared the result against PostgreSQL
// long running test with the same database
// repeatable test with a very big database (making backups of the database files)
Test Recovery with MAX_LOG_FILE_SIZE=1; test with various log file sizes
History:
Empty space is re-used less agressively because this could cause database corruption in some cases.
CSV tool now support lineSeparator
Roadmap:
The user should be allowed to do everything with his own temp tables (and views).
CREATE USER IF NOT EXISTS READER PASSWORD 'READER';
<login as READER>
CREATE LOCAL TEMPORARY TABLE IF NOT EXISTS MY_TEST(ID INT);
INSERT INTO MY_TEST VALUES(1);
SELECT * FROM MY_TEST;
DROP TABLE MY_TEST;
*/
if (args.length > 0) {
......@@ -426,10 +414,7 @@ DROP TABLE MY_TEST;
new TestSQLInjection().runTest(this);
new TestSessionsLocks().runTest(this);
new TestSequence().runTest(this);
int todo2;
new TestSpaceReuse().runTest(this);
new TestSpeed().runTest(this);
new TestTempTables().runTest(this);
new TestTransaction().runTest(this);
......@@ -469,8 +454,6 @@ DROP TABLE MY_TEST;
// synth
new TestCrashAPI().runTest(this);
new TestRandomSQL().runTest(this);
int test3;
new TestKillRestart().runTest(this);
new TestKillRestartMulti().runTest(this);
......
......@@ -211,6 +211,10 @@ public abstract class TestBase {
return mb;
}
protected void error() throws Exception {
error("Unexpected success");
}
protected void error(String string) throws Exception {
println(string);
throw new Exception(string);
......
......@@ -34,13 +34,13 @@ public class TestAutoRecompile extends TestBase {
stat.execute("ALTER TABLE TEST ADD COLUMN Z INT");
try {
prep.execute();
error("must fail");
error();
} catch (SQLException e) {
checkNotGeneralException(e);
}
try {
prep.execute();
error("must fail");
error();
} catch (SQLException e) {
checkNotGeneralException(e);
}
......
......@@ -226,7 +226,7 @@ public class TestCases extends TestBase {
stat.execute("insert into test values(1);");
try {
stat.execute("alter table test add column name varchar not null;");
error("shouldn't work");
error();
} catch (SQLException e) {
checkNotGeneralException(e);
}
......@@ -253,7 +253,7 @@ public class TestCases extends TestBase {
stat.execute("insert into test values(1)");
try {
stat.execute("alter table test alter column id date");
error("shouldn't work");
error();
} catch (SQLException e) {
checkNotGeneralException(e);
}
......@@ -353,7 +353,7 @@ public class TestCases extends TestBase {
stat = conn.createStatement();
try {
stat.execute("select * from abc");
error("abc should be deleted");
error();
} catch (SQLException e) {
checkNotGeneralException(e);
}
......@@ -560,7 +560,7 @@ public class TestCases extends TestBase {
Statement stat2 = conn2.createStatement();
try {
stat2.execute("UPDATE TEST SET ID=2");
error("must fail");
error();
} catch (SQLException e) {
checkNotGeneralException(e);
}
......
......@@ -23,7 +23,7 @@ public class TestExclusive extends TestBase {
try {
Connection conn2 = getConnection("exclusive");
conn2.close();
error("unexpected success");
error();
} catch (SQLException e) {
checkNotGeneralException(e);
}
......
......@@ -146,7 +146,7 @@ public class TestFunctions extends TestBase {
try {
rs = stat.executeQuery("CALL SELECT_F('ERROR')");
error("expected error");
error();
} catch (SQLException e) {
check("42001", e.getSQLState());
}
......
......@@ -127,7 +127,7 @@ public class TestLinkedTable extends TestBase {
stat2.executeUpdate("INSERT INTO TEST_LINK_DI VALUES(2, 'World')");
try {
stat2.executeUpdate("UPDATE TEST_LINK_U SET ID=ID+1");
error("unexpected success");
error();
} catch (SQLException e) {
checkNotGeneralException(e);
}
......
......@@ -163,9 +163,9 @@ public class TestPowerOff extends TestBase {
try {
stat.execute("INSERT INTO TEST VALUES(2, 'Hello')");
stat.execute("CHECKPOINT");
error("should not work!");
error();
} catch (SQLException e) {
// expected
checkNotGeneralException(e);
}
boolean deleted = false;
ArrayList files = FileLister.getDatabaseFiles(dir, dbName, false);
......@@ -197,9 +197,9 @@ public class TestPowerOff extends TestBase {
stat.execute("INSERT INTO TEST VALUES(2, 'Hello')");
stat.execute("INSERT INTO TEST VALUES(3, 'Hello')");
stat.execute("CHECKPOINT");
error("should have failed!");
} catch (Exception e) {
// ok
error();
} catch (SQLException e) {
checkNotGeneralException(e);
}
((JdbcConnection) conn).setPowerOffCount(0);
......
......@@ -20,6 +20,7 @@ public class TestRights extends TestBase {
private Statement stat;
public void test() throws Exception {
testDropTempTables();
// testLowerCaseUser();
testSchemaRenameUser();
testAccessRights();
......@@ -39,6 +40,28 @@ public class TestRights extends TestBase {
// conn.close();
// }
private void testDropTempTables() throws Exception {
deleteDb("rights");
Connection conn = getConnection("rights");
stat = conn.createStatement();
stat.execute("CREATE USER IF NOT EXISTS READER PASSWORD 'READER'");
stat.execute("CREATE TABLE TEST(ID INT)");
Connection conn2 = getConnection("rights", "READER", "READER");
Statement stat2 = conn2.createStatement();
try {
stat2.execute("SELECT * FROM TEST");
error();
} catch (SQLException e) {
checkNotGeneralException(e);
}
stat2.execute("CREATE LOCAL TEMPORARY TABLE IF NOT EXISTS MY_TEST(ID INT)");
stat2.execute("INSERT INTO MY_TEST VALUES(1)");
stat2.execute("SELECT * FROM MY_TEST");
stat2.execute("DROP TABLE MY_TEST");
conn2.close();
conn.close();
}
public void testSchemaRenameUser() throws Exception {
if (config.memory) {
return;
......@@ -56,13 +79,13 @@ public class TestRights extends TestBase {
stat.execute("select * from b.test");
try {
stat.execute("alter user test1 admin false");
error("Unexpected success");
error();
} catch (SQLException e) {
checkNotGeneralException(e);
}
try {
stat.execute("drop user test1");
error("Unexpected success");
error();
} catch (SQLException e) {
checkNotGeneralException(e);
}
......@@ -145,19 +168,19 @@ public class TestRights extends TestBase {
try {
conn = getConnection("rights", "Test", "abc");
error("unexpected success (mixed case user name)");
error("mixed case user name");
} catch (SQLException e) {
checkNotGeneralException(e);
}
try {
conn = getConnection("rights", "TEST", "abc");
error("unexpected success (wrong password)");
error("wrong password");
} catch (SQLException e) {
checkNotGeneralException(e);
}
try {
conn = getConnection("rights", "TEST", null);
error("unexpected success (wrong password)");
error("wrong password");
} catch (SQLException e) {
checkNotGeneralException(e);
}
......@@ -223,7 +246,7 @@ public class TestRights extends TestBase {
public void executeError(String sql) throws Exception {
try {
stat.execute(sql);
error("unexpected success (not admin)");
error("not admin");
} catch (SQLException e) {
checkNotGeneralException(e);
}
......
......@@ -65,7 +65,7 @@ public class TestRunscript extends TestBase implements Trigger {
if (password) {
try {
stat2.execute(sql);
error("should fail");
error();
} catch (SQLException e) {
checkNotGeneralException(e);
}
......
......@@ -38,7 +38,7 @@ public class TestSQLInjection extends TestBase {
try {
check(checkPasswordInsecure("123456"));
error("Should fail now");
error();
} catch (SQLException e) {
checkNotGeneralException(e);
}
......
......@@ -36,7 +36,7 @@ public class TestSpaceReuse extends TestBase {
}
}
if (now > first) {
this.error("first: " + first + " now: " + now);
error("first: " + first + " now: " + now);
}
}
......
......@@ -41,7 +41,7 @@ public class TestTransaction extends TestBase {
Statement s2 = c2.createStatement();
try {
s2.executeUpdate("insert into B values('two', 1)");
error("Unexpected success");
error();
} catch (SQLException e) {
checkNotGeneralException(e);
}
......
......@@ -89,7 +89,7 @@ public class TestTriggersConstraints extends TestBase implements Trigger {
stat.execute("DROP TRIGGER IF EXISTS INS_BEFORE");
try {
stat.execute("DROP TRIGGER INS_BEFORE");
error("must not work");
error();
} catch (SQLException e) {
checkNotGeneralException(e);
}
......
......@@ -167,7 +167,7 @@ public class TestBatchUpdates extends TestBase {
trace("updateCount length:" + updateCountLen);
if (updateCountLen != 3) {
error("addBatch");
error("updateCount: " + updateCountLen);
} else {
trace("addBatch add the SQL statements to Batch ");
}
......@@ -204,7 +204,7 @@ public class TestBatchUpdates extends TestBase {
updCountLength = updateCount.length;
trace("updateCount Length:" + updCountLength);
if (updCountLength != 3) {
error("addBatch");
error("addBatch " + updCountLength);
} else {
trace("addBatch add the SQL statements to Batch ");
}
......@@ -243,7 +243,7 @@ public class TestBatchUpdates extends TestBase {
if (updCountLength == 0) {
trace("clearBatch Method clears the current Batch ");
} else {
error("clearBatch");
error("clearBatch " + updCountLength);
}
}
......
......@@ -63,7 +63,7 @@ public class TestCancel extends TestBase {
check(1000, rs.getInt(1));
try {
stat.executeQuery("SELECT MAX(RAND()) FROM SYSTEM_RANGE(1, 100000000)");
error("unexpected success");
error();
} catch (SQLException e) {
check(ErrorCode.STATEMENT_WAS_CANCELLED, e.getErrorCode());
}
......@@ -80,7 +80,7 @@ public class TestCancel extends TestBase {
stat.execute("SET QUERY_TIMEOUT 10");
try {
stat.executeQuery("SELECT MAX(RAND()) FROM SYSTEM_RANGE(1, 100000000)");
error("unexpected success");
error();
} catch (SQLException e) {
check(ErrorCode.STATEMENT_WAS_CANCELLED, e.getErrorCode());
}
......@@ -96,7 +96,7 @@ public class TestCancel extends TestBase {
Statement stat = conn.createStatement();
try {
stat.executeQuery("SELECT MAX(RAND()) FROM SYSTEM_RANGE(1, 100000000)");
error("unexpected success");
error();
} catch (SQLException e) {
check(ErrorCode.STATEMENT_WAS_CANCELLED, e.getErrorCode());
}
......
......@@ -58,18 +58,18 @@ public class TestPreparedStatement extends TestBase {
testParameterMetaData(conn);
conn.close();
}
private void testExecuteErrorTwice(Connection conn) throws Exception {
PreparedStatement prep = conn.prepareStatement("CREATE TABLE BAD AS SELECT A");
try {
prep.execute();
error("Unexpected success");
error();
} catch (SQLException e) {
checkNotGeneralException(e);
}
try {
prep.execute();
error("Unexpected success");
error();
} catch (SQLException e) {
checkNotGeneralException(e);
}
......@@ -174,9 +174,9 @@ public class TestPreparedStatement extends TestBase {
"SELECT * FROM (SELECT ? FROM DUAL)");
prep.setInt(1, 1);
prep.execute();
error("Must fail");
error();
} catch (SQLException e) {
// expected
checkNotGeneralException(e);
}
PreparedStatement prep = conn.prepareStatement("SELECT -?");
prep.setInt(1, 1);
......@@ -342,22 +342,22 @@ public class TestPreparedStatement extends TestBase {
check(pm.isSigned(1), true);
try {
pm.getPrecision(0);
error("should fail");
error();
} catch (SQLException e) {
// ok
checkNotGeneralException(e);
}
try {
pm.getPrecision(4);
error("should fail");
error();
} catch (SQLException e) {
// ok
checkNotGeneralException(e);
}
prep.close();
try {
pm.getPrecision(1);
error("should fail");
error();
} catch (SQLException e) {
// ok
checkNotGeneralException(e);
}
}
......@@ -439,10 +439,9 @@ public class TestPreparedStatement extends TestBase {
checkFalse(rs.next());
try {
prep = conn.prepareStatement("select ? from dual union select ? from dual");
error("expected error");
error();
} catch (SQLException e) {
checkNotGeneralException(e);
// ok
}
prep = conn.prepareStatement("select cast(? as varchar) from dual union select ? from dual");
check(prep.getParameterMetaData().getParameterCount(), 2);
......
......@@ -56,7 +56,7 @@ public class TestStatement extends TestBase {
int id1 = savepoint1.getSavepointId();
try {
savepoint1.getSavepointName();
error("exception expected");
error();
} catch (SQLException e) {
checkNotGeneralException(e);
}
......@@ -68,7 +68,7 @@ public class TestStatement extends TestBase {
conn.releaseSavepoint(savepoint2a);
try {
savepoint2a.getSavepointId();
error("exception expected");
error();
} catch (SQLException e) {
checkNotGeneralException(e);
}
......@@ -80,7 +80,7 @@ public class TestStatement extends TestBase {
check(savepointTest.getSavepointName(), "Joe's");
try {
savepointTest.getSavepointId();
error("exception expected");
error();
} catch (SQLException e) {
checkNotGeneralException(e);
}
......@@ -93,7 +93,7 @@ public class TestStatement extends TestBase {
checkFalse(rs.next());
try {
conn.rollback(savepoint2);
error("exception expected");
error();
} catch (SQLException e) {
checkNotGeneralException(e);
}
......
......@@ -53,7 +53,7 @@ public class TestUpdatableResultSet extends TestBase {
try {
rs.insertRow();
error("Unexpected success");
error();
} catch (SQLException e) {
checkNotGeneralException(e);
}
......
......@@ -80,7 +80,7 @@ public class TestZloty extends TestBase {
try {
prep.setBigDecimal(2, new ZlotyBigDecimal("11.0"));
prep.execute();
error("unexpected success");
error();
} catch (SQLException e) {
checkNotGeneralException(e);
}
......@@ -96,7 +96,7 @@ public class TestZloty extends TestBase {
};
prep.setBigDecimal(2, value);
prep.execute();
error("unexpected success");
error();
} catch (SQLException e) {
checkNotGeneralException(e);
}
......
......@@ -38,7 +38,7 @@ public class TestMvcc1 extends TestBase {
check("FALSE", rs.getString("VALUE"));
try {
stat.execute("SET MVCC TRUE");
error("Unexpected success");
error();
} catch (SQLException e) {
check(ErrorCode.CANNOT_CHANGE_SETTING_WHEN_OPEN_1, e.getErrorCode());
}
......@@ -80,7 +80,7 @@ public class TestMvcc1 extends TestBase {
s1.execute("insert into test values(1)");
try {
s2.execute("drop table test");
error("Unexpected success");
error();
} catch (SQLException e) {
// lock timeout expected
checkNotGeneralException(e);
......@@ -107,7 +107,7 @@ public class TestMvcc1 extends TestBase {
s1.execute("insert into a(code) values('one')");
try {
s2.execute("insert into b values('un B', 1)");
error("Unexpected success");
error();
} catch (SQLException e) {
checkNotGeneralException(e);
}
......@@ -123,7 +123,7 @@ public class TestMvcc1 extends TestBase {
s2.execute("select * from test for update");
try {
s1.execute("insert into test values(2, 'x')");
error("Unexpected success");
error();
} catch (SQLException e) {
// lock timeout expected
checkNotGeneralException(e);
......@@ -346,7 +346,7 @@ public class TestMvcc1 extends TestBase {
c1.commit();
try {
s1.execute("update test set id=2 where id=1");
error("unexpected success");
error();
} catch (SQLException e) {
checkNotGeneralException(e);
}
......
......@@ -40,9 +40,9 @@ public class TestPgServer extends TestBase {
Statement stat = conn.createStatement();
try {
stat.execute("select ***");
error("expected failure");
error();
} catch (SQLException e) {
// expected
checkNotGeneralException(e);
}
conn.close();
conn = DriverManager.getConnection("jdbc:postgresql://localhost:5535/test", "sa", "sa");
......
......@@ -29,6 +29,7 @@ public class TestRandomSQL extends TestBase {
private int seed;
private boolean exitOnError = true;
private Bnf bnf;
private int success, total;
private void processException(String sql, SQLException e) {
if (e.getSQLState().equals("HY000")) {
......@@ -100,7 +101,7 @@ public class TestRandomSQL extends TestBase {
if (topic.equals("select")) {
weight = 10;
} else if (topic.equals("createtable")) {
weight = 5;
weight = 20;
} else if (topic.equals("insert")) {
weight = 5;
} else if (topic.startsWith("update")) {
......@@ -130,11 +131,10 @@ public class TestRandomSQL extends TestBase {
conn = connect();
}
Statement stat = conn.createStatement();
for (int i = 0; i < statements.size(); i++) {
int sid = config.getRandom().nextInt(statements.size());
RuleHead r = (RuleHead) statements.get(sid);
String rand = r.getRule().random(config, 0);
String rand = r.getRule().random(config, 0).trim();
if (rand.length() > 0) {
try {
Thread.yield();
......@@ -144,7 +144,12 @@ public class TestRandomSQL extends TestBase {
if (showSQL) {
System.out.println(i + " " + rand);
}
total++;
if (total % 100 == 0) {
printTime("total: " + total + " success: " + (100 * success / total) + "%");
}
stat.execute(rand);
success++;
}
} catch (SQLException e) {
processException(rand, e);
......
......@@ -165,7 +165,7 @@ public class TestFileSystem extends TestBase {
FileObject f = fs.openFileObject(s, "rw");
try {
f.readFully(new byte[1], 0, 1);
error("Unexpected success");
error();
} catch (EOFException e) {
// expected
}
......
......@@ -69,13 +69,13 @@ public class TestOverflow extends TestBase {
void onSuccess() throws Exception {
if (!successExpected && SysProperties.OVERFLOW_EXCEPTIONS) {
error("unexpected success");
error();
}
}
void onError() throws Exception {
if (successExpected) {
error("unexpected error");
error();
}
}
......
......@@ -170,7 +170,7 @@ public class TestServlet extends TestBase {
try {
stat1.execute("SELECT * FROM T");
error("Unexpected success");
error();
} catch (SQLException e) {
checkNotGeneralException(e);
}
......@@ -182,7 +182,7 @@ public class TestServlet extends TestBase {
// listener must be stopped
try {
conn2 = DriverManager.getConnection("jdbc:h2:tcp://localhost:8888/" + baseDir + "/servlet", getUser(), getPassword());
error("Unexpected success");
error();
} catch (SQLException e) {
checkNotGeneralException(e);
}
......@@ -190,7 +190,7 @@ public class TestServlet extends TestBase {
// connection must be closed
try {
stat1.execute("SELECT * FROM DUAL");
error("Unexpected success");
error();
} catch (SQLException e) {
checkNotGeneralException(e);
}
......
......@@ -35,13 +35,13 @@ public class TestStringUtils extends TestBase {
check(new byte[] { (byte) 0xfa, (byte) 0xce }, ByteUtils.convertStringToBytes("FaCe"));
try {
ByteUtils.convertStringToBytes("120");
error("unexpected success");
error();
} catch (SQLException e) {
checkNotGeneralException(e);
}
try {
ByteUtils.convertStringToBytes("fast");
error("unexpected success");
error();
} catch (SQLException e) {
checkNotGeneralException(e);
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论