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

Odd behavior of character_set variables set to utf16 (when allowed)

    XMLWordPrintable

Details

    Description

      character_set_client isn't allowed to be set to utf16; but some other character_set_xxx variables are, and it can cause strange effects:

      10.5 24ed08c3

      MariaDB [test]> select @@character_set_connection;
      +----------------------------+
      | @@character_set_connection |
      +----------------------------+
      | utf8                       |
      +----------------------------+
      1 row in set (0.003 sec)
       
      MariaDB [test]> set tx_isolation= 'READ-COMMITTED';
      Query OK, 0 rows affected (0.000 sec)
       
      MariaDB [test]> set character_set_connection=utf16;
      Query OK, 0 rows affected (0.000 sec)
       
      MariaDB [test]> set tx_isolation= 'READ-COMMITTED';
      ERROR 1231 (42000): Variable 'tx_isolation' can't be set to the value of 'READ-COMMITTED'
      

      or

      MariaDB [test]> select @@character_set_filesystem, @@character_set_connection;
      +----------------------------+----------------------------+
      | @@character_set_filesystem | @@character_set_connection |
      +----------------------------+----------------------------+
      | binary                     | utf8                       |
      +----------------------------+----------------------------+
      1 row in set (0.000 sec)
       
      MariaDB [test]> load data infile 'x' into table t1;
      Query OK, 0 rows affected (0.000 sec)                
      Records: 0  Deleted: 0  Skipped: 0  Warnings: 0
       
      MariaDB [test]> set character_set_filesystem= utf16;
      Query OK, 0 rows affected (0.000 sec)
       
      MariaDB [test]> load data infile 'x' into table t1;
      ERROR 1085 (HY000): The file '/data/bld/10.5-debug-nightly/data/test/' must be in the database directory or be readable by all
       
      MariaDB [test]> set character_set_filesystem= utf8;
      Query OK, 0 rows affected (0.000 sec)
       
      MariaDB [test]> load data infile 'x' into table t1;
      Query OK, 0 rows affected (0.000 sec)                
      Records: 0  Deleted: 0  Skipped: 0  Warnings: 0
      

      Attachments

        Activity

          People

            bar Alexander Barkov
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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