]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Ensure no compiler visit method tries to access .statement
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 19 Oct 2020 14:19:29 +0000 (10:19 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 19 Oct 2020 17:13:15 +0000 (13:13 -0400)
commit3e49b8d0519aa024842206a2fb664a4ad83796d6
tree9eb3cf01a68c42bb77a0bf76e99865d7c6370262
parent296c84313ab29bf9599634f38caaf7dd092e4e23
Ensure no compiler visit method tries to access .statement

Fixed structural compiler issue where some constructs such as MySQL /
PostgreSQL "on conflict / on duplicate key" would rely upon the state of
the :class:`_sql.Compiler` object being fixed against their statement as
the top level statement, which would fail in cases where those statements
are branched from a different context, such as a DDL construct linked to a
SQL statement.

Fixes: #5656
Change-Id: I568bf40adc7edcf72ea6c7fd6eb9d07790de189e
doc/build/changelog/unreleased_13/5656.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/mysql/base.py
lib/sqlalchemy/dialects/postgresql/base.py
lib/sqlalchemy/orm/persistence.py
lib/sqlalchemy/sql/compiler.py
lib/sqlalchemy/testing/assertions.py
test/sql/test_compiler.py