Bug #37042 SQL Statements return System.Byte[] instead of actual data type.
Submitted: 28 May 2008 15:12 Modified: 28 May 2008 19:14
Reporter: Robert Hood Email Updates:
Status: Not a Bug Impact on me:
None 
Category:Connector / NET Severity:S2 (Serious)
Version:5.1.6 OS:Windows
Assigned to: CPU Architecture:Any
Tags: System.Byte[]

[28 May 2008 15:12] Robert Hood
Description:
Show Create Table statement returns System.Byte[] instead of data.  

How to repeat:
- Create a new MySqlDataAdapter
- Create a new select command
- Set the command text to "SHOW CREATE TABLE xxxx" where "xxxx" is an existing table.
- Open a connection to MySql, version 5.0.41
- Execute DataAdapter.Fill()
- Use Data Visualizer to examine contents of data table.

Suggested fix:
return string data, not System.Byte[]
[28 May 2008 15:37] Reggie Burnett
This is not a bug in the connector.  the server returns the result of some sql statements as a binary type (which is a server bug) but the connector can do nothing about that.  To restore pre-5.1 behavior you can add 'respect binary flags=false' to your connection string but our recommendation is that you use the .GetString() method on the data reader to work around this issue.
[28 May 2008 19:14] Robert Hood
Has or will this bug get fixed in the server?
[30 May 2008 18:52] Reggie Burnett
That I don't know.  We keep insisting it is a bug in the server but most of them keep disagreeing.  Let them know your opinion!