diff --git a/ChangeLog b/ChangeLog index b9191d6a6..88b31ff6b 100755 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,8 @@ $Source$ ### 2.9.0.1 released from MAINT_2_9_0 * libraries/database_interface.lib.php: bug #1568341, case sensitivity in database names + * tbl_relation.php: trap error 1452 when adding a foreign key + and a constraint fails 2006-09-29 Marc Delisle * libraries/grab_globals.lib.php: fix attack via _FILES, 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"; }