Bug #15962 | union truncate column composed by concat() | ||
---|---|---|---|
Submitted: | 23 Dec 2005 12:31 | Modified: | 23 Jun 2006 5:01 |
Reporter: | Paolo Alessandroni | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S2 (Serious) |
Version: | 5.0.19-BK, 5.0.17 | OS: | Linux (Linux, WinXP) |
Assigned to: | Evgeny Potemkin | CPU Architecture: | Any |
[23 Dec 2005 12:31]
Paolo Alessandroni
[23 Dec 2005 12:55]
Valeriy Kravchuk
Thank you for a bug report. Verified just as described on 5.0.19-BK (ChangeSet@1.1999, 2005-12-21 18:50:06+01:00) on Linux. UNION ALL gives the same (wrong) result.
[6 Jun 2006 21:11]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/7335
[14 Jun 2006 11:22]
Alexander Barkov
The patch is ok to push.
[19 Jun 2006 0:15]
Evgeny Potemkin
Fixed in 4.1.21, 5.0.23, 5.1.12
[19 Jun 2006 0:20]
Evgeny Potemkin
Sorry, fixed in 5.0 and 5.1 only
[20 Jun 2006 10:51]
Evgeny Potemkin
To calculate its max_length the CONCAT() function is simply sums max_lengths of its arguments but when the collation of an argument differs from the collation of the CONCAT() max_length will be wrong. This may lead to a data truncation when a tmp table is used, in UNIONS for example.
[23 Jun 2006 5:01]
Paul DuBois
Noted in 5.0.23, 5.1.12 changelogs.