DataNucleus JIRA is now in read-only mode. Raise any new issues in GitHub against the plugin that it applies to. DataNucleus JIRA will remain for the foreseeable future but will eventually be discontinued
Issue Details (XML | Word | Printable)

Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Unassigned
Reporter: Peter Dettman
Votes: 0
Watchers: 0

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

Query using String.equalsIgnoreCase with parameter as arg hardcodes value from first call

Created: 03/Nov/11 07:18 AM   Updated: 07/Nov/11 02:57 PM   Resolved: 03/Nov/11 01:13 PM
Component/s: Queries
Affects Version/s: 3.0.2
Fix Version/s: 3.0.3

File Attachments: 1. Text File NUCRDBMS-564-store.rdbms.txt (3 kB)
2. Text File NUCRDBMS-564-test.access.txt (17 kB)

Severity: Production

 Description  « Hide
A query with a filter string like "field.equalsIgnoreCase(:param)" will work correctly the first time it is executed, but subsequent executions incorrectly use the original parameter value, and ignore any new value provided.

Peter Dettman added a comment - 03/Nov/11 07:22 AM
Patch for store.rdbms fixes problem in toUpperCase implementation, along with some added error-checking. Also contains equivalent changes to toLowerCase method for consistency.

Patch for test.access adds test case showing problem with equalsIgnoreCase, and also coverage for toLowerCase/toUpperCase which the proposed patch modifies.

Peter Dettman made changes - 03/Nov/11 07:22 AM
Field Original Value New Value
Attachment NUCRDBMS-564-test.access.txt [ 11520 ]
Attachment NUCRDBMS-564-store.rdbms.txt [ 11521 ]
Andy Jefferson added a comment - 03/Nov/11 01:13 PM
SVN trunk has the patch to store.rdbms. Thx. The tests, of course, are generic, so are for JDOQLBasicTest in test.jdo.datastore/test.jdo.application - added a variant

Andy Jefferson made changes - 03/Nov/11 01:13 PM
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 3.0.3 [ 11357 ]
Resolution Fixed [ 1 ]
Andy Jefferson made changes - 07/Nov/11 02:57 PM
Status Resolved [ 5 ] Closed [ 6 ]