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

Populate thread_id of Backward Compatibility Query event

Details

    Description

      For replicas that don't support GTIDs, a MariaDB primary will convert its GTID event into a Query log event with the query BEGIN. This event writes zeroes for the Query log event's thread_id, however, since MDEV-7850, where GTID events were extended with thread_id, we can now populate the thread_id of the generated Query log event with that same value. Note this GTID to Query log event logic happens in function Query_log_event::begin_event (in sql/log_event.cc).

      Note that the inverse (i.e. MySQL Master -> MariaDB Slave (w/ MDEV-7850)) will correctly populate the thread_id of the GTID event using the thread_id of the Query log event, so nothing needs to be done in this case.

      Attachments

        Issue Links

          Activity

            bnestere Brandon Nesterenko created issue -
            bnestere Brandon Nesterenko made changes -
            Field Original Value New Value
            bnestere Brandon Nesterenko made changes -
            Description For replicas that don't support GTIDs, a MariaDB primary will convert its GTID event into a Query log event with the query BEGIN. This event writes zeroes for the Query log event's thread_id, however, since MDEV-7850, where GTID events were extended with thread_id, we can now populate the thread_id of the generated Query log event with that same value. Note this GTID to Query log event logic happens in function Query_log_event::begin_event (in sql/log_event.cc). For replicas that don't support GTIDs, a MariaDB primary will convert its GTID event into a Query log event with the query BEGIN. This event writes zeroes for the Query log event's thread_id, however, since MDEV-7850, where GTID events were extended with thread_id, we can now populate the thread_id of the generated Query log event with that same value. Note this GTID to Query log event logic happens in function Query_log_event::begin_event (in sql/log_event.cc).

            Note that the inverse (i.e. MySQL Master -> MariaDB Slave) will correctly populate the thread_id of the GTID event using the thread_id of the Query log event, so nothing needs to be done in this case.
            bnestere Brandon Nesterenko made changes -
            Description For replicas that don't support GTIDs, a MariaDB primary will convert its GTID event into a Query log event with the query BEGIN. This event writes zeroes for the Query log event's thread_id, however, since MDEV-7850, where GTID events were extended with thread_id, we can now populate the thread_id of the generated Query log event with that same value. Note this GTID to Query log event logic happens in function Query_log_event::begin_event (in sql/log_event.cc).

            Note that the inverse (i.e. MySQL Master -> MariaDB Slave) will correctly populate the thread_id of the GTID event using the thread_id of the Query log event, so nothing needs to be done in this case.
            For replicas that don't support GTIDs, a MariaDB primary will convert its GTID event into a Query log event with the query BEGIN. This event writes zeroes for the Query log event's thread_id, however, since MDEV-7850, where GTID events were extended with thread_id, we can now populate the thread_id of the generated Query log event with that same value. Note this GTID to Query log event logic happens in function Query_log_event::begin_event (in sql/log_event.cc).

            Note that the inverse (i.e. MySQL Master -> MariaDB Slave (w/ MDEV-7850)) will correctly populate the thread_id of the GTID event using the thread_id of the Query log event, so nothing needs to be done in this case.
            bnestere Brandon Nesterenko made changes -
            bnestere Brandon Nesterenko made changes -
            ParadoxV5 Jimmy Hú made changes -
            Assignee Jimmy Hú [ JIRAUSER55761 ]
            ParadoxV5 Jimmy Hú made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            ParadoxV5 Jimmy Hú added a comment - https://github.com/MariaDB/server/pull/3707
            ParadoxV5 Jimmy Hú made changes -
            Assignee Jimmy Hú [ JIRAUSER55761 ] Brandon Nesterenko [ JIRAUSER48702 ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            ParadoxV5 Jimmy Hú made changes -
            Assignee Brandon Nesterenko [ JIRAUSER48702 ] Jimmy Hú [ JIRAUSER55761 ]
            ParadoxV5 Jimmy Hú made changes -
            Status In Review [ 10002 ] Stalled [ 10000 ]
            ParadoxV5 Jimmy Hú made changes -
            Assignee Jimmy Hú [ JIRAUSER55761 ] Brandon Nesterenko [ JIRAUSER48702 ]
            Status Stalled [ 10000 ] In Review [ 10002 ]

            People

              bnestere Brandon Nesterenko
              bnestere Brandon Nesterenko
              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.