diff --git a/ChangeLog b/ChangeLog index dba0d183b..58d67e503 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,11 @@ phpMyAdmin - Changelog $Id$ $Source$ +2003-08-27 Marc Delisle + * tbl_relation.php3: User forgot to define an index on the master table + before adding a foreign key constraint: trap the error, warn the user + and show him a link to the relevant doc + 2003-08-27 Garvin Hicking * lang/german*: Update diff --git a/tbl_relation.php3 b/tbl_relation.php3 index 45904e1c0..62c52db32 100644 --- a/tbl_relation.php3 +++ b/tbl_relation.php3 @@ -120,6 +120,9 @@ if ($cfgRelation['relwork'] if (isset($upd_query)) { $upd_rs = PMA_mysql_query($upd_query); + if (PMA_mysql_error() && mysql_errno() == 1005) { + echo '

' . $strNoIndex . ' (' . $master_field .')

' . PMA_showMySQLDocu('manual_Table_types', 'InnoDB_foreign_key_constraints') . "\n"; + } unset($upd_query); } } // end while