InnoDB tables silently created as MyISAM
I maintain a schema creation script which specifies the InnoDB engine
type for most tables, so I can have referential integrity and so
forth.
I gave my script to another developer who ran it against a MySQL
implementation in which the InnoDB engine was not available.
(Actually, it was supposed to be available, but the server didn't load
it because it was asking for too much memory).
When the other developer ran my script, it generated no errors.
Instead, it simply decided to create my InnoDB tables as MyISAM
tables! We didn't find the problem until weeks later.
MySQL made two grave mistakes here. One, it started without InnoDB
support even though its configuration file specified InnoDB support.
It should have failed to start, and let us read the log files to
figure out why. Barring that, it should have, at least, failed to
create a table that explicitly specified InnoDB as the engine type. It
should not have decided on its own to make the table a different type!
I asked for InnoDB for a reason.
Is there any way I can configure it so that this doesn't happen again?
Frank
|