$tmp) { $back = $sql_query; $sql_query = ''; // value of $what for this table only $this_what = $what; if (!isset($tables_full[$table]['Engine'])) { $tables_full[$table]['Engine'] = $tables_full[$table]['Type']; } // do not copy the data from a Merge table // note: on the calling FORM, 'data' means 'structure and data' if ($tables_full[$table]['Engine'] == 'MRG_MyISAM') { if ($this_what == 'data') { $this_what = 'structure'; } if ($this_what == 'dataonly') { $this_what = 'nocopy'; } } if ($this_what != 'nocopy') { PMA_table_move_copy($db, $table, $newname, $table, isset($this_what) ? $this_what : 'data', $move); } $sql_query = $back . $sql_query; } unset($table); // Duplicate the bookmarks for this db (done once for each db) if ($db != $newname) { $get_fields = array('user','label','query'); $where_fields = array('dbase' => $db); $new_fields = array('dbase' => $newname); PMA_duplicate_table_info('bookmarkwork', 'bookmark', $get_fields, $where_fields, $new_fields); } if ($move) { // cleanup pmadb stuff for this 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); $message = sprintf($strRenameDatabaseOK, htmlspecialchars($db), htmlspecialchars($newname)); } else { $message = sprintf($strCopyDatabaseOK, htmlspecialchars($db), htmlspecialchars($newname)); } $reload = TRUE; /* Change database to be used */ if ($move) { $db = $newname; } else { $pma_uri_parts = parse_url($cfg['PmaAbsoluteUri']); if (isset($switch_to_new) && $switch_to_new == 'true') { setcookie('pma_switch_to_new', 'true', 0, $GLOBALS['cookie_path'], '' , $GLOBALS['is_https']); $db = $newname; } else { setcookie('pma_switch_to_new', '', 0, $GLOBALS['cookie_path'], '' , $GLOBALS['is_https']); } } } } /** * Settings for relations stuff */ require_once('./libraries/relation.lib.php'); $cfgRelation = PMA_getRelationsParam(); /** * Check if comments were updated * (must be done before displaying the menu tabs) */ if ($cfgRelation['commwork'] && isset($db_comment) && $db_comment == 'true') { PMA_SetComment($db, '', '(db_comment)', $comment); } /** * Prepares the tables list if the user where not redirected to this script * because there is no table in the database ($is_info is TRUE) */ if (empty($is_info)) { require('./db_details_common.php'); $url_query .= '&goto=db_operations.php'; // Gets the database structure $sub_part = '_structure'; require('./db_details_db_info.php'); echo "\n"; } if (PMA_MYSQL_INT_VERSION >= 40101) { $db_collation = PMA_getDbCollation($db); } if (PMA_MYSQL_INT_VERSION < 50002 || (PMA_MYSQL_INT_VERSION >= 50002 && $db != 'information_schema')) { $is_information_schema = FALSE; } else { $is_information_schema = TRUE; } if (!$is_information_schema) { require('./libraries/display_create_table.lib.php'); echo '
![]() | ||
'; } echo $strDBComment; $comment = PMA_getComments($db); ?> | ||
![]() | ||
'; } echo $strDBRename.': '; ?> | ||
![]() | ||
';
if ($cfg['PropertiesIconic']) {
echo '![]() |