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

Add keywords "SQL_BEFORE_GTIDS" and "SQL_AFTER_GTIDS" for START SLAVE UNTIL

    XMLWordPrintable

Details

    Description

      In MariaDB the UNTIL keyword is inclusive.

      "The replica will start replication from the current GTID position, run up to and including the event with the GTID specified, and then stop. "
      https://mariadb.com/kb/en/gtid/#start-slave-until-master_gtid_posxxx

      Keyword UNTIL origin is form imperative languages, where UNTIL is the end condition of a loop.

      Depending from the position of the counter (before or after reply), the UNTIL condition will be processed or not.

      SQL is a declarative language, so the counter position in the loop is hidden, so maybe UNTIL is different implemented in different databases (if used in an SQL-statement, not procedures). Procedures are also based on imperative paradigm.

      So I suggest to add keywords EXCLUSIVE and INCLUSIVE.

      The default would be INCLUSIVE, which is the current MariaDB behaviour.

      Example:

      START SLAVE UNTIL EXCLUSIVE master_gtid_pos = <GTID position>;
      

      Attachments

        Issue Links

          Activity

            People

              bnestere Brandon Nesterenko
              Richard Richard Stracke
              Votes:
              2 Vote for this issue
              Watchers:
              11 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.