MySQL 5.5, 5.6, and 5.7: Wrong Result With UTF-8 and UNION Between User Variable and Decimal Column
Last updated on MAY 28, 2018
Applies to:MySQL Server - Version 5.5 to 5.7 [Release 5.5 to 5.7]
Information in this document applies to any platform.
In MySQL 5.5, 5.6, or 5.7 using the utf8 or utf8mb4 character set and executing a query that uses a union between a user variable and a decimal value, the result is not correct if the value of the user variable is greater than 99999 (utf8) or 9999 (utf8mb4). For example:
The issue may have started after upgrading to MySQL 5.5 or later or after changing the default character set.
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms