Skip to content


DDC-887: Schema tool can throw errno 121 when creating or dropping indexes #5411

doctrinebot opened this Issue · 3 comments

2 participants


Jira issue originally created by user ccapndave:

When changing the model in such a way that the schema tool tries to create or drop an index which is also a foreign key an error is sometimes thrown like:

SQLSTATE[HY000]: General error: 1025 Error on rename of '.\mydb#sql-10d8_19' to '.\mydb\auth' (errno: 121)

This seems to be caused by MySQL trying to re-use indexes and I think it depends on exactly what has happened before in this table so I can't give an exact case to reproduce. However, it seems to be InnoDB specific and I'm pretty sure its this bug:


Comment created by ccapndave:

Another report of the issue at


Comment created by @beberlei:



Issue was closed with resolution "Fixed"

@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.1 milestone
@doctrinebot doctrinebot closed this
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.