Bug #23994 MySQL Server restore DB fails to import foriegn keys
Submitted: 6 Nov 2006 1:14 Modified: 6 Nov 2006 22:07
Reporter: Jared S (Silver Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.0.27 OS:Microsoft Windows (WinXP)
Assigned to: Miguel Solorzano CPU Architecture:Any
Tags: constraints, dump, foreign keys, import, MYSQL SERVER, script

[6 Nov 2006 1:14] Jared S
Description:
Hi,

MySQL Server 5.0.27 is not importing my foriegn keys.  All my tables are in unicode format like this `my-table`.

How to repeat:
> create table called `my-table`
> add foriegn key
> backup
> restore

*** all constraints get dropped on import from either QB or Admin

Suggested fix:
Verify inserting of foriegn keys for unicode tables works succesfully
[6 Nov 2006 3:44] Jared S
I can not repeat now.  Would appreciate quick look.
[6 Nov 2006 15:25] Miguel Solorzano
Thank you for the bug report. I restored your backup and indeed I was unable
to see the foreign keys on Administrator, however using the mysql.exe
client:

mysql> use goolabri
Database changed
mysql> show create table `flat-charges`;
<cut>
  PRIMARY KEY  (`id`),
  KEY `idchargetype` (`idchargetype`),
  CONSTRAINT `FK_flat-charges_1` FOREIGN KEY (`idchargetype`) REFERENCES `type-charges` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |

<cut

So in this case is a bug on GUI tools. Please verify with the command
prompt clients. Thanks in advance.
[6 Nov 2006 22:07] Jared S
Hi Miguel,

Since I can no longer repeat this problem on my office or home computer I will close bug.  I assure you though - at 1 stage I did loose all my CONSTRAINTS.

The flaw you found in GUI-TOOLS is one of my previous bugs so I will have to keep an eye on this problem.