Here's a weird one. I need to set up a dev server, so I'm importing a DB from and existing production EE install. The import proceeds fine until it gets to the exp_stash table. Then I get MySQL error 150. I've tried this on two different servers, but I get the same error.
CREATE TABLE `exp_stash` (
`id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT ,
`site_id` INT( 4 ) UNSIGNED NOT NULL DEFAULT '1',
`session_id` VARCHAR( 40 ) DEFAULT NULL ,
`bundle_id` INT( 11 ) UNSIGNED NOT NULL DEFAULT '1',
`key_name` VARCHAR( 64 ) NOT NULL ,
`key_label` VARCHAR( 64 ) DEFAULT NULL ,
`created` INT( 10 ) UNSIGNED NOT NULL ,
`expire` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0',
`parameters` TEXT,
PRIMARY KEY ( `id` ) ,
KEY `bundle_id` ( `bundle_id` ) ,
KEY `key_session` ( `key_name` , `session_id` ) ,
KEY `key_name` ( `key_name` ) ,
KEY `site_id` ( `site_id` ) ,
CONSTRAINT `exp_stash_fk` FOREIGN KEY ( `bundle_id` ) REFERENCES
`exp_stash_bundles` ( `id` ) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = INNODB DEFAULT CHARSET = utf8 ROW_FORMAT = COMPACT;
The error is
#1005 - Can't create table 'versastu_oakcrk.exp_stash' (errno: 150)
Research shows it has something to do with InnoDB table type/db type, but solution is unknown.