Bug #6139 UNION doesn't understand collate in the column of second select
Submitted: 18 Oct 2004 10:50 Modified: 18 Oct 2004 13:00
Reporter: Victor Vagin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1 OS:
Assigned to: Alexander Barkov CPU Architecture:Any

[18 Oct 2004 10:50] Victor Vagin
Description:
UNION doesn't understand collate in the column of second select

How to repeat:
mysql> (select _utf8"test" collate utf8_bin) union (select _utf8"TEST") union (select _utf8"TeST");
+------------------------------+
| _utf8"test" collate utf8_bin |
+------------------------------+
| test                         |
| TEST                         |
| TeST                         |
+------------------------------+
3 rows in set (0.05 sec)

mysql> (select _utf8"test") union (select _utf8"TEST"  collate utf8_bin) union (select _utf8"TeST");
+------+
| test |
+------+
| test |
+------+
1 row in set (0.01 sec)

Suggested fix:
I want mysql to give the same result for the second query as for the first query
[18 Oct 2004 13:00] Alexander Barkov
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html