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: | |
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
[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.