Alex, I'm guessing here but given the error code it's most likely the
foreign key restraint that's causing the failure. Also, have you checked
the type of your current tables? Are they all innodb already?

Alex wrote:
> When converting a 1.1 something db to 2.0 I get an error after a while.
> 
> The db was originally on a 4.0.12 MySQL server. loaded the dump to a
> 5.0.22 installation and ran the migration script.
> 
> mysql dbmail < migrate_from_1.x_to_2.0_innodb.mysql
> ERROR 1025 (HY000) at line 145: Error on rename of
> './dbmail/#sql-e5c_57' to './dbmail/dbmail_messageblks' (errno: 150)
> 
> Tried another time and got almost the same result:
> 
> mysql dbmail < dbmail/sql/mysql/migrate_from_1.x_to_2.0_innodb.mysql
> ERROR 1025 (HY000) at line 145: Error on rename of
> './dbmail/#sql-16e4_5e' to './dbmail/dbmail_messageblks' (errno: 150)
> 
> Line 145 is the ALTER TABLE dbmail_messageblks, here's the relevant code
> from migrate_from_1.x_to_2.0_innodb.mysql:
> 
> # alter messageblks table
> RENAME TABLE messageblks TO dbmail_messageblks;
> ALTER TABLE dbmail_messageblks
>         DROP INDEX messageblk_idnr,
>         DROP INDEX messageblk_idnr_2,
>         DROP INDEX msg_index,
>         CHANGE message_idnr physmessage_id bigint(21) NOT NULL DEFAULT '0',
>         ADD COLUMN is_header tinyint(1) DEFAULT '0' NOT NULL,
>         ADD INDEX physmessage_id_index (physmessage_id),
>         ADD INDEX physmessage_id_is_header_index (physmessage_id,
> is_header),
>         ADD FOREIGN KEY physmessage_id_fk (physmessage_id)
>                 REFERENCES dbmail_physmessage (id)
>                 ON DELETE CASCADE ON UPDATE CASCADE;
> UPDATE dbmail_messageblks SET is_header = '0';
> 
> Any hints?
> 
> Alex
> _______________________________________________
> Dbmail mailing list
> [email protected]
> https://mailman.fastxs.nl/mailman/listinfo/dbmail
> 

-- 
  ________________________________________________________________
  Paul Stevens                                      paul at nfg.nl
  NET FACILITIES GROUP                     GPG/PGP: 1024D/11F8CD31
  The Netherlands________________________________http://www.nfg.nl

Reply via email to