Bug #31555 | IFNULL(some_field, 123) doesn't convert charset from UTF8 | ||
---|---|---|---|
Submitted: | 12 Oct 2007 8:07 | Modified: | 21 Jun 2010 7:48 |
Reporter: | Vladimir Turov | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Charsets | Severity: | S3 (Non-critical) |
Version: | 5.0.27, 4.1, 5.0, 5.1, 5.2 BK | OS: | Any |
Assigned to: | Alexander Barkov | CPU Architecture: | Any |
Tags: | ifnull, utf8 |
[12 Oct 2007 8:07]
Vladimir Turov
[15 Oct 2007 11:37]
Sveta Smirnova
Thank you for the report. Verified as described.
[17 Jan 2008 11:20]
Vladimir Turov
The same we have if trying to use CONCAT() when some fields to cancat have (at least) bigint type. This will return value in UTF8 with no look at the connection's charset: SELECT CONCAT(varchar_field_1, varchar_field_2, ..., bigint_field, ...) FROM some_table;
[30 Jan 2008 20:01]
Omer Barnir
Workaround: Use CONVERT in the select statement e.g. CONVERT(expr USING cp866)
[4 Dec 2008 11:31]
Alexander Barkov
Another workaround: Use CAST in the select statement e.g. CAST(expr AS CHAR)
[21 Jun 2010 7:48]
Alexander Barkov
Fixed in MySQL-5.5. For details see: http://forge.mysql.com/worklog/task.php?id=2649