MySQL Forums
Forum List  »  InnoDB

Re: ERROR 1005: Can't create table (errno: 150)
Posted by: Stefan Wallin
Date: November 12, 2008 01:20PM

Could someone please help me have a glance at these two create table-statements that fail with this error:

#1005 - Can't create table './test/crm9_person.frm' (errno: 150)

DROP TABLE IF EXISTS `crm9_address`;
CREATE TABLE `crm9_address` (
`id` int(255) NOT NULL auto_increment,
`address1` varchar(255) NOT NULL default '',
`address2` varchar(255) NOT NULL default '',
`zipcode` varchar(7) NOT NULL default '',
`city` varchar(40) NOT NULL default '',
`country` varchar(40) NOT NULL default '',
`mail` varchar(255) NOT NULL default '',
`gatecode` text,
`notes` text,
PRIMARY KEY (`id`) )ENGINE=INNODB;

DROP TABLE IF EXISTS `crm9_person`;
CREATE TABLE `crm9_person` (
`id` int(255) NOT NULL auto_increment,
`companyname` varchar(255) NOT NULL default '',
`contactname` varchar(255) NOT NULL default '',
`securitynumber` varchar(12) NOT NULL default '',
`cellphone` varchar(16) NOT NULL default '',
`telephone` varchar(16) NOT NULL default '',
`telefax` varchar(16) NOT NULL default '',
`on_call_address` int(255) NOT NULL default '0',
`invoice_address` int(255) NOT NULL default '0',
`custtype` int(11) default '3',
`granskad` int(255) default NULL,
`fakturatyp` int(10) default NULL,
`notes` text,
PRIMARY KEY (`id`),
INDEX (on_call_address, invoice_address),
CONSTRAINT person_has_address FOREIGN KEY (`on_call_address`, `invoice_address`)
REFERENCES crm9_address(id, id) ON UPDATE CASCADE ON DELETE RESTRICT )ENGINE=INNODB AUTO_INCREMENT=20;

Options: ReplyQuote


Subject
Views
Written By
Posted
644939
March 24, 2005 01:20PM
5103
October 09, 2012 09:48PM
3403
December 19, 2011 10:13PM
8810
May 09, 2006 06:01PM
8005
November 15, 2006 02:05PM
7050
T D
February 01, 2008 06:47AM
8862
August 27, 2008 08:08AM
9385
December 03, 2008 10:15AM
5827
May 01, 2009 07:39AM
Re: ERROR 1005: Can't create table (errno: 150)
14669
November 12, 2008 01:20PM
3063
August 29, 2011 04:46PM
4668
s l
December 15, 2009 01:48PM
4637
December 22, 2009 02:54AM
2916
February 18, 2011 08:55AM
3485
May 24, 2011 10:11AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.