Recently we released an updated version of our Percona Toolkit with an important update for pt-online-schema-change if you use MySQL 5.6. A new parameter has been added, analyze-before-swap. What does it do? Let me explain it in more detail.
A bug not a bug
A customer contacted us because pt-online-schema-change caused hundred of queries to get stuck after the ALTER was done. All those queries were trying read from the altered table but for some reason the queries never finished. Of course, it caused downtime. The reason behind this is this “bug not a bug”:
http://bugs.mysql.com/bug.php?id=78289
As a summary, if you are running 5.6 with persistent stats enabled (which it is by default), the optimizer in some …
[Read more]