SET STATEMENT character_set_client, character_set_connection, character_set_filesystem have no effect
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.6 |
Triaged
|
Medium
|
Unassigned | |||
5.7 |
Triaged
|
Medium
|
Unassigned |
Bug Description
MySQL [test]> set names utf8;
Query OK, 0 rows affected (0.00 sec)
MySQL [test]> select 'фи';
+------+
| фи |
+------+
| фи |
+------+
1 row in set (0.00 sec)
MySQL [test]> set statement character_
+------+
| фи |
+------+
| фи |
+------+
1 row in set (0.00 sec)
# Compare with:
MySQL [test]> set character_
Query OK, 0 rows affected (0.00 sec)
MySQL [test]> select 'фи';
+----------+
| Ñи |
+----------+
| Ñи |
+----------+
1 row in set (0.00 sec)
#------
MySQL [test]> set names utf8;
Query OK, 0 rows affected (0.00 sec)
MySQL [test]> select 'фи';
+------+
| фи |
+------+
| фи |
+------+
1 row in set (0.01 sec)
MySQL [test]> set statement CHARACTER_
+------+
| фи |
+------+
| фи |
+------+
1 row in set (0.00 sec)
# Compare with:
MySQL [test]> set character_
Query OK, 0 rows affected (0.00 sec)
MySQL [test]> select 'фи';
+----+
| ?? |
+----+
| ?? |
+----+
1 row in set (0.00 sec)
#------
MySQL [test]> set names utf8;
Query OK, 0 rows affected (0.00 sec)
MySQL [test]> system touch 'файл';
MySQL [test]> create table tmp (i int);
Query OK, 0 rows affected (0.64 sec)
MySQL [test]> set statement CHARACTER_
Query OK, 0 rows affected (0.00 sec)
Records: 0 Deleted: 0 Skipped: 0 Warnings: 0
# Compare with:
MySQL [test]> set character_
Query OK, 0 rows affected (0.00 sec)
MySQL [test]> load data local infile 'файл' into table tmp;
ERROR 2 (HY000): File '????' not found (Errcode: 2)
summary: |
- SET STATEMENT character_set_client has no effect + SET STATEMENT character_set_client, character_set_connection have no + effect |
description: | updated |
summary: |
- SET STATEMENT character_set_client, character_set_connection have no - effect + SET STATEMENT character_set_client, character_set_connection, + character_set_filesystem have no effect |
description: | updated |
tags: | added: set-statement |
This is easy to confirm:
[openxs@centos ~]$ mysql -uroot test
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.21-70.0 Percona Server (GPL), Release 70.0, Revision 688
Copyright (c) 2009-2014 Percona LLC and/or its affiliates
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> set names utf8;
Query OK, 0 rows affected (0.00 sec)
mysql> select 'фи';
+------+
| фи |
+------+
| фи |
+------+
1 row in set (0.00 sec)
mysql> set statement character_ set_client = latin5 for select 'фи';
+------+
| фи |
+------+
| фи |
+------+
1 row in set (0.00 sec)
mysql> set character_ set_client = latin5;
Query OK, 0 rows affected (0.00 sec)
mysql> select 'фи';
+----------+
| �и |
+----------+
| �и |
+----------+
1 row in set (0.00 sec)