Predicate causes CoreData to generate invalid SQL

Originator:fjolnir
Number:rdar://18116899 Date Originated:25-Aug-2014 04:08 PM
Status:Open Resolved:
Product:CoreData Product Version:
Classification:Bug Reproducible:Always
 
Summary:
Using a BETWEEN predicate containing an arithmetic expression causes CoreData to emit the following error: "CoreData: error: (1) I/O error for database at /path/to/database.sqlite.  SQLite error code:1, 'near ")": syntax error'"

Steps to Reproduce:
1. Create a fetch request and give it a predicate   of the following format: `integerAttribute BETWEEN {%lld,   %lld-1}", x, y`
2. attempt to execute the fetch request


Expected Results:
Objects matching the predicate should be returned

Actual Results:
Crashes with the following exception: "CoreData: error: (1) I/O error for database at /path/to/database.sqlite.  SQLite error code:1, 'near ")": syntax error'"

Version:
ios 7.1.1

Notes:


Configuration:
iPad Air

Attachments:

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!