[racktables-users] Re: Error during upgrade.

  • From: Frank Altpeter <frank-racktables@xxxxxxxxxxx>
  • To: racktables-users@xxxxxxxxxxxxx
  • Date: Fri, 18 Sep 2009 16:25:29 +0200

Hi there,

on 2009-09-18 at 16:09:38 CEST, Denis Ovsienko wrote:
> 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:

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)

 
Le deagh dhùraghd,

        Frank Altpeter

-- 
FA-RIPE || http://www.altpeter.de/
Viva la evolution
| Four thousand throats may be cut in one night by a running man.
|               -- Klingon Soldier, "Day of the Dove", stardate unknown

Other related posts: