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

CHANGE MASTER should reject null and line-break bytes

    XMLWordPrintable

Details

    • Unexpected results

    Description

      CHANGE MASTER string option values are stored null-terminated in memory and as plain-text lines on disk.
      This means nulls (\0) and line-breaks (\n) break these formats respectively.
      Since changing those formats is a major refactoring unsuitable for LTS versions, CHANGE MASTER will have to ban these troublemakers.

      MTR Demo

      .test

      --source include/not_embedded.inc # have_replication
       
      CHANGE MASTER TO
        master_host="Don't test with this config, or reloading will error",
        master_ssl_crl='ssl/crl\nssl/crlpath\0garbage';
       
      --let $status_items= Master_SSL_Crl, Master_SSL_Crlpath
      --source include/show_slave_status.inc
       
      --let $restart_parameters= --skip-slave-start
      --source include/restart_mysqld.inc
       
      --source include/show_slave_status.inc
       
      RESET SLAVE ALL; # Cleanup
      

      actual.result

      CHANGE MASTER TO
      master_host="Don't test with this config, or reloading will error",
      master_ssl_crl='ssl/crl\nssl/crlpath\0garbage';
      Master_SSL_Crl = 'ssl/crl
      ssl/crlpath'
      Master_SSL_Crlpath = ''
      # restart: --skip-slave-start
      Master_SSL_Crl = 'ssl/crl'
      Master_SSL_Crlpath = 'ssl/crlpath'
      RESET SLAVE ALL;
      

      Attachments

        Issue Links

          Activity

            People

              ParadoxV5 Jimmy Hú
              ParadoxV5 Jimmy Hú
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 0.5h
                  0.5h

                  Git Integration

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