Bug #110375 upgrade mysql from 8.0.29 to 8.0.32,union error
Submitted: 15 Mar 2023 10:19 Modified: 15 Mar 2023 11:29
Reporter: caiqinghua cai Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S1 (Critical)
Version:8.0.32 linix-generic OS:Linux
Assigned to: CPU Architecture:Any
Tags: union error

[15 Mar 2023 10:19] caiqinghua cai
Description:
upgrade mysql from 8.0.29 to 8.0.32 with package mysql-8.0.32-linux-glibc2.12-x86_64.tar.xz,
in SQL with union, if there are Chinese characters in the query criteria, the returned query result is incorrect

How to repeat:
select * from 
(select '中国' as corporation 
union all 
select '法国' as corporation ) t  
where t.corporation  like '%中国%'

the result includes both '中国' and '法国' ,but the correct is '中国'
[15 Mar 2023 11:29] MySQL Verification Team
Hello caiqinghua cai,

Thank you for the report and feedback.
Confirmed internally that this is duplicate of Bug #109699, which is fixed in  MySQL Server 8.0.33. Please see Bug #109699 for more details.

regards,
Umesh