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

RESET MASTER doesn't completely reset gtid_current_pos

    XMLWordPrintable

Details

    Description

      RESET MASTER mostly resets gtid_current_pos, but it doesn't seem to reset it entirely:

      MariaDB [(none)]> SELECT @@global.gtid_current_pos, @@global.gtid_binlog_pos;
      +---------------------------+--------------------------+
      | @@global.gtid_current_pos | @@global.gtid_binlog_pos |
      +---------------------------+--------------------------+
      | 1-1-29,3-1-99971          | 1-1-29,3-1-99971         |
      +---------------------------+--------------------------+
      1 row in set (0.00 sec)
       
      MariaDB [(none)]> RESET MASTER;
      Query OK, 0 rows affected (0.00 sec)
       
      MariaDB [(none)]> SELECT @@global.gtid_current_pos, @@global.gtid_binlog_pos;
      +---------------------------+--------------------------+
      | @@global.gtid_current_pos | @@global.gtid_binlog_pos |
      +---------------------------+--------------------------+
      | 3-2-54                    |                          |
      +---------------------------+--------------------------+
      1 row in set (0.00 sec)
      

      I don't know where this leftover GTID is from and why it wasn't deleted. It obviously came from another server, since this specific server does not have server_id=2:

      MariaDB [(none)]> SELECT @@global.server_id;
      +--------------------+
      | @@global.server_id |
      +--------------------+
      |                  1 |
      +--------------------+
      1 row in set (0.00 sec)
      

      This server is not currently a slave and it is not currently in a Galera Cluster, so it's not like it could have replicated this transaction after I executed RESET MASTER:

      MariaDB [(none)]> SHOW SLAVE STATUS\G
      Empty set (0.00 sec)
       
      MariaDB [(none)]> SHOW GLOBAL STATUS LIKE 'wsrep%';
      +--------------------------+----------------------+
      | Variable_name            | Value                |
      +--------------------------+----------------------+
      | wsrep_cluster_conf_id    | 18446744073709551615 |
      | wsrep_cluster_size       | 0                    |
      | wsrep_cluster_state_uuid |                      |
      | wsrep_cluster_status     | Disconnected         |
      | wsrep_connected          | OFF                  |
      | wsrep_local_bf_aborts    | 0                    |
      | wsrep_local_index        | 18446744073709551615 |
      | wsrep_provider_name      |                      |
      | wsrep_provider_vendor    |                      |
      | wsrep_provider_version   |                      |
      | wsrep_ready              | OFF                  |
      | wsrep_thread_count       | 0                    |
      +--------------------------+----------------------+
      12 rows in set (0.00 sec)
      

      It seems as though there is a bug in RESET MASTER that prevents it from completely resetting gtid_current_pos.

      Attachments

        Issue Links

          Activity

            People

              Elkin Andrei Elkin
              GeoffMontee Geoff Montee (Inactive)
              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.