[racktables-users] Re: Error during upgrade.

  • From: Denis Ovsienko <pilot@xxxxxxxxxx>
  • To: racktables-users@xxxxxxxxxxxxx
  • Date: Tue, 22 Sep 2009 00:33:29 +0400

> > These are some lost port records, which belong to non-existent
> > object(s). This shouldn't normally happen, but after all it's not
> > critical. Could you try these quieries after making a backup dump?
> > 
> > DELETE FROM Port WHERE object_id NOT IN (SELECT id FROM RackObject);
> > 
> > ALTER TABLE Port ADD CONSTRAINT `Port-FK-object_id`
> > FOREIGN KEY (object_id) REFERENCES RackObject (id);
> 
> AFAIK I've seen the same errors like the OP, but with above statement I'm
> getting stranger errors:

It would help to see the exact error message. If it is possible to
re-run the upgrade on the pre-upgrade copy of the database, could you
do this?

> mysql> SELECT * FROM Port WHERE object_id NOT IN (SELECT id FROM RackObject);
> Empty set (0.00 sec)
> 
> mysql> ALTER TABLE Port ADD CONSTRAINT `Port-FK-object_id` FOREIGN KEY 
> (object_id) REFERENCES RackObject (id);
> ERROR 1005 (HY000): Can't create table './RackTables/#sql-b8d_5e6e.frm' 
> (errno: 121)

These messages indicate, that you don't experience this particular
issue.

Other related posts: