diff --git a/ChangeLog b/ChangeLog index 4ca4dc7b1..9d49592f3 100755 --- a/ChangeLog +++ b/ChangeLog @@ -55,6 +55,8 @@ $Source$ list. * tbl_*: Use more require_once to avoid acquiring table info several times. + * libraries/relation.lib.php: Do not try to restore database as control + user, it has to fail. 2005-10-07 Marc Delisle * libraries/check_user_privileges.lib.php: bug #1313821, dbname containing a diff --git a/libraries/relation.lib.php b/libraries/relation.lib.php index 334f8a399..5049fb0b7 100644 --- a/libraries/relation.lib.php +++ b/libraries/relation.lib.php @@ -32,7 +32,10 @@ } else { $result = @PMA_DBI_try_query($sql, $dbh, $options); } // end if... else... - PMA_DBI_select_db($db, $dbh); + // It makes no sense to restore database on control user + if ($dbh == $GLOBALS['userlink']) { + PMA_DBI_select_db($db, $dbh); + } if ($result) { return $result; @@ -100,7 +103,6 @@ function PMA_getRelationsParam($verbose = FALSE) // example enable relations but not pdf... // I was thinking of checking if they have all required columns but I // fear it might be too slow - // PMA_DBI_select_db($cfgRelation['db']); $tab_query = 'SHOW TABLES FROM ' . PMA_backquote($cfgRelation['db']); $tab_rs = PMA_query_as_cu($tab_query, FALSE, PMA_DBI_QUERY_STORE);