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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: N/A
    • Fix Version/s: 10.1.4
    • Component/s: OTHER
    • Labels:
      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              sanja Oleksandr Byelkin added a comment -

              The variables prohibited as a workaround.

              Show
              sanja Oleksandr Byelkin added a comment - The variables prohibited as a workaround.
              Hide
              sanja Oleksandr Byelkin added a comment -

              Parameters set during parsing so changing variables has no effect.

              Show
              sanja Oleksandr Byelkin added a comment - Parameters set during parsing so changing variables has no effect.
              Hide
              sanja Oleksandr Byelkin added a comment -

              revision-id: 622611bc6a9371803f349d8cf4de6538ebbcdb37
              parent(s): a21ef88d2a358904f0cdf9cadc701cb263b5e317
              committer: Oleksandr Byelkin
              branch nick: server
              timestamp: 2015-03-17 14:40:25 +0100
              message:

              MDEV-7012: SET STATEMENT character_set_client, character_set_connection, character_set_filesystem, collation_connection have no effect

              Variables of simple SET STATEMENT set just after assigning

              (changes in test suite result checked)

              Show
              sanja Oleksandr Byelkin added a comment - revision-id: 622611bc6a9371803f349d8cf4de6538ebbcdb37 parent(s): a21ef88d2a358904f0cdf9cadc701cb263b5e317 committer: Oleksandr Byelkin branch nick: server timestamp: 2015-03-17 14:40:25 +0100 message: MDEV-7012 : SET STATEMENT character_set_client, character_set_connection, character_set_filesystem, collation_connection have no effect Variables of simple SET STATEMENT set just after assigning (changes in test suite result checked) —
              Hide
              sanja Oleksandr Byelkin added a comment -

              It is so tight connected with parser so we will not fix it (variables will be prohibited)

              Show
              sanja Oleksandr Byelkin added a comment - It is so tight connected with parser so we will not fix it (variables will be prohibited)

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved: