Index: tests/modeltests/select_related/models.py
===================================================================
--- tests/modeltests/select_related/models.py	(revision 5122)
+++ tests/modeltests/select_related/models.py	(working copy)
@@ -147,6 +147,13 @@
 >>> len(db.connection.queries)
 5
 
+# Test the bug with select_related and extra combination
+>>> s = Species.objects.all().select_related(depth=1).extra(select={'a': 'select_related_species.id + 10'})[0]
+
+# With the correct code the result should be True
+>>> s.id + 10 == s.a
+True
+
 # Reset DEBUG to where we found it.
 >>> settings.DEBUG = False
 """}
