Re: Collation problem when used with "SET NAMES"
Posted by: Peter Gulutzan
Date: July 28, 2006 08:53AM

Changing collation_connection with SET NAMES will affect comparison of

literals.
For example:

mysql> set names utf8;
Query OK, 0 rows affected (0.00 sec)

mysql> select 'Mü' = 'My';
+--------------+
| 'Mü' = 'My' |
+--------------+
| 0 |
+--------------+
1 row in set (0.00 sec)

mysql> set names utf8 collate utf8_swedish_ci;
Query OK, 0 rows affected (0.00 sec)

mysql> select 'Mü' = 'My';
+--------------+
| 'Mü' = 'My' |
+--------------+
| 1 |
+--------------+
1 row in set (0.00 sec)

Your example seems to be selecting from a table.
Therefore the important thing is the column's collation.

Peter Gulutzan
MySQL AB

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Collation problem when used with "SET NAMES"
1591
July 28, 2006 08:53AM


Sorry, you can't reply to this topic. It has been closed.

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.