Daniel,

are you using a non-latin1 character set?  Have you looked in the error log
mysql.err? What, if anything, did mysqld-max print when it crashed?

>From the manual http://www.innodb.com/ibman.html#InnoDB_history:
...
MySQL/InnoDB-3.23.49, February 17, 2002
...
Fixed a bug: if one defined a non-latin1 character set as the default
character set, then definition of foreign key constraints could fail in an
assertion failure in dict0crea.c, reporting an internal error 17.
...

Please upgrade to 4.0.2.

Heikki Tuuri
Innobase Oy
---
InnoDB - transactions, hot backup, and foreign key support for MySQL
See http://www.innodb.com, download MySQL-Max from http://www.mysql.com

----- Original Message -----
From: ""Kiss Daniel"" <[EMAIL PROTECTED]>
Newsgroups: mailing.database.mysql
Sent: Tuesday, July 16, 2002 10:12 AM
Subject: Foreign key bug in InnoDB?


> Hi,
>
> I'm using MySQL-Max-4.0.1-alpha on WinNT4SP6 with InnoDB as default
> table type.
> I have a database creation script like this:
>
> //Section A
>
> CREATE TABLE AParents (
>   Id int unsigned not null auto_increment,
>   Parent int unsigned not null,
>
>   primary key (Id),
>   index Parent (Parent)
> ) TYPE = InnoDB;
>
>
> CREATE TABLE AChildren (
>   Id int unsigned not null auto_increment,
>   Parent int unsigned not null,
>
>   primary key (Id),
>   index Parent (Parent),
>
>   foreign key (Parent) references AParents (Id)
> ) TYPE = InnoDB;
>
> //Section B
>
> CREATE TABLE BParents (
>   Id int unsigned not null auto_increment,
>   Parent int unsigned not null,
>
>   primary key (Id),
>   index Parent (Parent)
> ) TYPE = InnoDB;
>
>
> CREATE TABLE BChildren (
>   Id varchar(13) not null default '',
>   Parent int unsigned not null,
>
>   primary key (Id),
>   index Parent (Parent),
>
>   foreign key (Parent) references BParents (Id)
> ) TYPE = InnoDB;
>
>
> When I run the section A and B in any order, MySQL crashes and InnoDB
> tablespaces go wrong and they cannot be repaired (as I restart MySQL).
>
> The crash appears when I create the second table with a foreign key
> constraint.
>
> Do I do something wrong or this is a real bug in InnoDB?
>
> Thx,
>    Dani
>
> --------------------------------------------------
> http://www.mailbox.hu - Mert levelezni kell...
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to