Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-7012

SET STATEMENT character_set_client, character_set_connection, character_set_filesystem, collation_connection have no effect

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Won't Fix
    • N/A
    • 10.1.4
    • OTHER
    • None

    Description

      MariaDB [test]> set names utf8;
      Query OK, 0 rows affected (0.00 sec)
       
      MariaDB [test]> select 'фи';
      +------+
      | фи   |
      +------+
      | фи   |
      +------+
      1 row in set (0.00 sec)
       
      MariaDB [test]> set statement character_set_client = latin5 for select 'фи';
      +------+
      | фи   |
      +------+
      | фи   |
      +------+
      1 row in set (0.00 sec)

      Compare with:

      MariaDB [test]> set character_set_client = latin5;
      Query OK, 0 rows affected (0.00 sec)
       
      MariaDB [test]> select 'фи';
      +----------+
      | фи     |
      +----------+
      | фи     |
      +----------+
      1 row in set (0.00 sec)

      Same for CHARACTER_SET_CONNECTION:

      MariaDB [test]> set names utf8;
      Query OK, 0 rows affected (0.00 sec)
       
      MariaDB [test]> select 'фи';
      +------+
      | фи   |
      +------+
      | фи   |
      +------+
      1 row in set (0.00 sec)
       
      MariaDB [test]> set statement CHARACTER_SET_CONNECTION = latin5 for select 'фи';
      +------+
      | фи   |
      +------+
      | фи   |
      +------+
      1 row in set (0.01 sec)

      MariaDB [test]> set character_set_connection = latin5;
      Query OK, 0 rows affected (0.00 sec)
       
      MariaDB [test]> select 'фи';
      +----+
      | ?? |
      +----+
      | ?? |
      +----+
      1 row in set (0.00 sec)

      Same for CHARACTER_SET_FILESYSTEM:

      MariaDB [test]> set names utf8;
      Query OK, 0 rows affected (0.00 sec)
       
      MariaDB [test]> system touch 'файл';
      MariaDB [test]> create table tmp (i int);
      Query OK, 0 rows affected (0.56 sec)
       
      MariaDB [test]> set statement CHARACTER_SET_FILESYSTEM = latin5 for load data local infile 'файл' into table tmp;
      Query OK, 0 rows affected (0.00 sec)                 
      Records: 0  Deleted: 0  Skipped: 0  Warnings: 0

      MariaDB [test]> set character_set_filesystem = latin5;
      Query OK, 0 rows affected (0.00 sec)
       
      MariaDB [test]> load data local infile 'файл' into table tmp;
      ERROR 2 (HY000): File '????' not found (Errcode: 2)ne

      Same for COLLATION_CONNECTION:

      MariaDB [test]> set names utf8;
      Query OK, 0 rows affected (0.00 sec)
       
      MariaDB [test]> set statement collation_connection = utf8_bin for select 'a' union select 'b' union select 'A' order by 1;
      +---+
      | a |
      +---+
      | a |
      | b |
      +---+
      2 rows in set (0.00 sec)

      MariaDB [test]> set collation_connection = utf8_bin;
      Query OK, 0 rows affected (0.00 sec)
       
      MariaDB [test]> select 'a' union select 'b' union select 'A' order by 1;
      +---+
      | a |
      +---+
      | A |
      | a |
      | b |
      +---+
      3 rows in set (0.00 sec)

      All the same in Percona server.

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.