Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.7.1
-
Ubuntu 20.04
Description
The new UUID column type accepts input in multiple formats as documented, but always outputs back in the usual 36-character dashed format. This is great for compatibility IMHO.
However, I'm finding that these values don't round-trip correctly if the client has used `mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, "binary");` or more specifically has used `SET character_set_connection = 'binary';`
Under this condition I get the error `ERROR 1292 (22007): Incorrect uuid value: 'c26ae0c4-b071-4058-9044-92042d6740fc' for column `ks_test`.`misctbl`.`uuidfield` at row 1`
Although it is possible to work around by providing the value in the more packed `X'c26ae0c4b0714058904492042d6740fc'` format, I believe this is a bug because no other column type has this behavior. To my knowledge, all other values round-trip in binary charset mode without conversion (which is why my utility uses it) - whatever the SELECT returns will INSERT again.