Bug #5458 Calling GetChars on a longtext column throws an exception
Submitted: 8 Sep 2004 1:42 Modified: 8 Sep 2004 19:15
Reporter: James Moore Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S2 (Serious)
Version:1.0.0 beta OS:Windows (Windows XP)
Assigned to: Reggie Burnett CPU Architecture:Any

[8 Sep 2004 1:42] James Moore
Description:
A call to GetChars on a longtext column throws an exception.

How to repeat:
Build an IDataReader with a simple select command:

SELECT content from contents where contentid = X

where "content" is a longtext column.

Attempt to read data from the reader using GetChars.  An exception is thrown:

An unhandled exception of type 'MySql.Data.MySqlClient.MySqlException' occurred in mysql.data.dll

Additional information: GetBytes can only be called on binary columns

Note that the method called is GetChars; the exception refers to GetBytes.
[8 Sep 2004 19:15] 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