From fe22439f853207bcbb949c447e8441de30211090 Mon Sep 17 00:00:00 2001 From: MattRichardson Date: Tue, 30 Jul 2013 14:09:16 -0700 Subject: [PATCH] Fixes wsp-10190: Fixes issue around encoding of mysql backups (dumps) Now uses --result-file option for mysqldump.exe rather than using file system redirection, which was causing encoding issues in some instances --- .../WebsitePanel.Providers.Database.MySQL/MySqlServer.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Database.MySQL/MySqlServer.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Database.MySQL/MySqlServer.cs index 9dbb49b9..fbfecf14 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Database.MySQL/MySqlServer.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Database.MySQL/MySqlServer.cs @@ -478,12 +478,11 @@ namespace WebsitePanel.Providers.Database string cmd = Path.Combine(MySqlBinFolder, "mysqldump.exe"); string bakFile = Path.Combine(BackupTempFolder, backupName); - string args = string.Format(" --host={0} --port={1} --user={2} --password={3} --opt --skip-extended-insert --skip-quick --skip-comments {4}", - ServerName, ServerPort, - RootLogin, RootPassword, databaseName); + string args = string.Format(" --host={0} --port={1} --user={2} --password={3} --opt --skip-extended-insert --skip-quick --skip-comments --result-file=\"{4}\" {5}", + ServerName, ServerPort, RootLogin, RootPassword, bakFile, databaseName); // backup database - FileUtils.ExecuteSystemCommand(cmd, args, bakFile); + FileUtils.ExecuteSystemCommand(cmd, args); return bakFile; }