
| Key: |
DERBY-149
|
| Type: |
Bug
|
| Status: |
Closed
|
| Resolution: |
Fixed
|
| Priority: |
Major
|
| Assignee: |
Kathey Marsden
|
| Reporter: |
A B
|
| Votes: |
0
|
| Watchers: |
0
|
|
If you were logged in you would be able to see more operations.
|
|
|
|
Environment:
|
Derby running with Network Server via JDBC universal driver.
|
|
| Resolution Date: |
11/Oct/05 12:56 PM
|
When running against Derby Network Server with the JCC driver, attempts to bind an invalid date/time string to a date/time/timestamp parameter lead to a hang in either the JCC client or in the Network Server (not sure which).
The problem does NOT occur if the same thing is run against a DB2 server, which suggests the bug is in Network Server, not in the JCC driver. That said, though, the problem also does NOT happen if one uses an ODBC client to connect to Network Server, instead of a JDBC client--so perhaps it's a problem with JCC, after all...hard to say one way or the other...
Here's a simple program to reproduce the problem:
import java.sql.*;
public class go {
public static void main (String[] args) throws Exception {
Class.forName("com.ibm.db2.jcc.DB2Driver");
Connection c = DriverManager.getConnection(
"jdbc:derby: net://localhost:1527/ugh;create=true", "bah", "humbug");
Statement s = c.createStatement();
try {
s.execute("drop table dt");
} catch (SQLException se) {}
s.execute("create table dt (d date)");
PreparedStatement pSt = c.prepareStatement("insert into dt values (?)");
try {
pSt.setString(1, "oops"); // invalid date value.
pSt.execute();
} catch (SQLException se) {
System.out.println("Got " + se.getSQLState() + ": " + se.getMessage());
}
}
}
Of course, in order for the program to run, one must start the Network Server on port 1527 first.
|
|
Description
|
When running against Derby Network Server with the JCC driver, attempts to bind an invalid date/time string to a date/time/timestamp parameter lead to a hang in either the JCC client or in the Network Server (not sure which).
The problem does NOT occur if the same thing is run against a DB2 server, which suggests the bug is in Network Server, not in the JCC driver. That said, though, the problem also does NOT happen if one uses an ODBC client to connect to Network Server, instead of a JDBC client--so perhaps it's a problem with JCC, after all...hard to say one way or the other...
Here's a simple program to reproduce the problem:
import java.sql.*;
public class go {
public static void main (String[] args) throws Exception {
Class.forName("com.ibm.db2.jcc.DB2Driver");
Connection c = DriverManager.getConnection(
"jdbc:derby: net://localhost:1527/ugh;create=true", "bah", "humbug");
Statement s = c.createStatement();
try {
s.execute("drop table dt");
} catch (SQLException se) {}
s.execute("create table dt (d date)");
PreparedStatement pSt = c.prepareStatement("insert into dt values (?)");
try {
pSt.setString(1, "oops"); // invalid date value.
pSt.execute();
} catch (SQLException se) {
System.out.println("Got " + se.getSQLState() + ": " + se.getMessage());
}
}
}
Of course, in order for the program to run, one must start the Network Server on port 1527 first. |
Show » |
made changes - 19/Feb/05 07:03 AM
| Field |
Original Value |
New Value |
|
Description
|
When running against Derby Network Server with the JCC driver, attempts to bind an invalid date/time string to a date/time/timestamp parameter lead to a hang in the client program.
The problem does NOT occur if the same thing is run against a DB2 server, which suggests the bug is in Network Server, not in the JCC driver. That said, though, the problem also does NOT happen if one uses an ODBC client to connect to Network Server, instead of a JDBC client--so perhaps it's a problem with JCC, after all...hard to say one way or the other...
Here's a simple program to reproduce the problem:
import java.sql.*;
public class go {
public static void main (String[] args) throws Exception {
Class.forName("com.ibm.db2.jcc.DB2Driver");
Connection c = DriverManager.getConnection(
"jdbc:derby:net://localhost:1527/ugh;create=true", "bah", "humbug");
Statement s = c.createStatement();
try {
s.execute("drop table dt");
} catch (SQLException se) {}
s.execute("create table dt (d date)");
PreparedStatement pSt = c.prepareStatement("insert into dt values (?)");
try {
pSt.setString(1, "oops"); // invalid date value.
pSt.execute();
} catch (SQLException se) {
System.out.println("Got " + se.getSQLState() + ": " + se.getMessage());
}
}
}
Of course, in order for the program to run, one must start the Network Server on port 1527 first.
|
When running against Derby Network Server with the JCC driver, attempts to bind an invalid date/time string to a date/time/timestamp parameter lead to a hang in either the JCC client or in the Network Server (not sure which).
The problem does NOT occur if the same thing is run against a DB2 server, which suggests the bug is in Network Server, not in the JCC driver. That said, though, the problem also does NOT happen if one uses an ODBC client to connect to Network Server, instead of a JDBC client--so perhaps it's a problem with JCC, after all...hard to say one way or the other...
Here's a simple program to reproduce the problem:
import java.sql.*;
public class go {
public static void main (String[] args) throws Exception {
Class.forName("com.ibm.db2.jcc.DB2Driver");
Connection c = DriverManager.getConnection(
"jdbc:derby:net://localhost:1527/ugh;create=true", "bah", "humbug");
Statement s = c.createStatement();
try {
s.execute("drop table dt");
} catch (SQLException se) {}
s.execute("create table dt (d date)");
PreparedStatement pSt = c.prepareStatement("insert into dt values (?)");
try {
pSt.setString(1, "oops"); // invalid date value.
pSt.execute();
} catch (SQLException se) {
System.out.println("Got " + se.getSQLState() + ": " + se.getMessage());
}
}
}
Of course, in order for the program to run, one must start the Network Server on port 1527 first.
|
made changes - 19/Sep/05 11:03 AM
|
Assignee
|
|
Kathey Marsden
[ kmarsden
]
|
made changes - 21/Sep/05 06:41 AM
|
Status
|
Open
[ 1
]
|
In Progress
[ 3
]
|
made changes - 11/Oct/05 12:56 PM
|
Fix Version/s
|
|
10.2.0.0
[ 11187
]
|
|
Fix Version/s
|
|
10.1.2.0
[ 12310270
]
|
|
Resolution
|
|
Fixed
[ 1
]
|
|
Fix Version/s
|
|
10.1.1.2
[ 12310353
]
|
|
Status
|
In Progress
[ 3
]
|
Resolved
[ 5
]
|
made changes - 04/Jan/06 08:05 AM
|
Status
|
Resolved
[ 5
]
|
Closed
[ 6
]
|
|