Bug #30481 MySqlStream.LoadPacket() hanging
Submitted: 17 Aug 2007 18:02 Modified: 12 Dec 2007 20:35
Reporter: David Thielen Email Updates:
Status: No Feedback Impact on me:
None 
Category:Connector / NET Severity:S1 (Critical)
Version:5.0.7 OS:Windows
Assigned to: CPU Architecture:Any
Tags: loadpacket

[17 Aug 2007 18:02] David Thielen
Description:
I have a test case where iLength = 3485956 in MySqlStream.LoadPacket(). It goes to read that many bytes from the stream and hangs as the server is not sending that many bytes.

The call stack is: 
MySql.Data.dll!MySql.Data.MySqlClient.MySqlStream.LoadPacket() Line 195 C# 
MySql.Data.dll!MySql.Data.MySqlClient.MySqlStream.OpenPacket() Line 157 + 0x7 bytes C# 
MySql.Data.dll!MySql.Data.MySqlClient.NativeDriver.FetchDataRow(int statementId = -1, int pageSize = 0, int columns = 0) Line 843 + 0xa bytes C# 
MySql.Data.dll!MySql.Data.MySqlClient.NativeDriver.SkipDataRow() Line 591 + 0xe bytes C# 
MySql.Data.dll!MySql.Data.MySqlClient.MySqlDataReader.ClearCurrentResultset() Line 934 + 0x8 bytes C# 
MySql.Data.dll!MySql.Data.MySqlClient.MySqlDataReader.NextResult() Line 816 + 0x8 bytes C# 
MySql.Data.dll!MySql.Data.MySqlClient.MySqlDataReader.Close() Line 178 + 0xc bytes C# 
TestControls.exe!TestControls.Program.Main() Line 25 + 0x8 bytes C# 

How to repeat:
Call this code:
IDbConnection conn = new MySql.Data.MySqlClient.MySqlConnection("server=lumiere;database=yogi;user id=test;password=****;"); 
conn.Open(); 
IDbCommand cmd = conn.CreateCommand(); 
cmd.CommandType = CommandType.Text; 
cmd.CommandText = "select * from defect"; 
DbDataReader dr = (DbDataReader) cmd.ExecuteReader(); 

DataTable schema = dr.GetSchemaTable(); 
dr.Close(); 

The database file is at http://www.windwardreports.com/temp/yogi_db.zip

Suggested fix:
no idea. And not sure if the bug is on the connector or server end.
[12 Nov 2007 20:20] Tonci Grgin
Hi David and thanks for your report. Sorry for the delay in processing.

Could it be that your tables are crashed?

mysql> select * from defect;
ERROR 1033 (HY000): Incorrect information in file: '.\yogi\defect.frm'
mysql>
[12 Nov 2007 20:22] David Thielen
Hi;

I will defer to you as to the cause of the problem. But if it is crashed tables - I do think in that case that loadpacket should return an error rather than never return.

thanks - dave
[12 Nov 2007 20:23] Tonci Grgin
A few more comments:
 - MySQL server version is not noted, I used 5.0.50
 - User test has unknown password (but I guessed it ;-) )
 - It might be a better idea to attach mysqldump of database and my.ini/cnf instead of all the files.
[12 Nov 2007 20:35] Tonci Grgin
David, can you check yogi database for me please? If it's ok from mysql cl client then please attach dump.
[13 Dec 2007 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".