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

REPLICATION MASTER ADMIN is missing in root account after upgrade

    XMLWordPrintable

Details

    Description

      If I run this mtr test:

      -- source include/mysql_upgrade_preparation.inc
      -- source include/have_working_dns.inc
      -- source include/have_innodb.inc
      -- source include/have_partition.inc
      let $MYSQLD_DATADIR= `select @@datadir`;
       
      --source include/switch_to_mysql_user.inc
      DROP VIEW mysql.user_bak;
      FLUSH PRIVILEGES;
      SHOW GRANTS FOR root@localhost;
       
      --echo # mysql_upgrade --force --silent 2>&1
      --exec $MYSQL_UPGRADE --force --silent 2>&1
      --remove_file $MYSQLD_DATADIR/mysql_upgrade_info
      FLUSH PRIVILEGES;
      SHOW GRANTS FOR root@localhost;
       
      DROP TABLE mysql.global_priv;
      RENAME TABLE mysql.global_priv_bak TO mysql.global_priv;
      FLUSH PRIVILEGES;
      SHOW GRANTS FOR root@localhost;
      

      it produces the following output:

      DROP VIEW mysql.user_bak;
      FLUSH PRIVILEGES;
      SHOW GRANTS FOR root@localhost;
      Grants for root@localhost
      GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION
      GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION
      

      # mysql_upgrade --force --silent 2>&1
      FLUSH PRIVILEGES;
      SHOW GRANTS FOR root@localhost;
      Grants for root@localhost
      GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, BINLOG ADMIN, BINLOG REPLAY ON *.* TO `root`@`localhost` WITH GRANT OPTION
      GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION
      DROP TABLE mysql.global_priv;
      

      RENAME TABLE mysql.global_priv_bak TO mysql.global_priv;
      FLUSH PRIVILEGES;
      SHOW GRANTS FOR root@localhost;
      Grants for root@localhost
      GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION
      GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION
      

      Notice, the user root@localhost has ALL PRIVILEGES before the upgrade, but it misses the REPLICATION MASTER ADMIN after the upgrade.

      Looks wrong. REPLICATION MASTER ADMIN should be automatically granted somehow.

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.