NullReferenceException during implicit transaction rollback

NullReferenceException during implicit transaction rollback

Postby x86fanboy » Wed 09 Mar 2016 10:32

Hi there!

The following code fragment demonstrates the issue:

using (var connection = new MySqlConnection("host=localhost;port=3306;pooling=true;user=user;pwd=pwd"))
{
connection.Open();
connection.BeginTransaction();
}

System.NullReferenceException Object reference not set to an instance of an object.
at Devart.Data.MySql.au.a(ref Int32 A_0, ref ArrayList A_1, ref ac A_2, ref String A_3)
at Devart.Data.MySql.k.e()
at Devart.Data.MySql.MySqlCommand.InternalExecute(CommandBehavior behavior, IDisposable stmt, Int32 startRecord, Int32 maxRecords)
at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior, Boolean nonQuery)
at Devart.Common.DbCommandBase.ExecuteNonQuery()
at Devart.Data.MySql.MySqlConnection.Rollback()
at Devart.Data.MySql.MySqlTransaction.Dispose(Boolean disposing)
at Devart.Data.MySql.j.k()
at Devart.Common.DbConnectionBase.Close()
at Devart.Data.MySql.MySqlConnection.Close()
at Devart.Data.MySql.MySqlConnection.Dispose(Boolean disposing)
at System.ComponentModel.Component.Dispose()

This does not happen if the transaction is rolled back explicitly.

Version: dotConnect.Express.for.MySQL.8.4.602
x86fanboy
 
Posts: 2
Joined: Tue 08 Mar 2016 09:22

Re: NullReferenceException during implicit transaction rollback

Postby Pinturiccio » Thu 10 Mar 2016 09:43

We have reproduced the issue. We will investigate it and post here about the results as soon as possible.
Pinturiccio
Devart Team
 
Posts: 1869
Joined: Wed 02 Nov 2011 09:44

Re: NullReferenceException during implicit transaction rollback

Postby x86fanboy » Thu 10 Mar 2016 12:52

Great, thanks!
x86fanboy
 
Posts: 2
Joined: Tue 08 Mar 2016 09:22

Re: NullReferenceException during implicit transaction rollback

Postby Pinturiccio » Wed 25 May 2016 08:44

We have fixed the bug with throwing NRE when a transaction associated with a connection is not closed, and the connection is implicitly closed. We will post here when the corresponding build of dotConnect for MySQL is available for download.
Pinturiccio
Devart Team
 
Posts: 1869
Joined: Wed 02 Nov 2011 09:44

Re: NullReferenceException during implicit transaction rollback

Postby Pinturiccio » Fri 27 May 2016 12:55

New build of dotConnect for MySQL 8.5.658 is available for download now!
It can be downloaded from http://www.devart.com/dotconnect/mysql/download.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?t=33729
Pinturiccio
Devart Team
 
Posts: 1869
Joined: Wed 02 Nov 2011 09:44


Return to dotConnect for MySQL