[X] I had searched in the issues and found no similar issues.
Version
1.2.5
What's Wrong?
使用Power BI Desktop 23年5月版+MySQL Connector/NET 8.0.28连接doris服务器,连接时报错,Power BI日志中可以看到
Message: Input string was not in a correct format.
StackTrace:
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at MySql.Data.MySqlClient.Driver.LoadCharacterSets(MySqlConnection connection)
at MySql.Data.MySqlClient.Driver.Configure(MySqlConnection connection)
at MySql.Data.MySqlClient.MySqlConnection.Open()
at Microsoft.Mashup.Engine1.Library.Common.TracingDbConnection.<Open>b__5_0(IHostTrace trace)
at Microsoft.Mashup.Engine1.Library.Common.Tracer.<>c__DisplayClass19_0.<TracePerformance>b__0(IHostTrace trace)
at Microsoft.Mashup.Engine1.Library.Common.Tracer.TracePerformance[T](String method, Func`2 func)
Exception:
ExceptionType: System.FormatException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message: Input string was not in a correct format.
StackTrace:
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at MySql.Data.MySqlClient.Driver.LoadCharacterSets(MySqlConnection connection)
at MySql.Data.MySqlClient.Driver.Configure(MySqlConnection connection)
at MySql.Data.MySqlClient.MySqlConnection.Open()
at Microsoft.Mashup.Engine1.Library.Common.TracingDbConnection.<Open>b__5_0(IHostTrace trace)
at Microsoft.Mashup.Engine1.Library.Common.Tracer.<>c__DisplayClass19_0.<TracePerformance>b__0(IHostTrace trace)
at Microsoft.Mashup.Engine1.Library.Common.Tracer.TracePerformance[T](String method, Func`2 func)
at Microsoft.Mashup.Engine1.Library.Common.TracingDbConnection.Open()
at Microsoft.Mashup.Engine1.Library.Common.WrappedDbConnection.Open()
at Microsoft.Mashup.Engine1.Library.Common.DbExtensions.<>c__DisplayClass0_0.<Open>b__0()
at Microsoft.Mashup.Engine1.Library.Common.DbEnvironment.RunWithRetryGuard[T](Func`1 action, Func`2 retryAfterSqlError, Action finalizeOnRetry, String dataSourceNameString, IEngineHost host, IResource resource)
at Microsoft.Mashup.Engine1.Library.Common.DbEnvironment.ConvertDbExceptions[T](IResource resource, Func`1 action, Func`2 retryAfterSqlError, Action finalizeOnRetry, String dataSourceNameString, IEngineHost host)
Search before asking
Version
1.2.5
What's Wrong?
使用Power BI Desktop 23年5月版+MySQL Connector/NET 8.0.28连接doris服务器,连接时报错,Power BI日志中可以看到
What You Expected?
正常加载数据
How to Reproduce?
错误出现在MySQL.Data的Driver.cs,https://github.com/mysql/mysql-connector-net/blob/8.0.28/MySQL.Data/src/Driver.cs#L345 。 对autocommit的值Ture进行Convert.ToInt32时出现错误。 抓包发现返回值是1,但列类型是FIELD_TYPE_TINY,而MySQL对应列类型是FIELD_TYPE_LONGLONG。 导致这个问题的原因是 https://github.com/mysql/mysql-connector-net/blob/8.0.28/MySQL.Data/src/Field.cs#L275 。
Anything Else?
Driver.cs中相关代码是8.0.27新增,所以这个问题的解决方法有几种:
很希望可以提交PR,但对Doris代码不熟悉,可能无能为力。
Are you willing to submit PR?
Code of Conduct