summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/loading.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2018-04-30 11:31:48 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2018-05-01 20:52:44 -0400
commit453cdfd75688e869637f0bbd171594e1fe7b6a39 (patch)
tree753529237e0aa2792252bf78554c81cbc0b04b05 /lib/sqlalchemy/orm/loading.py
parent29c5f7a5d5dae47bef823804096cb4a7122ff8fa (diff)
downloadsqlalchemy-453cdfd75688e869637f0bbd171594e1fe7b6a39.tar.gz
Render FOR UPDATE on the inner subquery as well as the outer
The ORM now doubles the "FOR UPDATE" clause within the subquery that renders in conjunction with joined eager loading in some cases, as it has been observed that MySQL does not lock the rows from a subquery. This means the query renders with two FOR UPDATE clauses; note that on some backends such as Oracle, FOR UPDATE clauses on subqueries are silently ignored since they are unnecessary. Additionally, in the case of the "OF" clause used primarily with Postgresql, the FOR UPDATE is rendered only on the inner subquery when this is used so that the selectable can be targeted to the table within the SELECT statement. Change-Id: Ie5520d08d82bf0afd9e1bd2d43a0b2a0db0de16d Fixes: #4246
Diffstat (limited to 'lib/sqlalchemy/orm/loading.py')
0 files changed, 0 insertions, 0 deletions