Calling SP hangs when closing connection

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
LarsOberg
Posts: 41
Joined: Tue 11 Oct 2005 18:45

Calling SP hangs when closing connection

Post by LarsOberg » Thu 03 Nov 2011 00:43

When calling a MySQL stored procedure that returns a recordset and having pooling=false, connection.close() hangs until command timeout reached. My DevArt.Data.MySQL version is 5.40.37.0, but I tested with the latest version and the same thing happens. I have tried with two different MySQL servers (one running 5.5.9 and one running 5.5.11) - same result. I have tried with and without command parameters, again same result.

I just tested with MySQL's Connector/Net and it works fine.

Code: Select all

using (var conn = new MySqlConnection("server=192.168.1.9; port=3306; user id=joe; password='...'; database=Test; pooling=false"))
    {
        conn.Open();
        using (var cmd = new MySqlCommand("call test()", conn))
        {
            cmd.CommandType = System.Data.CommandType.Text;
            cmd.CommandTimeout = 300;

            MySqlDataReader dataReader = cmd.ExecuteReader();
            while (dataReader.Read())
            {
                Console.WriteLine(String.Format("{0}", dataReader.GetValue(0)));
            }

            dataReader.Close();
            dataReader.Dispose();
        }
        conn.Close(); // <-- Hangs until command timeout reached.
    }
The SP:

Code: Select all

select * from Test.Item limit 2;
If I do not execute SPs, but just do SELECT statements, everything works fine.

Please advise.

Thanks,
Lars

Ps. The reason I turned off pooling was to debug a similar problem where ExecuteReader intermittently hangs until command timeout reached (again, only when calling an SP returning a recordset).

Pinturiccio
Devart Team
Posts: 2192
Joined: Wed 02 Nov 2011 09:44

Post by Pinturiccio » Thu 03 Nov 2011 12:46

Thank you for your report. We reproduced your issue. We will investigate the issue and notify you about the results.

Pinturiccio
Devart Team
Posts: 2192
Joined: Wed 02 Nov 2011 09:44

Post by Pinturiccio » Fri 04 Nov 2011 11:14

The bug with freezing of a connection that is not taken from the connection pool when using stored procedure is fixed. We will post here when the corresponding build of dotConnect for MySQL is available for download.
Last edited by Pinturiccio on Wed 09 Nov 2011 08:52, edited 1 time in total.

LarsOberg
Posts: 41
Joined: Tue 11 Oct 2005 18:45

Post by LarsOberg » Fri 04 Nov 2011 14:13

Thanks. When do you estimate this will be available for download?

Pinturiccio
Devart Team
Posts: 2192
Joined: Wed 02 Nov 2011 09:44

Post by Pinturiccio » Fri 04 Nov 2011 15:00

We are planning to release a new build next week

Pinturiccio
Devart Team
Posts: 2192
Joined: Wed 02 Nov 2011 09:44

Post by Pinturiccio » Fri 11 Nov 2011 14:20

New build of dotConnect for MySQL 6.50.244 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://www.devart.com/forums/viewtopic.php?t=22546

Post Reply