Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Models::getNextId is unreliable #39

Open
jameswilddev opened this issue May 2, 2023 · 1 comment
Open

Models::getNextId is unreliable #39

jameswilddev opened this issue May 2, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@jameswilddev
Copy link
Collaborator

The value returned by show table status is often cached (see https://stackoverflow.com/questions/52705477/mysql-show-table-status-auto-increment-is-not-correct), so it is possible to get an out-of-date value from this function.

@jameswilddev jameswilddev added the bug Something isn't working label May 2, 2023
@jameswilddev
Copy link
Collaborator Author

(conceptually I feel the function is a bit flawed, as this is generally used to fill secondary columns with values generated from the ID, e.g. reference numbers, but there's nothing to guarantee another transaction didn't take the proposed ID AFAICT)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant