Bug #5599 Using Connector/Net always results in a server error
Submitted: 15 Sep 2004 19:57 Modified: 16 Sep 2004 12:48
Reporter: Josef Goettgens Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S3 (Non-critical)
Version:1.0beta OS:Windows (WinXP Pro)
Assigned to: Reggie Burnett CPU Architecture:Any

[15 Sep 2004 19:57] Josef Goettgens
Description:
While exploring interfacing MySQL vs. 4.020a with the MySQL Connector/Net I found that the server always report an error like:
040915 20:36:59  Aborted connection 79 to db: 'firstdb' user: 'csharp' host: `piii700.localdomain' (Got an error reading communication packets)
It doesn't matter whether I connect to a local server or one on another machine.
Here is a stub of the smallest piece of code that produces the errors:
....
try 
{
    myConnection = new MySqlConnection( myConnectionString );
    myConnection.Open();
} 
catch ( MySqlException e )
{
    Console.WriteLine( e.Message );
}
finally
{
    myConnection.Close();
}
Simple reading from and writing to tables works fine. The error message does not occur when I step through my code with a debugger line by line. It shows up only after the client process has been terminated.

It seems that the error is harmless and it could related to not closing the connection properly when myConnection.Close() gets called. 

How to repeat:
The error message occurs always.
[15 Sep 2004 20:30] Josef Goettgens
I should probably more specific about the connection string:
static String myConnectionString = String.Format( "Database={0};Data Source={1};User Id={2};Password={3};pooling=false", database, datasource, user, pw );
The error occurs regardless of pooling being true or false.
[16 Sep 2004 12:48] Reggie Burnett
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html