From f899389dc249c761ea1ea6624db91ac952177349 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sun, 12 Jun 2005 10:04:32 +0000 Subject: [PATCH] bug #1215688, Copying database does not preserve default charset and collation --- ChangeLog | 2 ++ db_operations.php | 14 +++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7d304a10e..2e0018b77 100755 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,8 @@ $Source$ 2005-06-12 Marc Delisle * 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 * tbl_properties_export.php: bug #1169791, exporting results from queries diff --git a/db_operations.php b/db_operations.php index 6b10ed3c9..355b132da 100644 --- a/db_operations.php +++ b/db_operations.php @@ -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']) { ?>
- ' + +' . "\n"; + } + echo '' . "\n" . PMA_generate_common_hidden_inputs($db); ?>