System.NullReferenceException: Object reference not set to an instance of an object.
at MySqlConnector.Core.TypeMapper.GetMySqlDbType(String typeName, Boolean unsigned, Int32 length) in /_/src/MySqlConnector/Core/TypeMapper.cs:line 169
at MySqlConnector.Core.CachedParameter..ctor(Int32 ordinalPosition, String mode, String name, String dataType, Boolean unsigned, Int32 length) in /_/src/MySqlConnector/Core/CachedParameter.cs:line 21
at MySqlConnector.Core.CachedProcedure.FillAsync(IOBehavior ioBehavior, MySqlConnection connection, String schema, String component, CancellationToken cancellationToken)
at MySql.Data.MySqlClient.MySqlConnection.GetCachedProcedure(String name, Boolean revalidateMissing, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySql.Data.MySqlClient/MySqlConnection.cs:line 550
at MySqlConnector.Core.CommandExecutor.ExecuteReaderAsync(IReadOnlyList`1 commands, ICommandPayloadCreator payloadCreator, CommandBehavior behavior, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/CommandExecutor.cs:line 39
==== Edit 1 ====
After digging in the source code, i found that CachedProcedure.FillAsync is no longer using DATA_TYPE column from information_schema.parameters, instead it parses the dataType from DTD_IDENTIFIER column. That should be fine, but the parser doesn't seem to handle enum. DTD_IDENTIFIER value for enum parameter should look like this enum('YES','NO').
The text was updated successfully, but these errors were encountered:
NullReferenceException when executing stored procedure with enum as parameter.
Happens on version 0.65 and 0.57. It was fine on version 0.56.
I tried changing the parameter to varchar and it worked on all three versions.
Here's stack trace for version 0.65
==== Edit 1 ====
After digging in the source code, i found that CachedProcedure.FillAsync is no longer using
DATA_TYPE
column frominformation_schema.parameters
, instead it parses the dataType fromDTD_IDENTIFIER
column. That should be fine, but the parser doesn't seem to handle enum.DTD_IDENTIFIER
value for enum parameter should look like thisenum('YES','NO')
.The text was updated successfully, but these errors were encountered: