Skip to content

Conversation

@melton-jason
Copy link
Contributor

@melton-jason melton-jason commented Jan 26, 2026

This branch should functionally be the equivalent of #7455, based on v7.11.3 instead of main.

The Pull Request seeks to address an issue related to the prior autonumbering code, where database transactions could become broken due to a LOCK TABLES statement within transactions:

Because LOCK TABLES implicitly commits any current transactions (see aforementioned MariaDB docs), wouldn't autonumbering implicitly commit the Django transaction?
If this is true, then the transaction state that Django works with in outer transaction.atomic() blocks would be broken/inconsistent: the transaction would already be committed as soon as the tables are locked for autonumbering.

See #6490 (comment)

Replaces #5404
Fixes #4148, #7560
Addresses part of #5337

Checklist

  • Self-review the PR after opening it to make sure the changes look good and
    self-explanatory (or properly documented)
  • Add relevant issue to release milestone
  • Add pr to documentation list
  • Add automated tests
  • Add a reverse migration if a migration is present in the PR

Testing instructions

See #6490, #5337
Replaces #5404
Fixes #4148, #7560

This branch is largely the application of #7455 on `v7.11.3`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 📋Back Log

Development

Successfully merging this pull request may close these issues.

2 participants