]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
test(mysql): cover ordered from-select upserts
authornightcityblade <nightcityblade@gmail.com>
Tue, 28 Jul 2026 18:06:15 +0000 (14:06 -0400)
committersqla-tester <sqla-tester@sqlalchemy.org>
Tue, 28 Jul 2026 18:06:15 +0000 (14:06 -0400)
commit52d9ad783f8051efbcbfe8b878cf746f551dfb65
treebd766ce291a93e8f29b24faa6b07c7ae3788b7fc
parentd25b6ce2ed97d7cc29fed06e3ebe6c68945cb5a6
test(mysql): cover ordered from-select upserts

### Description

Extends the MySQL `INSERT ... FROM SELECT ... ON DUPLICATE KEY UPDATE`
compiler regression test with the ordered-select shape reported in #10675.
This verifies that enabling MySQL 8's row-alias behavior does not append an
invalid `AS new` after the `ORDER BY` clause and continues to use `VALUES()`
for the update expressions.

Fixes #10675

### Checklist

This pull request is:

- [ ] A documentation / typographical / small typing error fix
- Good to go, no issue or tests are needed
- [x] A short code fix
- please include the issue number, and create an issue if none exists, which
  must include a complete example of the issue.  one line code fixes without an
  issue and demonstration will not be accepted.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.   one line code fixes without tests will not be accepted.
- [ ] A new feature implementation
- please include the issue number, and create an issue if none exists, which must
  include a complete example of how the feature would look.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.

**Have a nice day!**

Closes: #13454
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/13454
Pull-request-sha: 33cb578407bb1de396d26e2c368d81b3fff8c303

Change-Id: I1c19a34e1fa551e7b4fce9647fdff98ef9a9075a
test/dialect/mysql/test_compiler.py