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:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0 OS:
Assigned to: Alexander Barkov CPU Architecture:Any

[9 Nov 2004 12:08] Matthias Leich
Description:
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))
binary
SELECT COLLATION('some text');
COLLATION('some text')
latin1_swedish_ci

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] MySQL Verification Team
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:

  http://lists.mysql.com/internals/23409
[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.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.039 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.