[Sqlalchemy-tickets] Issue #3165: shouldnt the keys be sorted for the key in cached connections (zz
Brought to you by:
zzzeek
|
From: Mike B. <iss...@bi...> - 2014-08-14 23:17:49
|
New issue 3165: shouldnt the keys be sorted for the key in cached connections https://bitbucket.org/zzzeek/sqlalchemy/issue/3165/shouldnt-the-keys-be-sorted-for-the-key-in Mike Bayer: ``` #!diff --- a/lib/sqlalchemy/engine/base.py +++ b/lib/sqlalchemy/engine/base.py @@ -805,7 +805,7 @@ class Connection(Connectable): dialect = self.dialect if 'compiled_cache' in self._execution_options: - key = dialect, elem, tuple(keys), len(distilled_params) > 1 + key = dialect, elem, sorted(tuple(keys)), len(distilled_params) > 1 if key in self._execution_options['compiled_cache']: compiled_sql = self._execution_options['compiled_cache'][key] else: ``` just a thought. |