Bug #49959 Column Defined as VarChar(36) automatically treated as GUID.
Submitted: 28 Dec 2009 13:58 Modified: 1 Feb 2010 9:45
Reporter: Jeffrey Lanham Email Updates:
Status: Not a Bug Impact on me:
None 
Category:Connector / NET Severity:S2 (Serious)
Version:6.2.2 OS:Windows (2003)
Assigned to: CPU Architecture:Any
Tags: Guid, Varchar(36)

[28 Dec 2009 13:58] Jeffrey Lanham
Description:
If you have a column defined as varchar(36) the connector automatically treats the field contents as a guid and tries to apply guid constraints even if not a guid.

How to repeat:
Create a table with a column that is varchar(36) and fill with non-guid data.  Read from the table.  It will error out saying that a guid must be 36 characters with '-'.  

Suggested fix:
Only fix that I've found without changing the column size is to turn Old Guids=true.
[1 Feb 2010 9:45] Tonci Grgin
Hi Jeffrey and thanks for your report.

I presume you're using UTF8 thus your question relates to changelog entry:
For some character sets such as UTF-8, a CHAR column would sometimes be incorrectly interpreted as a GUID by MySQL Connector/NET.
MySQL Connector/NET was changed so that a column would only be interpreted as a GUID if it had a character length of 36, as opposed to a byte length of 36. (Bug#47985).

As for the rest of your questions, I'll quote Reggie (Bug#44986):
We will be changing from binary(16) to binary(36) so that users can use the sql function UUID() to populate those columns. We will maintain binary(16) support using a connection string option that we will eventually deprecate.
and
Columns that are to hold guids should be not char(36) binary but rather just char(36). Please try the columns as non-binary. (Bug#48417)

So, since you did not provide any test case nor actual table structure I guess your field is defined as (VAR)CHAR(36) BINARY, right? If so, loose BINARY or use oldguids=true as this is the only way. Please understand we *had* to choose some type to mimic GUID as well as we had to choose some type (tyniint(1)) to mimic BOOL.