Bug #6519 UNION with collation binary and latin1_swedish_ci fails now
Submitted: 9 Nov 2004 12:08 Modified: 1 Apr 2005 21:01
Reporter: Matthias Leich Email Updates:
Status: Closed Impact on me:
Category:MySQL Server Severity:S2 (Serious)
Version:5.0 OS:
Assigned to: Alexander Barkov

[9 Nov 2004 12:08] Matthias Leich
I have an SELECT which fails since ~ 6.11.2004 in MySQL 5.0.
set @got_val:= 6;
SELECT concat('VALUE of @got_val is: ', @got_val)
UNION SELECT 'some text' ;
ERROR HY000: Illegal mix of collations for operation 'UNION'

The result/content of concat and the string with UNION part2
have different collations:
SELECT COLLATION( concat('VALUE of @got_val is: ', @got_val));
COLLATION( concat('VALUE of @got_val is: ', @got_val))
SELECT COLLATION('some text');
COLLATION('some text')

But it would be fine if my SELECT ... UNION SELECT ... 
would be successful like in history.

My environment:
   - Intel PC with Linux(SuSE 9.1)
   - MySQL 5.0 compiled from source
        last ChangeSet@1.1636, 2004-11-08

How to repeat:
please use the statements above
[10 Nov 2004 15:12] Victoria Reznichenko
Can't repeat it with latest 4.1
[10 Nov 2004 15:36] Matthias Leich
Please repeat with fresh version 5.0 (last Changeset > 2004-11-05)
[28 Mar 2005 9:20] 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:

[31 Mar 2005 5:21] Alexander Barkov
Fixed in 4.1.11 and 5.0.4.
[1 Apr 2005 21:01] Paul Dubois
Noted in 4.1.11, 5.0.4 changelogs.