bug #2926613 [edit] Copy database shows errors when DB has foreign key

This commit is contained in:
Herman van Rink
2010-01-20 08:00:47 +00:00
parent 6d9b602b87
commit 1ad5d85666
2 changed files with 3 additions and 2 deletions

View File

@@ -57,6 +57,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
+ [lang] Finnish update, thanks to Jouni Kahkonen + [lang] Finnish update, thanks to Jouni Kahkonen
+ [lang] Lithuanian update, thanks to Rytis Slatkevicius - rytis_s + [lang] Lithuanian update, thanks to Rytis Slatkevicius - rytis_s
- bug #2931939 [status] Seeing "m" as unit is confusing - bug #2931939 [status] Seeing "m" as unit is confusing
- bug #2926613 [edit] Copy database shows errors when DB has foreign key
3.2.6.0 (not yet released) 3.2.6.0 (not yet released)

View File

@@ -79,7 +79,7 @@ if (strlen($db) && (! empty($db_rename) || ! empty($db_copy))) {
$sql_constraints = ''; $sql_constraints = '';
$sql_drop_foreign_keys = ''; $sql_drop_foreign_keys = '';
$sql_structure = PMA_getTableDef($db, $each_table, "\n", '', false, false); $sql_structure = PMA_getTableDef($db, $each_table, "\n", '', false, false);
if (! empty($sql_drop_foreign_keys)) { if ($move && ! empty($sql_drop_foreign_keys)) {
PMA_DBI_query($sql_drop_foreign_keys); PMA_DBI_query($sql_drop_foreign_keys);
} }
// keep the constraint we just dropped // keep the constraint we just dropped
@@ -144,7 +144,7 @@ if (strlen($db) && (! empty($db_rename) || ! empty($db_copy))) {
unset($triggers); unset($triggers);
// this does not apply to a rename operation // this does not apply to a rename operation
if (isset($GLOBALS['add_constraints'])) { if (isset($GLOBALS['add_constraints']) && !empty($GLOBALS['sql_constraints_query'])) {
$GLOBALS['sql_constraints_query_full_db'][] = $GLOBALS['sql_constraints_query']; $GLOBALS['sql_constraints_query_full_db'][] = $GLOBALS['sql_constraints_query'];
unset($GLOBALS['sql_constraints_query']); unset($GLOBALS['sql_constraints_query']);
} }