5 messages in com.mysql.lists.javaProblems with ResultSet.getInt()
FromSent OnAttachments
Luca Lafranchi13 May 2003 02:01 
Mark Matthews13 May 2003 05:39 
Luca Lafranchi13 May 2003 07:01 
Mark Matthews14 May 2003 11:21 
Luca Lafranchi14 May 2003 23:57 
Subject:Problems with ResultSet.getInt()
From:Luca Lafranchi (luca@rohag.ch)
Date:05/13/2003 02:01:22 AM
List:com.mysql.lists.java

Hi :)

I ran into a weird problem: I do a "select * from mytable where id_ref=11", get a ResultSet with a single row (which is correct) but then when getting the values I receive following message: java.sql.SQLException: Invalid value for getInt() - ' ' at com.mysql.jdbc.ResultSet.getInt(ResultSet.java:1255)

The problem has to do with the size of the ResultSet: the table is the same as some threads above ("table marked as crashed"), but now the status is ok (after upgrading MySQL to 4.0.12). The row where "id_ref=11" contains many pictures (blobs). If I do the same query on another "id_ref" containing fewer pictures everything goes well. If I select every column separately, everything is ok. I firstly thought it was a problem with max_allowed_packet_size, but after setting it to 200Mb (in a single row there are NOT that many Mb of pictures...) the problem was still there.

I don't know if it is a specific problem with getInt(), because it is called 7 times (there are 7 integer columns...) and only two (the last two...) of the calls throw an Exception. Al getBytes() calls (33) seem to work properly (I System.out.printlned the length of the array...).

Someone has a clue?

Ciao Luca