trap error 1452 when adding a foreign key and the constraint fails
This commit is contained in:
@@ -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 <lem9@users.sourceforge.net>
|
||||
* libraries/grab_globals.lib.php: fix attack via _FILES,
|
||||
|
@@ -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";
|
||||
}
|
||||
|
Reference in New Issue
Block a user