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

disallow `set @@session.server_id` within transaction

    XMLWordPrintable

Details

    • Unexpected results

    Description

      Currently the session scope variable is mutable within transaction which
      probably never conceived to this way because is dangerous for replication.
      In particular a transaction can be relay-logged any of its events removed including
      Gtid and Xid events
      which affects overall slave applier behavior, esp in the parallel mode.
      E.g in master server_id=1 and slave server_id 2 the following transaction

      begin; 
      set @@server_id=1; insert into t set a=14; 
      set @@server_id=2; 
      commit /* to end up on slave in I */; 
      
      

      ends up in the slave relay log as a singleton no-gtid event:

      slave-relay-bin.000003 | 688 | Query             |         1 |        1193 | use `test`; insert into t set a=14     
      
      

      Attachments

        Activity

          People

            bnestere Brandon Nesterenko
            Elkin Andrei Elkin
            Brandon Nesterenko Brandon Nesterenko
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 0d
                0d
                Remaining:
                Time Spent - 1.25h Remaining Estimate - 3h
                3h
                Logged:
                Time Spent - 1.25h Remaining Estimate - 3h
                1.25h

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.