]> 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 16:42:02 +0000 (11:42 -0500)
commitba9b517e6f6a6602df43256a8dda616dd364784b
treec4516102216d42ca53395810a042ea7d967d2a38
parent2faae3d21c25c44da7171b071c32a9e88360cd85
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
(cherry picked from commit ee961ce5778348fba8287e3192fe8848badf8456)
doc/build/changelog/unreleased_13/5048.rst [new file with mode: 0644]
lib/sqlalchemy/engine/default.py
test/sql/test_query.py