Bug #106928 | Can not restore mysqldump that was taken using charset binary | ||
---|---|---|---|
Submitted: | 6 Apr 2022 11:39 | Modified: | 7 Apr 2022 11:14 |
Reporter: | lalit Choudhary | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: JSON | Severity: | S3 (Non-critical) |
Version: | 5.7 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[6 Apr 2022 11:39]
lalit Choudhary
[6 Apr 2022 11:40]
lalit Choudhary
update
[6 Apr 2022 12:11]
MySQL Verification Team
Hi Mr. Choudhary, Thank you for your bug report. We repeated the behaviour that you reported. We do not know at the moment whether this is a code bug or documentation bug. In our opinion dumping that table should be changed to fail with the error and a message that DDL is required for the purpose. Verified as reported.
[7 Apr 2022 11:14]
lalit Choudhary
another example of when using charset binary, mysql> set names binary; Query OK, 0 rows affected (0.00 sec) mysql> create table foo_json (data json) charset=binary; Query OK, 0 rows affected (0.03 sec) mysql> insert into foo_json values('{"pid": 100, "name": "name0"}'); ERROR 3144 (22032): Cannot create a JSON value from a string with CHARACTER SET 'binary'. mysql> so the question here is whether setting charset=binary for a table with JSON datatype is allowed or not.
[7 Apr 2022 12:22]
MySQL Verification Team
Hi, It should not be allowed, which is why this is a verified bug.