Bug #99480 | char* UDF returning hexadecimal string rather than string | ||
---|---|---|---|
Submitted: | 7 May 2020 16:45 | Modified: | 8 May 2020 20:06 |
Reporter: | Luciano Nicastro | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Command-line Clients | Severity: | S1 (Critical) |
Version: | 8.0.20 | OS: | Ubuntu (18.04.4) |
Assigned to: | CPU Architecture: | x86 | |
Tags: | udf, UNHEX |
[7 May 2020 16:45]
Luciano Nicastro
[8 May 2020 10:22]
MySQL Verification Team
Could it be a client thing? If you using a 5.7 client, does it return expected result. In 8.0 client, type "status" and see this: Binary data as: Hexadecimal Then run with --column-type-info and you'll see the outputs are having BINARY collation and flagged as BINARY. So, in MySQL 8.0 client, run it like: mysql --binary-as-hex=0 and see if it solves this
[8 May 2020 11:07]
Luciano Nicastro
Thanks! I confirm that invoking the client with "--binary-as-hex=0" fixes things. I had missed this (for me) crucial change! I should have read https://dev.mysql.com/doc/refman/8.0/en/mysql-command-options.html where it is documented that "--binary-as-hex=1" is the default as of MySQL 8.0.19! Still I could not have guessed easily that a "char*" function is affected by that. Would it be the case to report the info in the UDFs documentation section? Still not sure what's the logic behind it. Thanks again.