]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
accommodate for mutiple copies of bind in ckbm
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 28 Apr 2021 16:14:33 +0000 (12:14 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 28 Apr 2021 18:17:54 +0000 (14:17 -0400)
commit3dcdc304a6e40052bc751488187c7e3b515d5be8
treeb686f478b484615a0449838ce717800f526d50ed
parent2af1b107fce34b15898e6f534097ad34cfd7d503
accommodate for mutiple copies of bind in ckbm

Fixed critical regression where bound parameter tracking as used in the SQL
caching system could fail to track all parameters for the case where the
same SQL expression containing a parameter were used in an ORM-related
query using a feature such as class inheritance, which was then embedded in
an enclosing expression which would make use of that same expression
multiple times, such as a UNION. The ORM would individually copy the
individual SELECT statements as part of compilation with class inheritance,
which then embedded in the enclosing statement would fail to accommodate
for all parameters. The logic that tracks this condition has been adjusted
to work for multiple copies of a parameter.

Fixes: #6391
Change-Id: I6db5dee0d361a3bb58d753a2d27ef2eee2b369c5
doc/build/changelog/unreleased_14/6391.rst [new file with mode: 0644]
lib/sqlalchemy/sql/compiler.py
test/sql/test_compiler.py