init_gtid_sets

Bug #1657417 reported by zxszcaijin
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
New
Undecided
Unassigned

Bug Description

I read the bug report about https://bugs.mysql.com/bug.php?id=69097, But i have a another probleam about init_gtid_sets.
(from no-gtid evironment to gtid evironment)

when we purge binlogs ,it call function MYSQL_BIN_LOG::purge_logs ,when file remove succes,it call MYSQL_BIN_LOG::init_gtid_sets to update the gtid_purged .
  code:
  for (it= filename_list.begin(); it != filename_list.end(); it++)
    {
      const char *filename= it->c_str();
      DBUG_PRINT("info", ("filename='%s'", filename));
      switch (read_gtids_from_binlog(filename, NULL, lost_gtids,
                                     NULL/* first_gtid */, NULL/* last_gtid */,
                                     sid_map, verify_checksum))
      {
        case ERROR:
        {
          error= 1;
          /*FALLTHROUGH*/
        }
        case GOT_GTIDS:
        {
          goto end;
        }
        case NO_GTIDS:
        {
          /*
            If the binlog_gtid_simple_recovery is enabled, and the
            first binary log does not contain any GTID event, do not
            read any more binary logs, GLOBAL.GTID_PURGED should be
            empty in the case.
          */
          if (binlog_gtid_simple_recovery && !is_relay_log)
          {
            DBUG_ASSERT(lost_gtids->is_empty());
            goto end;
          }
          /*FALLTHROUGH*/
        }
        case GOT_PREVIOUS_GTIDS:
        case TRUNCATED:
        {
          break;
        }
      }
    }

scan all binlog files from offset start to offset end .I thinks just read the header about gtid_previous is ok.

Revision history for this message
zxszcaijin (zxszcaijin) wrote :

The parameter binlog_gtid_simple_recovery is set off.

description: updated
description: updated
description: updated
zxszcaijin (zxszcaijin)
description: updated
description: updated
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-3626

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.