bug #1215688, Copying database does not preserve default charset and collation

This commit is contained in:
Marc Delisle
2005-06-12 10:04:32 +00:00
parent 07dffb75b6
commit f899389dc2
2 changed files with 13 additions and 3 deletions

View File

@@ -8,6 +8,8 @@ $Source$
2005-06-12 Marc Delisle <lem9@users.sourceforge.net>
* tbl_properties.inc.php: visually bind the Add x fields dialog to its
submit button
* db_operations.php: bug #1215688, Copying database does not preserve
default charset and collation
2005-06-11 Marc Delisle <lem9@users.sourceforge.net>
* tbl_properties_export.php: bug #1169791, exporting results from queries

View File

@@ -26,7 +26,11 @@ if (isset($db) &&
$message = $strDatabaseEmpty;
} else {
if ($create_database_before_copying) {
$local_query = 'CREATE DATABASE ' . PMA_backquote($newname) . ';';
$local_query = 'CREATE DATABASE ' . PMA_backquote($newname);
if (isset($db_collation)) {
$local_query .= ' DEFAULT' . PMA_generateCharsetQueryPart($db_collation);
}
$local_query .= ';';
$sql_query = $local_query;
PMA_DBI_query($local_query);
}
@@ -188,8 +192,12 @@ if ($cfgRelation['commwork']) {
?></td></tr>
<form method="post" action="db_operations.php"
onsubmit="return emptyFormElements(this, 'newname')">
<tr bgcolor="<?php echo $cfg['BgcolorOne']; ?>"><td colspan="3"><?php
echo '<input type="hidden" name="db_copy" value="true" />'
<tr bgcolor="<?php echo $cfg['BgcolorOne']; ?>"><td colspan="3">
<?php
if (isset($db_collation)) {
echo '<input type="hidden" name="db_collation" value="' . $db_collation .'" />' . "\n";
}
echo '<input type="hidden" name="db_copy" value="true" />' . "\n"
. PMA_generate_common_hidden_inputs($db);
?><input type="text" name="newname" size="30" class="textfield" value="" /></td>
</tr><tr>