Sorry for another email. But this is just to expand on what SHawn said..I
could also have created an index and then referenced the column.
So without a primary key. I can create the parent , then create the child
and the index .
mysql> create TABLE parent ( id int(16) , name varchar(128))ENGINE=
Thanks shawn for your reply. Your simplification of the innodb status
message and this post which I just read (http://lists.mysql.com/mysql/221900
)
tells me what I am doing wrong.
I need the referenced column to be indexed. I guess one way of ensuring that
is to declare it as a primary key .
So
Hello Hari,
You already posted the best answer we could provide :)
On 2/22/2011 13:00, hari jayaram wrote:
Hi I am getting a Foreign key error .
...
I have attached the create table syntax for both the parent and child tables
and the innodb status below. ...
mysql> show innodb status;
+---
Sunil,
in InnoDB, the maximum indexed column length is 767 bytes.
Osku is improving the error message:
http://bugs.mysql.com/bug.php?id=13315
Regards,
Heikki
Oracle/Innobase
- Original Message -
From: ""Sunil Vishwas"" <[EMAIL PROTECTED]>
Newsgroups: mailing.database.myodbc
Sent: Tu
Am Tue, 07 Dec 2004 10:28:58 +0200 schrieb Heikki Tuuri:
> Jochen,
>
> - Original Message -
> From: "Jochen Witte" <[EMAIL PROTECTED]>
> Newsgroups: mailing.database.myodbc
> Sent: Tuesday, December 07, 2004 2:41 AM
> Subject: error 1005 (errno150)
>
>
>> Hello,
>>
>> I try to set up r
Jochen,
- Original Message -
From: "Jochen Witte" <[EMAIL PROTECTED]>
Newsgroups: mailing.database.myodbc
Sent: Tuesday, December 07, 2004 2:41 AM
Subject: error 1005 (errno150)
Hello,
I try to set up replication and woulkd like to export my master with
mysqldump. The import fails with E
Hi Michael,
I must say thank you for helping me. Yes you are right
- I made the changes and it works.
I will have to read the manual to further understand
the issue with Primary and Foreign keys.
Thank you.
Maru
--- Michael Stassen <[EMAIL PROTECTED]>
wrote:
> The problem is in table SECTIONS.
The problem is in table SECTIONS. From the manual, "In the referencing
table, there must be an index where the foreign key columns are listed as
the first columns in the same order. In the referenced table, there must be
an index where the referenced columns are listed as the first columns in th
Hi,
Check if column PlanName is the primary key (and the only one) in table
testplans.
If so, check if both fields PlanName in testplans and PlanName in
runload_list are exactly of the same type and size.
Regards,
Hector
--
Ing. Hector Maldonado Melgar
Dpto. Desarrollo de Software
TCI S.A.
Bartis, Robert M (Bob) wrote:
I recently added a column and Index to an existing table. I wanted to also add a Foreign Key. I have done this before defining the commands outside MySQL and souring the file in for new tables, but would prefer to not have to dump the current table just for the modific
"naveen" <[EMAIL PROTECTED]> wrote:
> thanks Victoria Reznichenko
>
> for your help
> where will i put this parameter
> SET FOREIGN_KEY_CHECKS = 0;
> in the dump file or under mysql pormpt.I added through mysql but still the
> same error comes.
You should put
SET FOREIGN_KEY_CHECKS = 0;
at the
toria Reznichenko" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 11, 2004 4:25 PM
Subject: Re: ERROR 1005 at line 12: Can't create table
> "naveen" <[EMAIL PROTECTED]> wrote:
> > Hi
> > when i try to put the data(xyz.s
"naveen" <[EMAIL PROTECTED]> wrote:
> Hi
> when i try to put the data(xyz.sql) taken using mysqldump commant
>
> bin/mysql --user=root --password=secret xyz < xyz.sql
>
> ERROR 1005 at line 12: Can't create table './XYZ/Bcl.frm' (errno: 150)
>
> what is this comming,why is it comming.
You can us
Hi,
C:\mysql\bin>perror 150
Error code 150: Unknown error
150 = Foreign key constraint is incorrectly formed
Take care,
Aleksandar
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
On 5 Jan 2004, at 21:10, Sid Lane wrote:
on mysql 4.0.14-standard (x86 Linux) when I try the following:
alter table child_table
add ( foreign key (column1, column2)
references parent_table
on delete cascade)
;
on an existing innodb table I get:
ERROR 1005: Can't create table './dbname/#sql-70f
Hello,
I found the key to solve this problem in:
http://darkstar.ist.utl.pt/mysql/doc/en/InnoDB_foreign_key_constraints.html
You'll probably need an INDEX for that new foreign key you are declaring in
older versions this isn't neccesary but in latest ones it is a restriction.
You can have more i
"Morten Gulbrandsen" <[EMAIL PROTECTED]> wrote:
> USE company;
> DROP TABLE IF EXISTS EMPLOYEE;
> CREATE TABLE EMPLOYEE
> (
> # PK
> SSN CHAR(9) NOT NULL,
> # FK
> SUPERSSNCHAR(9),
> DNO INT NOT NULL DEFAULT 1,
> CONSTRAINT EMPPK
>PRIM
Karam Chand <[EMAIL PROTECTED]> wrote:
> Greetings
>
> I have MySQL 4.0.14 running on WinXP.
>
> Whenever I create a temporary table from an existing
> table that has multiple keys ( the temporary table has
> columns reordered from the original table ) with a
> query like -
>
> create temporary
Ben,
please print with
SHOW INNODB STATUS
what kind of foreign key error InnoDB complains about in the import.
Can you produce a repeatable test case with table dumps that shows the
error?
Are you sure you are importing all the tables within the same connection
where you have set foreign_key_c
19 matches
Mail list logo