From ce969cb2098034642f27def504af8b42d5a80d80 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Wed, 7 Jul 2004 17:02:53 +0000 Subject: [PATCH] use PMA_DBI_try_query to catch the error --- ChangeLog | 2 ++ tbl_relation.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 7b084b645..5aee06651 100755 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,8 @@ $Source$ * main.php: bug 984136, wrong alignment in RTL languages * lang/arabic-utf-8, lang/sync_lang.sh: bug 984176, wrong encoding for arabic UTF-8. sync with --iconv works. + * tbl_relation.php: use PMA_DBI_try_query() to be able to catch the + missing index error (InnoDB) and give appropriate advice 2004-07-06 Marc Delisle * libraries/export/xls.php: enable user to specify './tmp' as the diff --git a/tbl_relation.php b/tbl_relation.php index f2c1b7c22..f9efa8ab8 100644 --- a/tbl_relation.php +++ b/tbl_relation.php @@ -189,7 +189,7 @@ if (isset($submit_rel) && $submit_rel == 'true') { } // end if... else.... if (isset($upd_query)) { - $upd_rs = PMA_DBI_query($upd_query); + $upd_rs = PMA_DBI_try_query($upd_query); if (substr(PMA_DBI_getError(), 1, 4) == '1005') { echo '

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

' . PMA_showMySQLDocu('manual_Table_types', 'InnoDB_foreign_key_constraints') . "\n"; }