From c67ceaa83b6107a6e0d8e4e1ef1ff26e37e08f1d Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Fri, 1 Jan 2010 22:57:34 +0000 Subject: [PATCH] unwanted side effect of tracking when renaming a database --- db_operations.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/db_operations.php b/db_operations.php index 66ee39391..72fe4496f 100644 --- a/db_operations.php +++ b/db_operations.php @@ -53,7 +53,13 @@ if (strlen($db) && (! empty($db_rename) || ! empty($db_copy))) { } $local_query .= ';'; $sql_query = $local_query; + // save the original db name because Tracker.class.php which + // may be called under PMA_DBI_query() changes $GLOBALS['db'] + // for some statements, one of which being CREATE DATABASE + $original_db = $db; PMA_DBI_query($local_query); + $db = $original_db; + unset($original_db); // rebuild the database list because PMA_Table::moveCopy // checks in this list if the target db exists