Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6e2fab0

Browse files
author
Dave Cramer
committed
added empty result set testing
1 parent1ed4a92 commit6e2fab0

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

‎src/interfaces/jdbc/org/postgresql/test/jdbc2/MiscTest.java

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
importjava.sql.*;
66

77
/*
8-
* $Id: MiscTest.java,v 1.5 2002/05/30 16:26:55 davec Exp $
8+
* $Id: MiscTest.java,v 1.6 2002/06/14 10:56:13 davec Exp $
99
*
1010
* Some simple tests based on problems reported by users. Hopefully these will
1111
* help prevent previous problems from re-occuring ;-)
@@ -52,6 +52,29 @@ public void testDatabaseSelectNullBug()
5252
}
5353
}
5454

55+
publicvoidtestError()
56+
{
57+
Connectioncon =JDBC2Tests.openDB();
58+
try
59+
{
60+
61+
// transaction mode
62+
con.setAutoCommit(false);
63+
Statementstmt =con.createStatement();
64+
stmt.execute("select 1/0");
65+
fail("Should not execute this, as a SQLException s/b thrown" );
66+
con.commit();
67+
}
68+
catch (Exceptionex )
69+
{
70+
}
71+
try
72+
{
73+
con.commit();
74+
con.close();
75+
}catch (Exceptionex) {}
76+
}
77+
5578
publicvoidxtestLocking()
5679
{
5780

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp