1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-13 10:04:07 +02:00

MySQL: Use utf8mb4 in export only if required

This commit is contained in:
Jakub Vrana
2015-03-06 09:36:20 -08:00
parent 6bbc8bc3ea
commit 8aa420d160
5 changed files with 29 additions and 10 deletions

View File

@@ -637,7 +637,7 @@ username.form['auth[driver]'].onchange();
if ($style) {
dump_csv(array_keys(fields($table)));
}
} elseif ($style) {
} else {
if ($is_view == 2) {
$fields = array();
foreach (fields($table) as $name => $field) {
@@ -647,7 +647,8 @@ username.form['auth[driver]'].onchange();
} else {
$create = create_sql($table, $_POST["auto_increment"]);
}
if ($create) {
set_utf8mb4($create);
if ($style && $create) {
if ($style == "DROP+CREATE" || $is_view == 1) {
echo "DROP " . ($is_view == 2 ? "VIEW" : "TABLE") . " IF EXISTS " . table($table) . ";\n";
}