Bug #104840 hex-blob not respected in DDL during mysqldump
Submitted: 6 Sep 12:06 Modified: 7 Sep 15:54
Reporter: Hans Höchtl Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: mysqldump Command-line Client Severity:S2 (Serious)
Version:8.0.26 OS:Any
Assigned to: CPU Architecture:Any
Tags: mysqldump, mysqlpump

[6 Sep 12:06] Hans Höchtl
Description:
Dumping a database with extensive use of binary fields is very complicated, because `--hex-blob` is not respected in the dumped DDL.

How to repeat:
If you have a DDL like:
```
create table category
(
    id                        binary(16)                                                  not null,
    version_id       binary(16)       default 0x0FA91CE3E96A4BC2BE4BD9CE752C3425 not null,
    primary key (id, version_id)
);
```

and then dump with `--hex-blob` you won't get this representation as default value but a binary value which often fails when importing the dump.

Suggested fix:
The argument `--hex-blob` should also respect binary values in the DDL.
[7 Sep 15:54] MySQL Verification Team
Hi,

Thank you for the report.