diff --git a/Src/Asp.Net/SqlSugar.MySqlConnector/MySql/SqlBuilder/MySqlFastBuilder.cs b/Src/Asp.Net/SqlSugar.MySqlConnector/MySql/SqlBuilder/MySqlFastBuilder.cs index 44e52e316..01e918d1e 100644 --- a/Src/Asp.Net/SqlSugar.MySqlConnector/MySql/SqlBuilder/MySqlFastBuilder.cs +++ b/Src/Asp.Net/SqlSugar.MySqlConnector/MySql/SqlBuilder/MySqlFastBuilder.cs @@ -44,6 +44,10 @@ namespace SqlSugar.MySqlConnector TableName = dt.TableName, Local = true, }; + if (this.CharacterSet.HasValue()) + { + bulk.CharacterSet = this.CharacterSet; + } bulk.Columns.AddRange(dt.Columns.Cast().Select(colum =>new MySqlBuilder().GetTranslationColumnName(colum.ColumnName)).Distinct().ToArray()); result= await bulk.LoadAsync(); //执行成功才删除文件