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

Federated table with certain charset causes unexpected errors for unrelated queries

    XMLWordPrintable

    Details

      Description

      A federated table can be created with a charset which isn't allowed to be set as client character set, such as ucs2.
      However, when such table exists, further queries fail in an unexpected session – and not only queries involving the table itself, but also seemingly unrelated ones.

      --source include/have_innodb.inc
       
      create table t1 (a int);
      install soname 'ha_federatedx';
      create database fed;
      --eval create table fed.t2 (a int) charset ucs2 engine=federated connection='mysql://root@127.0.0.1:$MASTER_MYPORT/test/t1'
      select * from information_schema.referential_constraints;
      

      On 10.3-10.6 the query from information_schema fails with ER_WRONG_VALUE_FOR_VAR:

      10.3 1e5ebf37

      query 'select * from information_schema.referential_constraints' failed: 1231: Received error: 1231 : Variable 'character_set_client' can't be set to the value of 'ucs2'
      

      On 10.2 it doesn't fail, but causes an even weirder ER_SQL_DISCOVER_ERROR warning:

      10.2 d06205ba

      CONSTRAINT_CATALOG	CONSTRAINT_SCHEMA	CONSTRAINT_NAME	UNIQUE_CONSTRAINT_CATALOG	UNIQUE_CONSTRAINT_SCHEMA	UNIQUE_CONSTRAINT_NAME	MATCH_OPTION	UPDATE_RULE	DELETE_RULE	TABLE_NAME	REFERENCED_TABLE_NAME
      Warnings:
      Warning	1939	Engine PERFORMANCE_SCHEMA failed to discover table `performance_schema`.`accounts` with 'CREATE TABLE accounts(USER CHAR(128) collate utf8_bin default null,HOST CHAR(60) collate utf8_bin default null,CURRENT_CONNECTIONS bigint not null,TOTAL_CONNECTIONS bigint not null)'
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:

                  Git Integration