Bug #10614 MySqlDataReader.Read() expcetion: Index and count must refer to a location with
Submitted: 13 May 2005 8:28 Modified: 1 Jul 2005 6:06
Reporter: [ name withheld ] Email Updates:
Status: No Feedback Impact on me:
None 
Category:Connector / NET Severity:S1 (Critical)
Version:4.0 OS:Windows (XP)
Assigned to: CPU Architecture:Any

[13 May 2005 8:28] [ name withheld ]
Description:
I make use of ByteFX.Data Class Library to connect mysql in .NET application. The table contains 2 mediumblob columns. 
The same method to select some columns from the table. Query 1 without mediumblob column while Query 2 contains mediumblob column.
Query 1 succeed but query 2 failed:
Index and count must refer to a location within the buffer.\r\nParameter name: bytes

SealPicture and SealData are mediumblob columns. Without this 2 column in the select statement, this method works.

The code I wrote:

string sql = "SELECT SealID, SealPicture,SealData,SealType,SealName,SealColor FROM SealInfo WHERE SealID=@SealID"; 
MySqlParameter sealIDParam = new MySqlParameter("@SealID", MySqlDbType.VarChar, 50);
sealIDParam.Value = sealId;

try 
{
       reader = MySqlHelper.ExecuteReader(CONNECTION_STRING, sql, sealIDParam);	
				
      if (reader.Read()) 
     {
               ......
      }

How to repeat:
1. Create a table with mediumblob colum
2. Insert some data
3. Use ByteFX.Data Class Library to read it like what I did in the above description

Suggested fix:
As soon as possible, we will release the product very soon.
[1 Jun 2005 6:06] Vasily Kishkin
Could you please write here sample test case and definition of your table ?
I could't reproduce the bug.
[1 Jul 2005 23: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".