Issue Details (XML | Word | Printable)

Key: NUCCORE-772
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Unassigned
Reporter: Peter Dettman
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
DataNucleus Core

JDOQL implicit parameters handled incorrectly if one is repeated before all have appeared

Created: 26/Oct/11 10:02 AM   Updated: 04/Oct/12 05:02 PM   Resolved: 26/Oct/11 03:00 PM
Component/s: Persistence, Queries
Affects Version/s: 3.0.2
Fix Version/s: 3.0.3

File Attachments: 1. Text File NUCCORE-772-core.txt (2 kB)
2. Text File NUCCORE-772-test.access.txt (3 kB)


Severity: Production


 Description  « Hide
JDOQL queries may contain references to implicit parameters (of the form ":param"). There may be more than one reference to the same implicit parameter in a single query.

If one or more of the implicit parameters is mentioned twice before all the implicit parameters being used have been encountered, the JDO query compiler will bind the actual parameter values incorrectly (because it numbers the occurrences without checking for duplicates).

Test case and patch to follow.


Sort Order: Ascending order - Click to sort in descending order
Peter Dettman added a comment - 26/Oct/11 10:07 AM - edited
Attached files:
1. Test case using a repeated implicit parameter before all appear.
2. Proposed patch to JDOQL parser.

Andy Jefferson added a comment - 26/Oct/11 03:00 PM
SVN trunk has these now. Thx