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

START SLAVE UNTIL allows CHANGE MASTER TO options

Details

    • Q3/2025 Maintenance

    Description

      When using START SLAVE UNTIL, the UNTIL grammar rule uses master_file_def (through slave_until_opts), which is also used by CHANGE MASTER TO. This means that a START SLAVE UNTIL statement can use any option available to the master_file_def rule (e.g. master_use_gtid, master_demote_to_slave), despite not being valid for START SLAVE. For example:

      START SLAVE UNTIL relay_log_file='mariadb-bin.000002', relay_log_pos=50, master_demote_to_slave=1, master_use_gtid=no;
      

      The only constraint is that the master/relay log file/pos have to be set:

              | UNTIL_SYM slave_until_opts
                {
                  LEX *lex=Lex;
                  if (unlikely(((lex->mi.log_file_name || lex->mi.pos) &&
                               (lex->mi.relay_log_name || lex->mi.relay_log_pos)) ||
                               !((lex->mi.log_file_name && lex->mi.pos) ||
                                 (lex->mi.relay_log_name && lex->mi.relay_log_pos))))
                     my_yyabort_error((ER_BAD_SLAVE_UNTIL_COND, MYF(0)));
                }
      

      The valid options for START SLAVE UNTIL should be split from master_file_def to disallow this.

      Attachments

        Activity

          bnestere Brandon Nesterenko created issue -
          bnestere Brandon Nesterenko made changes -
          Field Original Value New Value
          Summary START SLAVE UNTIL uses CHANGE MASTER TO syntax START SLAVE UNTIL uses CHANGE MASTER TO options
          bnestere Brandon Nesterenko made changes -
          Summary START SLAVE UNTIL uses CHANGE MASTER TO options START SLAVE UNTIL allows CHANGE MASTER TO options
          bnestere Brandon Nesterenko made changes -
          Labels beginner-friendly
          bnestere Brandon Nesterenko made changes -
          Fix Version/s 12.1 [ 29992 ]
          Fix Version/s 12.0 [ 29945 ]
          svoj Sergey Vojtovich made changes -
          Labels beginner-friendly beginner-friendly contribution
          bnestere Brandon Nesterenko made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          bnestere Brandon Nesterenko made changes -
          Status In Progress [ 3 ] In Review [ 10002 ]
          bnestere Brandon Nesterenko made changes -
          Assignee Brandon Nesterenko [ JIRAUSER48702 ] Susil Behera [ JIRAUSER40751 ]
          susil.behera Susil Behera made changes -
          Assignee Susil Behera [ JIRAUSER40751 ] Brandon Nesterenko [ JIRAUSER48702 ]
          susil.behera Susil Behera made changes -
          Assignee Brandon Nesterenko [ JIRAUSER48702 ] Susil Behera [ JIRAUSER40751 ]
          susil.behera Susil Behera made changes -
          Assignee Susil Behera [ JIRAUSER40751 ] Brandon Nesterenko [ JIRAUSER48702 ]
          Status In Review [ 10002 ] Stalled [ 10000 ]
          serg Sergei Golubchik made changes -
          Priority Major [ 3 ] Critical [ 2 ]
          serg Sergei Golubchik made changes -
          Sprint Q3/2025 Maintenance [ 797 ]

          People

            bnestere Brandon Nesterenko
            bnestere Brandon Nesterenko
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.