Bug #19282 Empty string
Submitted: 22 Apr 2006 22:21 Modified: 26 Jul 2006 20:17
Reporter: M Wensink
Status: Closed
Category:Connector/J Severity:S1 (Critical)
Version:Latest snapshot OS:Microsoft Windows (w2k)
Assigned to: Target Version:

[22 Apr 2006 22:21] M Wensink
Description:
Query results in empty string in some cases.

How to repeat:
I can't isolate the problem from my application

Suggested fix:
Removing line 797

this.wasNullFlag = true;

from the file ResultSet.java solves my problem.

This line seems erroneous to me. Is that correct?
[22 Apr 2006 22:37] Mark Matthews
Please state _exactly_ what snapshot you're using (basically the filename). If you could
show some logic of your code, that would help as well, as we haven't experienced this
issue ourselves.
[23 Apr 2006 1:16] Marten Wensink
The snapshot is mysql-connector-java-3.1-nightly-20060422.zip

It's difficult to give some logic of the code because it's part of a large web
application. The SQL query concerning is constructed dynamically and looks like this:

SELECT * FROM user_tbl WHERE User_logName = 'name' AND User_instID = 0

User_logName has type varchar(16).

In the result set the password has a NULL-value.

I hope this will help you any further.

Regards

Marten
[24 Apr 2006 19:09] Marten Wensink
Dear Mark,

I indeed think that line 979 in file ResultSet.java is incorrect. I compared this file
with the corresponding file in version 5 of the implementation of JConnector. In version
5 line 979 (this.wasNullFlag = true;) is not present, but instead contains the line 807
this.wasNullFlag = false;

I hope this will help.

Regards Marten
[25 Apr 2006 1:41] Mark Matthews
Can you give some context, line 979 in ResultSet.java in my sources (nor in my download of
mysql-connector-java-3.1-nightly-20060422.zip) doesn't line up with an access to
wasNullFlag.

What method specifically do you see the point where this needs to be changed?
[25 Apr 2006 12:06] Marten Wensink
I'm sorry, I made a type error in my last comment.
I mean line 797 in ResultSet.java
[26 Apr 2006 3:00] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/5535
[26 Apr 2006 3:03] Mark Matthews
Fix will be in snapshots available in the April 27th build (just missed today's build).

Thanks for the bug report!