Bug #5458 Calling GetChars on a longtext column throws an exception
Submitted: 8 Sep 2004 3:42 Modified: 8 Sep 2004 21:15
Reporter: James Moore
Status: Closed
Category:Connector/Net Severity:S2 (Serious)
Version:1.0.0 beta OS:Microsoft Windows (Windows XP)
Assigned to: Reggie Burnett Target Version:

[8 Sep 2004 3: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 21: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