]> 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)
committerFederico Caselli <cfederico87@gmail.com>
Tue, 28 Jul 2026 19:02:33 +0000 (21:02 +0200)
commitffca533cdab0f09edde997757c9e24e643750dcf
treeaf62ce51328f29f0e602563b0c4670c79d260ad1
parent6d9344b0a95dae3613fc90ef40523c8e11046266
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
(cherry picked from commit 52d9ad783f8051efbcbfe8b878cf746f551dfb65)
test/dialect/mysql/test_compiler.py