summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/functions.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2019-02-19 19:46:17 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2019-02-19 19:46:17 -0500
commitd71f34cb2a28e8dfc410bc5bec68372be6d7c333 (patch)
tree975747f157b1df1f36c7ee7ec4bf019afb55dff8 /lib/sqlalchemy/sql/functions.py
parentc0bd36873b3879747f2d094696fb0bc19c0539ff (diff)
downloadsqlalchemy-d71f34cb2a28e8dfc410bc5bec68372be6d7c333.tar.gz
Ensure _simple_lazy_clause bind names are fixed before cloning
Fixed a regression in 1.2 due to the introduction of baked queries for relationship lazy loaders, where a race condition is created during the generation of the "lazy clause" which occurs within a memoized attribute. If two threads initialize the memoized attribute concurrently, the baked query could be generated with bind parameter keys that are then replaced with new keys by the next run, leading to a lazy load query that specifies the related criteria as ``None``. The fix establishes that the parameter names are fixed before the new clause and parameter objects are generated, so that the names are the same every time. Fixes: #4507 Change-Id: I605b824e028c87bc20ca8c2577227cdf6a591064
Diffstat (limited to 'lib/sqlalchemy/sql/functions.py')
0 files changed, 0 insertions, 0 deletions