Used SortedDict instead of dict to avoid random errors that may occur when dict randomization is enabled in Python. Refs #17758. Thanks Łukasz Rekucki.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17777 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
e78d6b406b
commit
ce7113ccbe
|
@ -100,7 +100,7 @@ class Query(object):
|
||||||
|
|
||||||
def __init__(self, model, where=WhereNode):
|
def __init__(self, model, where=WhereNode):
|
||||||
self.model = model
|
self.model = model
|
||||||
self.alias_refcount = {}
|
self.alias_refcount = SortedDict()
|
||||||
self.alias_map = {} # Maps alias to join information
|
self.alias_map = {} # Maps alias to join information
|
||||||
self.table_map = {} # Maps table names to list of aliases.
|
self.table_map = {} # Maps table names to list of aliases.
|
||||||
self.join_map = {}
|
self.join_map = {}
|
||||||
|
@ -819,7 +819,7 @@ class Query(object):
|
||||||
assert current < ord('Z')
|
assert current < ord('Z')
|
||||||
prefix = chr(current + 1)
|
prefix = chr(current + 1)
|
||||||
self.alias_prefix = prefix
|
self.alias_prefix = prefix
|
||||||
change_map = {}
|
change_map = SortedDict()
|
||||||
for pos, alias in enumerate(self.tables):
|
for pos, alias in enumerate(self.tables):
|
||||||
if alias in exceptions:
|
if alias in exceptions:
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in New Issue