Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-253 Multi-source replication
  3. MDEV-554

Multi-source: SHOW RELAYLOG EVENTS doesn't work for named connections

    XMLWordPrintable

    Details

    • Type: Technical task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      SHOW RELAYLOG EVENTS works for a slave with the empty name and its logs, but doesn't work for slaves with non-empty names (even if the name is set as default_master_connection.

      In the test case below, the last two statements return empty lists, while there should be events in the log. If the same test case is run for an empty name instead of 'master1', it works all right.
      The test case is supposed to be run with my.cnf from the multi_source suite. There is no need to add it as a separate file to the suite, because it will be a part of a bigger test (which is why it doesn't have a "cleanup" section).

      cat relaylog_events.test

      --connect (slave,127.0.0.1,root,,,$SERVER_MYPORT_3)
       
      --replace_result $SERVER_MYPORT_1 MYPORT_1
      eval change master 'master1' to
      master_port=$SERVER_MYPORT_1,
      master_host='127.0.0.1',
      master_user='root';
       
      start slave 'master1';
      set default_master_connection = 'master1';
      --source include/wait_for_slave_to_start.inc
       
      --connect (master1,127.0.0.1,root,,,$SERVER_MYPORT_1)
      --disable_warnings
      drop table if exists t1;
      --enable_warnings
      create table t1 (i int) engine=MyISAM;
      --save_master_pos
       
      --connection slave
      --sync_with_master 0,'master1'
       
      --let $datadir = `SELECT @@datadir`
      --list_files $datadir mysqld-relay-bin-master1.*
       
      show relaylog events in 'mysqld-relay-bin-master1.000002';
      show relaylog events;

      End of output:

      mysqld-relay-bin-master1.000001
      mysqld-relay-bin-master1.000002
      show relaylog events in 'mysqld-relay-bin-master1.000002';
      Log_name        Pos     Event_type      Server_id       End_log_pos     Info
      show relaylog events;
      Log_name        Pos     Event_type      Server_id       End_log_pos     Info
      ***Warnings generated in error logs during shutdown after running tests: multi_source.relay

        Attachments

          Activity

            People

            Assignee:
            monty Michael Widenius
            Reporter:
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.