'Regression test for #8819: Fields in the extra(select=...) list
should be available to extra(order_by=...).'

def test_regression_8819(self):

    self.assertQuerysetEqual(User.objects.filter(pk=self.u.id).extra(select={'extra_field': 1}).distinct(), ['<User:    fred>'])
    self.assertQuerysetEqual(User.objects.filter(pk=self.u.id).extra(select={'extra_field': 1}, order_by=['extra_field']), ['<User:    fred>'])
    self.assertQuerysetEqual(User.objects.filter(pk=self.u.id).extra(select={'extra_field': 1}, order_by=['extra_field']).distinct(), ['<User:    fred>'])
