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
The following code throws a SocketException that obscures the real exception (MySqlException: Got a packet bigger than 'max_allowed_packet' bytes):
usingvarconnection=newMySqlConnection(ConnectionString);connection.Open();usingvartransaction=connection.BeginTransaction();connection.Execute("insert into bigblobs(`data`) values(@data);",new{data=newbyte[LARGE_NUMBER]},transaction);
The exception that's thrown is:
Unhandled exception. System.Net.Sockets.SocketException (10053): An established connection was aborted by the software in your host machine.
at System.Net.Sockets.Socket.Send(ReadOnlySpan`1 buffer, SocketFlags socketFlags)
at MySqlConnector.Utilities.SocketExtensions.Send(Socket socket, ReadOnlyMemory`1 data, SocketFlags flags) in C:\Code\MySql\MySqlConnector\src\MySqlConnector\Utilities\SocketExtensions.cs:line 40
at MySqlConnector.Protocol.Serialization.SocketByteHandler.WriteBytesAsync(ReadOnlyMemory`1 data, IOBehavior ioBehavior) in C:\Code\MySql\MySqlConnector\src\MySqlConnector\Protocol\Serialization\SocketByteHandler.cs:line 115
--- End of stack trace from previous location ---
at MySqlConnector.Protocol.Serialization.ProtocolUtility.<WritePacketAsync>g__WritePacketAsyncAwaited|8_0(ValueTask`1 task_, Byte[] buffer_) in C:\Code\MySql\MySqlConnector\src\MySqlConnector\Protocol\Serialization\ProtocolUtility.cs:line 546
at MySqlConnector.Core.ServerSession.SendReplyAsyncAwaited(ValueTask`1 task) in C:\Code\MySql\MySqlConnector\src\MySqlConnector\Core\ServerSession.cs:line 844
at MySqlConnector.Core.CommandExecutor.ExecuteReaderAsync(IReadOnlyList`1 commands, ICommandPayloadCreator payloadCreator, CommandBehavior behavior, IOBehavior ioBehavior, CancellationToken cancellationToken) in C:\Code\MySql\MySqlConnector\src\MySqlConnector\Core\CommandExecutor.cs:line 59
at MySqlConnector.MySqlCommand.ExecuteNonQueryAsync(IOBehavior ioBehavior, CancellationToken cancellationToken) in C:\Code\MySql\MySqlConnector\src\MySqlConnector\MySqlCommand.cs:line 264
at MySqlConnector.MySqlTransaction.DoDisposeAsync(IOBehavior ioBehavior, CancellationToken cancellationToken) in C:\Code\MySql\MySqlConnector\src\MySqlConnector\MySqlTransaction.cs:line 232
at MySqlConnector.MySqlTransaction.Dispose(Boolean disposing) in C:\Code\MySql\MySqlConnector\src\MySqlConnector\MySqlTransaction.cs:line 184
at System.Data.Common.DbTransaction.Dispose()
MySqlTransaction.Dispose should not throw an exception, as it obscures the real exception that's causing the call stack to be unwound.
The text was updated successfully, but these errors were encountered:
The following code throws a
SocketException
that obscures the real exception (MySqlException: Got a packet bigger than 'max_allowed_packet' bytes
):The exception that's thrown is:
MySqlTransaction.Dispose should not throw an exception, as it obscures the real exception that's causing the call stack to be unwound.
The text was updated successfully, but these errors were encountered: