[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_3_8-10809-g8505569

Marc Delisle lem9 at users.sourceforge.net
Sat Nov 6 23:20:28 CET 2010


The branch, master has been updated
       via  850556978b89629dde667a482937755dde21fc0c (commit)
      from  888931369557c6db0e1701307bb7e3e1e97692a6 (commit)


- Log -----------------------------------------------------------------
commit 850556978b89629dde667a482937755dde21fc0c
Author: Marc Delisle <marc at infomarc.info>
Date:   Sat Nov 6 18:20:20 2010 -0400

    Designer: their could be an internal relation to delete even if engine is InnoDB

-----------------------------------------------------------------------

Summary of changes:
 pmd_relation_upd.php |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/pmd_relation_upd.php b/pmd_relation_upd.php
index f05ffbd..564395b 100644
--- a/pmd_relation_upd.php
+++ b/pmd_relation_upd.php
@@ -21,6 +21,8 @@ $type_T1 = strtoupper($tables[$T1]['ENGINE']);
 $tables = PMA_DBI_get_tables_full($db, $T2);
 $type_T2 = strtoupper($tables[$T2]['ENGINE']);
 
+$try_to_delete_internal_relation = false;
+
 if (PMA_foreignkey_supported($type_T1) && PMA_foreignkey_supported($type_T2) && $type_T1 == $type_T2) {
     // InnoDB
     $existrel_foreign = PMA_getForeigners($DB2, $T2, '', 'foreign');
@@ -30,8 +32,14 @@ if (PMA_foreignkey_supported($type_T1) && PMA_foreignkey_supported($type_T2) &&
                   . ' DROP FOREIGN KEY '
                   . PMA_backquote($existrel_foreign[$F2]['constraint']);
         $upd_rs     = PMA_DBI_query($upd_query);
+    } else {
+        // there can be an internal relation even if InnoDB
+        $try_to_delete_internal_relation = true;
     }
 } else {
+    $try_to_delete_internal_relation = true;
+}
+if ($try_to_delete_internal_relation) {
     // internal relations
     PMA_query_as_controluser('DELETE FROM '
               . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.'


hooks/post-receive
-- 
phpMyAdmin




More information about the Git mailing list