diff --git a/ChangeLog b/ChangeLog index e5c04a7fc..19be696f0 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,11 @@ phpMyAdmin - ChangeLog $Id$ $Source$ +2006-10-01 Marc Delisle + ### 2.9.0.1 released from MAINT_2_9_0 + * tbl_relation.php: trap error 1452 when adding a foreign key + and a constraint fails + 2006-09-29 Marc Delisle * libraries/database_interface.lib.php, bug #1566904, typo in require, thanks to Björn Wiberg - bwiberg. diff --git a/tbl_relation.php b/tbl_relation.php index 605ed5061..b46b3447a 100644 --- a/tbl_relation.php +++ b/tbl_relation.php @@ -201,7 +201,8 @@ if (isset($_REQUEST['destination_innodb'])) { if (isset($upd_query)) { $upd_rs = PMA_DBI_try_query($upd_query); $tmp_error = PMA_DBI_getError(); - if (substr($tmp_error, 1, 4) == '1216') { + if (substr($tmp_error, 1, 4) == '1216' + || substr($tmp_error, 1, 4) == '1452') { PMA_mysqlDie($tmp_error, $upd_query, FALSE, '', FALSE); echo PMA_showMySQLDocu('manual_Table_types', 'InnoDB_foreign_key_constraints') . "\n"; }