InvalidProgramException: "Common Language Runtime detected an invalid program. (Dapper version:1.60.6)
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 18.4k
- Forks
- 3.7k
- Avg merge
- 5h 8m
- Merged PRs (30d)
- 1
Description
2024-10-17 13:54:41,154 [39] INFO Core.ORM.MySqlAdapter - Connection Opened:
2024-10-17 13:54:41,155 [39] INFO Core.ORM.MySqlAdapter - Start Connection Execute with: CREATE TEMPORARY TABLE TmpIn_CMM_Role_Pages_6541bc52679842279c38e65b978d250b SELECT RoleID , PageName , USER_ACCESS , ADD_ACCESS , EDIT_ACCESS , DELETE_ACCESS , EXPORT_ACCESS , LAST_CHANGED_BY , LAST_CHANGED_ON FROM CMM_Role_Pages target LIMIT 0;:
2024-10-17 13:54:41,160 [39] ERROR Core.ORM.MySqlAdapter - Catch 2: System.InvalidProgramException: Common Language Runtime detected an invalid program.
at MySqlConnector.MySqlCommand.ExecuteNonQueryAsync(IOBehavior ioBehavior, CancellationToken cancellationToken)
at MySqlConnector.MySqlCommand.ExecuteNonQuery() in /_/src/MySqlConnector/MySqlCommand.cs:line 108
at Dapper.SqlMapper.ExecuteCommand(IDbConnection cnn, CommandDefinition& command, Action2 paramReader) in C:\projects\dapper\Dapper\SqlMapper.cs:line 2827
at Dapper.SqlMapper.ExecuteImpl(IDbConnection cnn, CommandDefinition& command) in C:\projects\dapper\Dapper\SqlMapper.cs:line 570
at Core.ORM.MySqlAdapter.BulkUpsert[T](IDbConnection connection, IDbTransaction transaction, IEnumerable1 data, String tableName, Type type, Int32 bulkCopyTimeout, Nullable1 commandTimeout):
2024-10-17 13:54:41,161 [39] ERROR OCM.Utilities.SqlDataAccess - ExecuteBulkUpsertQuery:System.InvalidProgramException: Common Language Runtime detected an invalid program.
at MySqlConnector.MySqlCommand.ExecuteNonQueryAsync(IOBehavior ioBehavior, CancellationToken cancellationToken)
at MySqlConnector.MySqlCommand.ExecuteNonQuery() in /_/src/MySqlConnector/MySqlCommand.cs:line 108
at Dapper.SqlMapper.ExecuteCommand(IDbConnection cnn, CommandDefinition& command, Action2 paramReader) in C:\projects\dapper\Dapper\SqlMapper.cs:line 2827
at Dapper.SqlMapper.ExecuteImpl(IDbConnection cnn, CommandDefinition& command) in C:\projects\dapper\Dapper\SqlMapper.cs:line 570
at Core.ORM.MySqlAdapter.BulkUpsert[T](IDbConnection connection, IDbTransaction transaction, IEnumerable1 data, String tableName, Type type, Int32 bulkCopyTimeout, Nullable1 commandTimeout)
at Core.ORM.DapperExtensions.BulkUpsert[T](IDbConnection connection, IEnumerable1 data, IDbTransaction transaction, Int32 batchSize, Int32 bulkCopyTimeout, Nullable1 commandTimeout)
at OCM.Utilities.SqlDataAccess.ExecuteBulkUpsertQuery[T](IEnumerable`1 obj)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reported call path through MySqlConnector.MySqlCommand.ExecuteNonQuery, Dapper/SqlMapper.cs lines 2827 and 570, and the CREATE TEMPORARY TABLE statement in the report. Reproduce the InvalidProgramException with the stated Dapper version and MySQL command, then document the cause and verify a regression test or confirmed fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, mysql, sql
- Domain
- backend, database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100