Mysql 8.0.32 Bug:Cannot convert string from utf8mb4 to binary

mysql 8.0.32版本中对于UNION/UNION ALL 后的结果中的字符串字段过滤筛选不生效,客户端中提示:

Cannot convert string '%\xE4\xB8\x8A\xE6\xB5...' from utf8mb4 to binary

具体描述参见下面的网址:

MySQL Bugs: #110955: Query the union all derived table error: the character set cannot be converted

官方已确认是8.0.32中的一个bug,已在8.0.33版本中修复。

对于8.0.32版本,官方给出的解决方式如下:

set optimizer_switch="derived_condition_pushdown=off";

上述语句在mysql 命令行中执行有可能不生效,可按如下方式执行:

          1. 在mysql 命令行中执行:

             show VARIABLES LIKE '%optimizer_switch%';             

          2. 从结果中拷贝optimize_switch的值,将其中的derived_condition_pushdown属性值修改为off后执行           

              set optimizer_switch="……,derived_condition_pushdown=off";

 

         

 

 

 

posted on 2023-05-09 22:06  Jasteen  阅读(2889)  评论(2)    收藏  举报

导航