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

Federated table with unavailable remote causes unexpected errors

    XMLWordPrintable

Details

    Description

      When a Federated table is created, access to the remote server is checked.
      However, the remote server can become unavailable later. If it happens, the mere existence of the Federated table referring to it can cause troubles for other queries.

      In the test case below server restart on a different port imitates disappearance of the remote server as it was configured for the Federated table.

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

      On 10.3-10.6 it causes error 2013 upon the query from I_S:

      10.3 1e5ebf37

      query 'select * from information_schema.referential_constraints' failed: 2003: Received error: 2003 : Can't connect to MySQL server on '127.0.0.1' (111 "Connection refused")
      

      On 10.2 it doesn't fail, but causes a strange warning (same as described in MDEV-25823 for 10.2):

      10.2 d06205ba

      select * from information_schema.referential_constraints;
      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

              sanja Oleksandr Byelkin
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.