Restores and imports from local files are now run as the Unix user configured for backups, rather than root.
---- Changes since 1.490 ----
The information_schema database is no longer included when backing up all databases, as it really just contains metadata.
+---- Changes since 1.500 ----
+Added a collation order field to the database creation form.
newdb_none=None
newdb_tname=Named
newdb_charset=Character set
+newdb_collation=Collation order
newdb_str=with fields below
newdb_err=Failed to create database
newdb_edb=Missing or invalid database name
return sort { lc($a) cmp lc($b) } @rv;
}
+# list_collation_orders([db])
+# Returns a list of supported collation orders. Each row is an array ref of
+# a code and character set it can work with.
+sub list_collation_orders
+{
+local @rv;
+local $db = $_[0] || $master_db;
+if ($mysql_version >= 5) {
+ local $d = &execute_sql($db, "show collation");
+ @rv = map { [ $_->[0], $_->[1] ] } @{$d->{'data'}};
+ }
+return sort { lc($a) cmp lc($b) } @rv;
+}
+
# list_system_variables()
# Returns a list of all system variables, and their default values
sub list_system_variables
@sql = &parse_table_form([ ], $in{'table'});
}
&execute_sql_logged($master_db, "create database "."estr($in{'db'}).
- ($in{'charset'} ? " character set $in{'charset'}" : ""));
+ ($in{'charset'} ? " character set $in{'charset'}" : "").
+ ($in{'collation'} ? " collate $in{'collation'}" : ""));
&webmin_log("create", "db", $in{'db'});
if (@sql) {
foreach $sql (@sql) {
if ($mysql_version >= 4.1) {
# Character set option
+ @charsets = &list_character_sets();
+ %csmap = map { $_->[0], $_->[1] } @charsets;
print &ui_table_row($text{'newdb_charset'},
&ui_select("charset", undef,
[ [ undef, "<$text{'default'}>" ],
- &list_character_sets() ]));
+ @charsets ]));
+ }
+
+@coll = &list_collation_orders();
+if (@coll) {
+ # Collation order option
+ print &ui_table_row($text{'newdb_collation'},
+ &ui_select("collation", undef,
+ [ [ undef, "<$text{'default'}>" ],
+ map { [ $_->[0], $_->[0]." (".$csmap{$_->[1]}.")" ] }
+ &list_collation_orders() ]));
}
# Initial table name