Bug #3187 query "SELECT SUBSTRING_INDEX(USER(),"@",1);" from manual caused error
Submitted: 16 Mar 2004 3:00 Modified: 22 Mar 2004 8:55
Reporter: Victor Vagin Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:4.1 OS:
Assigned to: Paul DuBois CPU Architecture:Any

[16 Mar 2004 3:00] Victor Vagin
There is the fragment of manual(http://www.mysql.com/doc/en/Information_functions.html):

>You can extract just the username part, regardless of whether the value >includes a hostname part, like this: 
>        -> 'davida'

but my system says:

mysql> select substring_index(user(),"@",1);
ERROR 1267 (HY000): Illegal mix of collations (utf8_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation 'substr_index'

How to repeat:
select substring_index(user(),"@",1);

Suggested fix:
change manual to 
select substring_index(user(),_utf8"@",1);
[22 Mar 2004 8:55] Paul DuBois
Thank you for your bug report. This issue has been addressed in the
documentation. The updated documentation will appear on our website
shortly, and will be included in the next release of the relevant