Converting MyISAM to InnoDB http://jnrbsn.com/2011/08/using-sql-as-a-full-fledged-procedural-scripting-language