fastmonkeys / stellar

Fast database snapshot and restore tool for development
MIT License
3.86k stars 119 forks source link

MySQL copy database operation does not re-enable keys #7

Closed rnorth closed 9 years ago

rnorth commented 10 years ago

Caveats: I've not tested this; this is just an observation from looking at the code. It looks like the MySQL support is fairly recent, and I think this project is a really cool and useful tool. Thanks for releasing this.

It looks like the code that copies a MySQL DB disables keys on tables, but forgets to re-enable them: https://github.com/fastmonkeys/stellar/blob/master/stellar/operations.py#L51-71

I'd imagine that a subsequent loop needs to iterate over the tables and re-enable the keys.

Teemu commented 10 years ago

Ah, nice catch. I don't use MySQL myself so I'm not really familiar with that. I'll see what I can do.

Teemu commented 9 years ago

Fixed