]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
adjust bound parameters within cache key only, dont deep copy
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 2 Mar 2024 05:28:26 +0000 (00:28 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 3 Mar 2024 23:23:32 +0000 (18:23 -0500)
commit1d1bf73c9909e32d5f54d35ee8295e898e985ffd
tree8691680281a657097207bf145a76999ce553f220
parent388afa73d94b63fa2b0a933171f060a94347d5cb
adjust bound parameters within cache key only, dont deep copy

Adjusted the fix made in :ticket:`10570`, released in 2.0.23, where new
logic was added to reconcile possibly changing bound parameter values
across cache key generations used within the :func:`_orm.with_expression`
construct.  The new logic changes the approach by which the new bound
parameter values are associated with the statement, avoiding the need to
deep-copy the statement which can result in a significant performance
penalty for very deep / complex SQL constructs.  The new approach no longer
requires this deep-copy step.

Fixes: #11085
Change-Id: Ia51eb4e949c8f37af135399925a9916b9ed4ad2f
(cherry picked from commit 06be748b474246c1061c309f16f5648ae9bb3954)
doc/build/changelog/unreleased_20/11085.rst [new file with mode: 0644]
lib/sqlalchemy/orm/strategy_options.py
lib/sqlalchemy/sql/cache_key.py
lib/sqlalchemy/sql/compiler.py
lib/sqlalchemy/sql/elements.py
test/aaa_profiling/test_orm.py
test/profiles.txt
test/sql/test_compare.py