FYI, SQLite-based geo-queries are broken in Yosemite DP7
FYI, SQLite-based geo-queries are broken in Yosemite DP7
- Subject: FYI, SQLite-based geo-queries are broken in Yosemite DP7
- From: Jens Alfke <email@hidden>
- Date: Wed, 10 Sep 2014 16:28:21 -0700
(I know this technically isn't about Cocoa APIs, but cocoa-dev still seems like the most appropriate list. I suspect a lot of app developers don't read darwin-userlevel.)
Those of you with Mac apps that do geo-querying using SQLite may be interested to know that your queries probably broke in Yosemite DP7. In that build, Apple upgraded SQLite to version 3.8.5, which has a regression[1] in the r-tree implementation that causes queries using joins to fail to return data. I have a brief test[2] that shows the problem.
Essentially, if you have a table created with "CREATE VIRTUAL TABLE … USING rtree" and then query that table's x/y coords and use its primary key to join to another table (which is the most common way to do geo-querying) you'll probably get an empty result set instead of the data you wanted.
I've filed a bug report with Apple, rdar://18247755 <rdar://18247755>, asking them to update to SQLite 3.8.6 which fixes the regression. But it's iffy whether they'll update SQLite so late in the release cycle. If geo-queries are important to your apps, you might want to vote by filing your own dups and referencing my Radar.
(As of DP6, iOS 8 didn't have the buggy SQLite. I haven't yet had a chance to test with the GM candidate that was released this week, but it's obviously too late for Apple to fix it there.)
—Jens
[1]: http://www.sqlite.org/src/tktview?name=d2889096e7 <http://www.sqlite.org/src/tktview?name=d2889096e7>
[2]: https://gist.github.com/snej/f76733c4a65902ab7b32
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden