diff --git a/ChangeLog b/ChangeLog index 20fc55b47..99d4cc09f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -84,6 +84,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA + [lang] Swedish update, thanks to Björn T. Hallberg + [lang] Russian update, thanks to Victor Volkov and the php-myadmin.ru users + [privileges] Support password hashing on the Edit Privileges interface +- bug #1755339 Warn about rename dataase actually being copy/delete 2.10.3.0 (not yet released) diff --git a/db_operations.php b/db_operations.php index a8fc2d99d..6f67fea7d 100644 --- a/db_operations.php +++ b/db_operations.php @@ -38,6 +38,19 @@ if (strlen($db) && $sql_query = ''; // in case target db exists if ($move || (isset($create_database_before_copying) && $create_database_before_copying)) { + /** + * @todo activate this with the correct version of MySQL + * when they fix the problem when the db contains a VIEW + * (problem exists in 5.1.20) + * also, in 6.0.0 when the db contains a Falcon table, + * renaming it results in a unusable db! + */ + //if (PMA_MYSQL_INT_VERSION >= 50107) { + // $local_query = 'RENAME DATABASE ' . PMA_backquote($db) . ' TO ' . PMA_backquote($newname) . ';'; + // $sql_query = $local_query; + // PMA_DBI_query($local_query); + //} else { + // please indent -> $local_query = 'CREATE DATABASE ' . PMA_backquote($newname); if (isset($db_collation)) { $local_query .= ' DEFAULT' . PMA_generateCharsetQueryPart($db_collation); @@ -121,6 +134,8 @@ if (strlen($db) && $GLOBALS['sql_query'] .= "\n" . $GLOBALS['sql_constraints_query_full_db']; unset($GLOBALS['sql_constraints_query_full_db']); } +// see the previous todo +// } // end else MySQL < 50107 // Duplicate the bookmarks for this db (done once for each db) if ($db != $newname) { @@ -136,9 +151,11 @@ if (strlen($db) && require_once './libraries/relation_cleanup.lib.php'; PMA_relationsCleanupDatabase($db); - $local_query = 'DROP DATABASE ' . PMA_backquote($db) . ';'; - $sql_query .= "\n" . $local_query; - PMA_DBI_query($local_query); + if (PMA_MYSQL_INT_VERSION < 50107) { + $local_query = 'DROP DATABASE ' . PMA_backquote($db) . ';'; + $sql_query .= "\n" . $local_query; + PMA_DBI_query($local_query); + } $message = sprintf($strRenameDatabaseOK, htmlspecialchars($db), htmlspecialchars($newname)); } else { @@ -252,6 +269,17 @@ if (!$is_information_schema) { ?> + = 50107) { + // echo 'RENAME DATABASE'; + //} else { + echo 'INSERT INTO ... SELECT'; + //} + echo ')'; ?>