File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed
src/interfaces/jdbc/org/postgresql/test/jdbc2 Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change 5
5
import java .sql .*;
6
6
7
7
/*
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 $
9
9
*
10
10
* Some simple tests based on problems reported by users. Hopefully these will
11
11
* help prevent previous problems from re-occuring ;-)
@@ -52,6 +52,29 @@ public void testDatabaseSelectNullBug()
52
52
}
53
53
}
54
54
55
+ public void testError ()
56
+ {
57
+ Connection con = JDBC2Tests .openDB ();
58
+ try
59
+ {
60
+
61
+ // transaction mode
62
+ con .setAutoCommit (false );
63
+ Statement stmt = 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 ( Exception ex )
69
+ {
70
+ }
71
+ try
72
+ {
73
+ con .commit ();
74
+ con .close ();
75
+ }catch ( Exception ex ) {}
76
+ }
77
+
55
78
public void xtestLocking ()
56
79
{
57
80
You can’t perform that action at this time.
0 commit comments