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

SET changes @@default_master_connection if the explicit connection name is blank

    XMLWordPrintable

Details

    • Can result in unexpected behaviour

    Description

      # Setup
      CHANGE MASTER 'name' TO master_host='127.0.0.1', master_user='root';
      SET @@SESSION.default_master_connection= 'name';
       
      SET @@GLOBAL.`name`.replicate_do_db= 'named';
      SET @@GLOBAL.``.replicate_do_db= 'unnamed';
       
      SELECT @@GLOBAL.name.replicate_do_db; #=> ❌ unnamed
      SELECT @@GLOBAL.``.replicate_do_db; #=> ❌ (empty)
       
      # Cleanup
      RESET SLAVE ALL;
      SET @@SESSION.default_master_connection= '';
      SET @@GLOBAL.replicate_do_db= DEFAULT;
      

      I suspect this is due to the code detecting implicit @@default_master_connection checking a zero length rather than a null pointer.

      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 - 10m
                  10m

                  Git Integration

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