]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
omit mysql8 dupe key alias for INSERT..FROM SELECT
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 13 Aug 2024 13:13:51 +0000 (09:13 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 13 Aug 2024 13:13:51 +0000 (09:13 -0400)
commit63b45202848de0cb3cfd41de130000355cbb88ef
tree742ff113b5ceb01ed7fdc48a4a7f05c45e5baaa4
parentfdac33149b85480b7ec34e86f031afb8a0a9e54f
omit mysql8 dupe key alias for INSERT..FROM SELECT

Fixed issue in MySQL dialect where using INSERT..FROM SELECT in combination
with ON DUPLICATE KEY UPDATE would erroneously render on MySQL 8 and above
the "AS new" clause, leading to syntax failures.  This clause is required
on MySQL 8 to follow the VALUES clause if use of the "new" alias is
present, however is not permitted to follow a FROM SELECT clause.

Fixes: #11731
Change-Id: I254a3db4e9dccd9a76b11fdfe6e38a064ba0b5cf
doc/build/changelog/unreleased_20/11731.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/mysql/base.py
test/dialect/mysql/test_compiler.py
test/dialect/mysql/test_on_duplicate.py