Query object behavior change - extra (null) row returned by ResultSet object

Description

Java code which use ResultSet methods (rs.beforeFirst(), then loop while rs.next() returns true) to loop over a query object... now encounters an extra row at the end of the loop

This code works as expected with 5.2.8.50 (it goes through the loop once, putting out a single line with '1'), but with 5.2.9.31, this puts out two lines.

rs = QueryNew("name,number");
queryAddRow(rs);
querySetCell(rs,"name","first");
querySetCell(rs,"number",1);

WriteDump(rs);

rs.beforeFirst();
i = 0;
while (rs.next() AND (i LT 5))
{
i = 1 + i;
WriteOutput("#i#<br />");
}

Environment

Lucee 5.2.9.31, CentOS 7, Java 8 (update 202)

relates to

Activity

Tim Parker 
30 January 2019 at 17:38

also... maybe this is just a fluke off the bug tracking system... but... 'fixed' and 'rejected' are about a close to opposites as you can get - maybe 'closed' is a better way to flag these?? This issue is most certainly NOT 'fixed'

Tim Parker 
30 January 2019 at 17:36

rejected? seriously?? the example code works with every version of Adobe ColdFusion we've tested with, and with every Lucee release before 5.2.9

The example is arguably silly because it's using low-level Java methods at the CF level - but it's an easy way to illustrate the crash we encountered when trying to use this query object in Java code.

The behavior has changed, and this is blocking successful deployment of the latest Lucee release

Pothys - MitrahSoft 
30 January 2019 at 11:05

Won't Fix

Pothys - MitrahSoft 
30 January 2019 at 11:04

Hi ,

Please see the comment in LDEV-2016

Fixed

Details

Assignee

Reporter

Priority

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Affects versions

Created 18 January 2019 at 20:21
Updated 30 January 2019 at 17:38
Resolved 30 January 2019 at 11:05