On Thu, Jul 2, 2009 at 7:04 PM, Yuan Wang<wangyuanzju@stripped> wrote:
> In MySQL 5.1, online DDL operations such as adding/dropping index is
> allowed. If the server crashes during online DDL operations, it seems
> that the table definition of MySQL and that in the underlining storage
> engine will be inconsistent. For example, if the server crashes in
> handler::add_index when all the storage engine stuff has been done but
> before returing to MySQL. So after restart, the storage engine will
> think that the new index is ready, however, the MySQL server will
> think that the new index is not ready.
> So this seems to be a serious problem?
Crash recovery for DDL is a known bug. It doesn't require online DDL
to reproduce. Any DDL operation that requires the creation or removal
of of an FRM file has always done that non-atomically with changes to
the storage engine. A crash between the two steps (create/remove FRM
file, perform change on storage engine) can leave the system in a bad
state at startup (existence of FRM file does not match existence of
table in the storage engine).
I think that Drizzle has a (Drizzle only) fix for this in progress.