Bug #107645 | the cast function gets an incorrect result if with wrong encoding | ||
---|---|---|---|
Submitted: | 24 Jun 2022 3:00 | Modified: | 24 Jun 2022 4:51 |
Reporter: | x j | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S3 (Non-critical) |
Version: | 5.7.38, 8.0.29 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[24 Jun 2022 3:00]
x j
[24 Jun 2022 4:51]
MySQL Verification Team
Hello x j, Thank you for the report and test case. regards, Umesh
[28 Jun 2022 13:48]
huahua xu
Hi, There is not any conversion needed wher the cast function converts xxx from binary to other character set. mysql> select convert(0x80 USING utf8mb4); +-----------------------------+ | convert(0x80 USING utf8mb4) | +-----------------------------+ | NULL | +-----------------------------+ mysql> show warnings; +---------+------+----------------------------------------+ | Level | Code | Message | +---------+------+----------------------------------------+ | Warning | 1300 | Invalid utf8mb4 character string: '80' | +---------+------+----------------------------------------+ the convert function is ok for you?