-
Bug
-
Resolution: Future Project
-
P5
-
7
-
generic
-
generic
SYNOPSIS
--------
ResultSet.wasNull() does not return true after reading null value
FULL JDK VERSION
----------------
Java 6 (tested with 6u26)
Also reproducible on 5.0 and JDK 7 (b147)
OPERATING SYSTEM
----------------
Reported on Windows XP
(Linux/Solaris not tested)
PROBLEM DESCRIPTION from LICENSEE
---------------------------------
While reading a NULL value from the database using the JDBC-ODBC bridge, ResultSet.getString(), calling ResultSet.wasNull() returns false. It should return true.
CR 4424215 seems to describe a similar issue, but it was reported against 1.3.0 and fixed in 1.3.1. However, we are currently seeing the same issue in Java 6 (we also see the problem with 5.0)
REPRODUCTION INSTRUCTIONS
-------------------------
This testcase requires a functioning ODBC configuration.
1. Edit the testcase (specifically, line 15) to ensure that it
correlates with you local ODBC configuration.
2. Compile and run the testcase.
Observed output (using JDBC-ODBC bridge):
URL = "jdbc:odbc:TOOLSDB;UID=xxxxxxxx;PWD=xxxxxxxx"
CLOB wasNull: true
BLOB wasNull: false length of data: -1 <-- problem
CLOB wasNull: false length of data: -1 <-- problem
BLOB wasNull: false length of data: 255
Expected output (using DB2 JDBC driver):
URL = "jdbc:odbc:ora92_gimli;UID=************;PWD=******"
CLOB wasNull: true
BLOB wasNull: true
CLOB wasNull: false length of data: 255
BLOB wasNull: false length of data: 255
TESTCASE
--------
Testcase attached. Issue is highlighted at line 206-212.
WORKAROUND
----------
Use another JDBC driver, such as DB2.
--------
ResultSet.wasNull() does not return true after reading null value
FULL JDK VERSION
----------------
Java 6 (tested with 6u26)
Also reproducible on 5.0 and JDK 7 (b147)
OPERATING SYSTEM
----------------
Reported on Windows XP
(Linux/Solaris not tested)
PROBLEM DESCRIPTION from LICENSEE
---------------------------------
While reading a NULL value from the database using the JDBC-ODBC bridge, ResultSet.getString(), calling ResultSet.wasNull() returns false. It should return true.
CR 4424215 seems to describe a similar issue, but it was reported against 1.3.0 and fixed in 1.3.1. However, we are currently seeing the same issue in Java 6 (we also see the problem with 5.0)
REPRODUCTION INSTRUCTIONS
-------------------------
This testcase requires a functioning ODBC configuration.
1. Edit the testcase (specifically, line 15) to ensure that it
correlates with you local ODBC configuration.
2. Compile and run the testcase.
Observed output (using JDBC-ODBC bridge):
URL = "jdbc:odbc:TOOLSDB;UID=xxxxxxxx;PWD=xxxxxxxx"
CLOB wasNull: true
BLOB wasNull: false length of data: -1 <-- problem
CLOB wasNull: false length of data: -1 <-- problem
BLOB wasNull: false length of data: 255
Expected output (using DB2 JDBC driver):
URL = "jdbc:odbc:ora92_gimli;UID=************;PWD=******"
CLOB wasNull: true
BLOB wasNull: true
CLOB wasNull: false length of data: 255
BLOB wasNull: false length of data: 255
TESTCASE
--------
Testcase attached. Issue is highlighted at line 206-212.
WORKAROUND
----------
Use another JDBC driver, such as DB2.