"Juri Shimon" <[EMAIL PROTECTED]> wrote:
> Thanks for reply!
> 
>> >> 1. mysql -u root -e "create database t; show create database t; drop
> database t"
>> >> 2. mysql -u root -e "use_mysql; create database t; show create database
> t; drop database t"
>> >> 1.| t        | CREATE DATABASE `t` /*!40100 DEFAULT CHARACTER SET
> cp1251 */
>> >> 2.| t        | CREATE DATABASE `t` /*!40100 DEFAULT CHARACTER SET
> latin1 */
> 
>> It's not a bug.
>> character_set_database indicates the current database character set.
> 
> May be, it wasn't clear.
> I say:
> when a current database (result of "use ...") in latin1, then "create
> database ..." create database in latin1. But default mysql character set is
> cp1251! Database, IMHO, must be created in DAFAULT charset. And, IMHO, this
> is a bug 8)

Yes. It's a bug. Thanks for report.

> Another things:
> 
> 1. >mysql -u root -e "select SUBSTRING_INDEX(USER(),'@',1)"
> ERROR 1266 at line 1: Illegal mix of collations (utf8_general_ci,IMPLICIT)
> and (
> cp1251_general_ci,COERCIBLE) for operation 'substr_index'

Function USER() has utf8 character set, but '@' has server character set (cp1251).
You can use:

        SELECT SUBSTRING_INDEX(CONVERT(USER() USING cp1251),'@',1);

or

        SELECT SUBSTRING_INDEX(USER(),_utf8'@',1);

> 2. when I create enum fields in cp1251, then "show columns from ..." return
> a '????','????',... while all checks, inserts and so work ok. I don't know,
>    2.1. it's common ciryllic troubles (console in cp866, gui in cp1251)
>    2.2. it's my local troubles (english win 20000 with ciryllic charset)
>    2.3 it's mysql troubles (system charset utf8, mysql charset cp1251). NB.
> in <table>.frm I see all my enums in selected charset. I think, there is
> 'phantom' recharacting utf8->cp1251.

Seems it's related to the
        http://bugs.mysql.com/bug.php?id=2077


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to