Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using MySql.Data NugGet package above 8.0.16 returns error The input string 'True' was not in a correct format #44024

Closed
jcotterill opened this issue Apr 12, 2024 · 9 comments · Fixed by #51946
Assignees
Labels
type/bug Something isn't working

Comments

@jcotterill
Copy link

https://starrocks.slack.com/archives/C02FACZSNJV/p1708575974580789

Steps to reproduce the behavior (Required)

Create a .Net Core application with the MySql.Data NugGet package above version 8.0.16.
Use the context builder or try read data from StarRocks.

Expected behavior (Required)

Return requested data from StarRocks.

Real behavior (Required)

System.FormatException: The input string 'True' was not in a correct format.
at System.Number.ThrowOverflowOrFormatException(ParsingStatus status, ReadOnlySpan1 value, TypeCode type) at System.Convert.ToInt32(String value) at MySql.Data.MySqlClient.Driver.LoadCharacterSetsAsync(MySqlConnection connection, Boolean execAsync, CancellationToken cancellationToken) at MySql.Data.MySqlClient.Driver.ConfigureAsync(MySqlConnection connection, Boolean execAsync, CancellationToken cancellationToken) at MySql.Data.MySqlClient.MySqlConnection.OpenAsync(Boolean execAsync, CancellationToken cancellationToken) at MySql.Data.MySqlClient.MySqlConnection.Open() at MySql.EntityFrameworkCore.Scaffolding.Internal.MySQLDatabaseModelFactory.Create(DbConnection connection, DatabaseModelFactoryOptions options) at MySql.EntityFrameworkCore.Scaffolding.Internal.MySQLDatabaseModelFactory.Create(String connectionString, DatabaseModelFactoryOptions options) at Microsoft.EntityFrameworkCore.Scaffolding.Internal.ReverseEngineerScaffolder.ScaffoldModel(String connectionString, DatabaseModelFactoryOptions databaseOptions, ModelReverseEngineerOptions modelOptions, ModelCodeGenerationOptions codeOptions) at Microsoft.EntityFrameworkCore.Design.Internal.DatabaseOperations.ScaffoldContext(String provider, String connectionString, String outputDir, String outputContextDir, String dbContextClassName, IEnumerable1 schemas, IEnumerable1 tables, String modelNamespace, String contextNamespace, Boolean useDataAnnotations, Boolean overwriteFiles, Boolean useDatabaseNames, Boolean suppressOnConfiguring, Boolean noPluralize) at Microsoft.EntityFrameworkCore.Design.OperationExecutor.ScaffoldContextImpl(String provider, String connectionString, String outputDir, String outputDbContextDir, String dbContextClassName, IEnumerable1 schemaFilters, IEnumerable1 tableFilters, String modelNamespace, String contextNamespace, Boolean useDataAnnotations, Boolean overwriteFiles, Boolean useDatabaseNames, Boolean suppressOnConfiguring, Boolean noPluralize) at Microsoft.EntityFrameworkCore.Design.OperationExecutor.ScaffoldContext.<>c__DisplayClass0_0.<.ctor>b__0() at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.<>c__DisplayClass3_01.b__0()
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
The input string 'True' was not in a correct format.

StarRocks version (Required)

3.2.4-613f0b5

@jcotterill jcotterill added the type/bug Something isn't working label Apr 12, 2024
@kangkaisen
Copy link
Collaborator

We will check and fix it

@jcotterill
Copy link
Author

We will check and fix it

Hi, was there any update on this? Thank you :)

@jcotterill
Copy link
Author

Hi @kangkaisen hope you are well?

Please can you confirm if this was reviewed?

Thanks

@jcotterill
Copy link
Author

Hi @before-Sunrise - please can you confirm if there was any update on this? Thanks 👍

@jcotterill
Copy link
Author

Thank you again for your call today.

Please see the example project created and demonstrated in the call to replicate this problem
https://github.com/jcotterill/StarRocks-MySql-Connector-Issue

@before-Sunrise
Copy link
Contributor

Thank you again for your call today.

Please see the example project created and demonstrated in the call to replicate this problem https://github.com/jcotterill/StarRocks-MySql-Connector-Issue

got it, I will handle it today

@before-Sunrise
Copy link
Contributor

{
"ConnectionStrings": {
"DefaultConnection": "server=127.0.0.1;port=19030;uid=root;pwd=;database=test;TreatTinyAsBoolean=false"
}
}
right now you can skip this problem by set TreatTinyAsBoolean= false, I am checking mysql's behavior to decide whether modify our code

@before-Sunrise
Copy link
Contributor

find out mysql's behavior is litte bit different, which make .net work well, I will fix this problem in tomorrow

@jcotterill
Copy link
Author

Thank you @before-Sunrise. I appreciate the investigation and temporary fix I can confirm this works. Looking forward to the full fix. Thanks again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants