]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Copy bind_processors when altering for expanding IN
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 20 Dec 2019 16:40:10 +0000 (11:40 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 20 Dec 2019 17:50:06 +0000 (12:50 -0500)
commitc6554ac52bfb7ce9ecd30ec777ce90adfe7861d2
tree420c1d9538da694e8a5513c555dca4b19998bd8c
parentc54b27ab123a4bf29ba7bc76924e188e2bc88e9f
Copy bind_processors when altering for expanding IN

Fixed issue where the collection of value processors on a
:class:`.Compiled` object would be mutated when "expanding IN" parameters
were used with a datatype that has bind value processors; in particular,
this would mean that when using statement caching and/or baked queries, the
same compiled._bind_processors collection would be mutated concurrently.
Since these processors are the same function for a given bind parameter
namespace every time, there was no actual negative effect of this issue,
however, the execution of a :class:`.Compiled` object should never be
causing any changes in its state, especially given that they are intended
to be thread-safe and reusable once fully constructed.

Fixes: #5048
Change-Id: I876d16bd7484eb05ce590397420552ac36da6e52
doc/build/changelog/unreleased_13/5048.rst [new file with mode: 0644]
lib/sqlalchemy/engine/default.py
test/sql/test_query.py