You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
what Dapper/Dapper.StrongName version?
Dapper Version="2.1.24"
what Dapper.AOT/Dapper.Advisor version?
Dapper.AOT Version="1.0.31"
if relevant: what database backend?
MySqlConnector Version="2.3.1"
MySQL 8.2.0
dotnet version
8.0.100
To Reproduce
awaitusingvarconnection=new MySqlConnection(connectionString);long[]longs=[1,2,3];varcomments=await connection.QueryAsync<Comment>("SELECT * FROM comments WHERE id in @ids",new{ ids = longs });
if aot is not enabled, is works well.
however, with aot enabled, it doesn't work.
Unhandled exception. System.NotSupportedException: Parameter type Int64[] is not supported; see https://fl.vu/mysql-param-type. Value: System.Int64[]
at MySqlConnector.MySqlParameter.AppendSqlString(ByteBufferWriter writer, StatementPreparerOptions options) in /_/src/MySqlConnector/MySqlParameter.cs:line 559
at MySqlConnector.Core.StatementPreparer.ParameterSqlParser.DoAppendParameter(Int32 parameterIndex, Int32 textIndex, Int32 textLength) in /_/src/MySqlConnector/Core/StatementPreparer.cs:line 77
at MySqlConnector.Core.StatementPreparer.ParameterSqlParser.OnNamedParameter(Int32 index, Int32 length) in /_/src/MySqlConnector/Core/StatementPreparer.cs:line 65
at MySqlConnector.Core.SqlParser.Parse(String sql) in /_/src/MySqlConnector/Core/SqlParser.cs:line 266
at MySqlConnector.Core.StatementPreparer.ParseAndBindParameters(ByteBufferWriter writer) in /_/src/MySqlConnector/Core/StatementPreparer.cs:line 32
at MySqlConnector.Core.SingleCommandPayloadCreator.WriteCommand(IMySqlCommand command, ByteBufferWriter writer, Boolean appendSemicolon, Boolean isFirstCommand, Boolean isLastCommand) in /_/src/MySqlConnector/Core/SingleCommandPayloadCreator.cs:line 266
at MySqlConnector.Core.SingleCommandPayloadCreator.WriteQueryPayload(IMySqlCommand command, IDictionary`2 cachedProcedures, ByteBufferWriter writer, Boolean appendSemicolon, Boolean isFirstCommand, Boolean isLastCommand) in /_/src/MySqlConnector/Core/SingleCommandPayloadCreator.cs:line 77
at MySqlConnector.Core.SingleCommandPayloadCreator.WriteQueryCommand(CommandListPosition& commandListPosition, IDictionary`2 cachedProcedures, ByteBufferWriter writer, Boolean appendSemicolon) in /_/src/MySqlConnector/Core/SingleCommandPayloadCreator.cs:line 45
at MySqlConnector.Core.CommandExecutor.ExecuteReaderAsync(CommandListPosition commandListPosition, ICommandPayloadCreator payloadCreator, CommandBehavior behavior, Activity activity, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/CommandExecutor.cs:line 44
at MySqlConnector.MySqlCommand.ExecuteReaderAsync(CommandBehavior behavior, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlCommand.cs:line 357
at MySqlConnector.MySqlCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlCommand.cs:line 350
it seems like that the sql string when using aot is like
SELECT id, .... FROM comments WHERE id in ?
rather than
SELECT id, .... FROM comments WHERE id in (?, ?, ?)
Expected behavior
in clause of mysql works well like not using aot.
The text was updated successfully, but these errors were encountered:
Describe the bug
wherer in clause of mysql caused exception
Where are you seeing this?
Dapper Version="2.1.24"
Dapper.AOT Version="1.0.31"
MySqlConnector Version="2.3.1"
MySQL 8.2.0
8.0.100
To Reproduce
if aot is not enabled, is works well.
however, with aot enabled, it doesn't work.
it seems like that the sql string when using aot is like
rather than
Expected behavior
in clause of mysql works well like not using aot.
The text was updated successfully, but these errors were encountered: