Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #28436 -- Added support for distance lookups on MySQL. #8812

Merged
merged 1 commit into from Jul 26, 2017

Conversation

sir-sigurd
Copy link
Member

@@ -207,12 +211,18 @@ def test_distance_lookups_with_expression_rhs(self):
self.assertEqual(self.get_names(qs), ['Canberra', 'Hobart', 'Melbourne'])

# With a complex geometry expression
self.assertFalse(SouthTexasCity.objects.filter(point__distance_gt=(Intersection('point', 'point'), 0)))
self.assertFalse(SouthTexasCity.objects.filter(point__distance_gt=(Union('point', 'point'), 0)))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is needed because NULL is returned for self-intersection on MySQL < 5.7.

@timgraham timgraham merged commit f3bada9 into django:master Jul 26, 2017
@sir-sigurd sir-sigurd deleted the mysql-distance-lookups branch July 26, 2017 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants