-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
The AUTO_INCREMENT has been changed #381
Comments
JiaqingXu, can you share the gh-ost statement and flags you used? I would like to try to reproduce the issue related to another test I'm running. |
@jiaqingxu thank you, and it took me three reads to realize this Issue also offers a patch. Are you able to submit it as a pull request please? |
I believe there's a race condition that cannot be solved unless locking down the original table. In the patch offered above, the app issues a However, a row can be deleted in between these two statements. Actually, it can be also deleted after the creation of the ghost table and the problem will remain the same. Migration only begins well after the ghost table was created and inspected. Rows deleted until such time will have the same affect on having a wrong As I see it, to solve the problem we'd need to I'm not sure I'm happy with this path. |
I don't think this is a big problem, even a record with the id=3 inserted, eventually. @jiaqingxu |
+1 for this issue Under some conditions, the auto_increment id is important.
We found the same issue a day ago:
So we must do other things to avoid this. 😂😂😂😂😂😂 |
We are also facing the same problem, does the author plan to fix it? |
While I do not maintain this repository anymore, I'm interested in looking into this. |
Please see openark#12 for suggested solution. |
This should be fixed by the merging of #967 which is a copy of openark#12 Please test with the latest |
When we delete some data, and the max value of AUTO_INCREMENT columns is not match the AUTO_INCREMENT of the table. Then we use ghost to do some alter .The AUTO_INCREMENT of the table have be changed.
we insert 3 rows:
delete 1 row
Then we used gh-ost to do "Alter table ghost_test engine=innodb"
There is his code
The text was updated successfully, but these errors were encountered: