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

mysql_upgrade creating empty global_priv table

Details

    Description

      When upgrading from 10.3, running mysql_upgrade on user table with ~15 records empty global_priv table is created, server is unusable, nobody cant connect without skip-grant-tables.

      No errors shown by mysql_upgrade output:

      root /var/lib # /usr/local/mariadb/bin/mysql_upgrade -v -v -s -p
      Enter password: 
      Looking for 'mysql' as: /usr/local/mariadb/bin/mysql
      Looking for 'mysqlcheck' as: /usr/local/mariadb/bin/mysqlcheck
      The --upgrade-system-tables option was used, user tables won't be touched.
      Phase 1/7: Checking and upgrading mysql database
      Running 'mysqlcheck' with connection arguments: --port='3306' --socket='/var/run/mysqld/mysqld.sock' 
      # Connecting to localhost...
      # Disconnecting from localhost...
      Processing databases
      mysql
      mysql.column_stats                                 OK
      mysql.columns_priv                                 OK
      mysql.db                                           OK
      mysql.event                                        OK
      mysql.func                                         OK
      mysql.gtid_slave_pos                               OK
      mysql.help_category                                OK
      mysql.help_keyword                                 OK
      mysql.help_relation                                OK
      mysql.help_topic                                   OK
      mysql.host                                         OK
      mysql.index_stats                                  OK
      mysql.plugin                                       OK
      mysql.proc                                         OK
      mysql.procs_priv                                   OK
      mysql.proxies_priv                                 OK
      mysql.roles_mapping                                OK
      mysql.servers                                      OK
      mysql.table_stats                                  OK
      mysql.tables_priv                                  OK
      mysql.time_zone                                    OK
      mysql.time_zone_leap_second                        OK
      mysql.time_zone_name                               OK
      mysql.time_zone_transition                         OK
      mysql.time_zone_transition_type                    OK
      mysql.user                                         OK
      Phase 2/7: Installing used storage engines... Skipped
      Phase 3/7: Fixing views... Skipped
      Phase 4/7: Running 'mysql_fix_privilege_tables'
      Phase 5/7: Fixing table and database names ... Skipped
      Phase 6/7: Checking and upgrading tables... Skipped
      Phase 7/7: Running 'FLUSH PRIVILEGES'
      OK
      root /var/lib # mysql.server restart
      Shutting down MySQL. SUCCESS! 
      Starting MySQL. SUCCESS! 
      

      MariaDB [mysql]> select * from global_priv;
      Empty set (0.002 sec)
      

      Attachments

        Issue Links

          Activity

            Lulu Lulu created issue -
            elenst Elena Stepanova made changes -
            Field Original Value New Value
            Labels need_feedback
            Lulu Lulu made changes -
            Attachment mdbX.log [ 50119 ]
            elenst Elena Stepanova made changes -
            Labels need_feedback
            elenst Elena Stepanova made changes -
            Labels need_feedback
            elenst Elena Stepanova made changes -
            Labels need_feedback
            elenst Elena Stepanova made changes -
            Priority Blocker [ 1 ] Major [ 3 ]
            elenst Elena Stepanova made changes -
            Fix Version/s 10.4 [ 22408 ]
            Assignee Sergei Golubchik [ serg ]
            serg Sergei Golubchik made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            serg Sergei Golubchik made changes -
            Description When upgrading from 10.3, running mysql_upgrade on user table with ~15 records empty global_priv table is created, server is unusable, nobody cant connect without skip-grant-tables.

            No errors shown by mysql_upgrade output:
            root /var/lib # /usr/local/mariadb/bin/mysql_upgrade -v -v -s -p
            Enter password:
            Looking for 'mysql' as: /usr/local/mariadb/bin/mysql
            Looking for 'mysqlcheck' as: /usr/local/mariadb/bin/mysqlcheck
            The --upgrade-system-tables option was used, user tables won't be touched.
            Phase 1/7: Checking and upgrading mysql database
            Running 'mysqlcheck' with connection arguments: --port='3306' --socket='/var/run/mysqld/mysqld.sock'
            # Connecting to localhost...
            # Disconnecting from localhost...
            Processing databases
            mysql
            mysql.column_stats OK
            mysql.columns_priv OK
            mysql.db OK
            mysql.event OK
            mysql.func OK
            mysql.gtid_slave_pos OK
            mysql.help_category OK
            mysql.help_keyword OK
            mysql.help_relation OK
            mysql.help_topic OK
            mysql.host OK
            mysql.index_stats OK
            mysql.plugin OK
            mysql.proc OK
            mysql.procs_priv OK
            mysql.proxies_priv OK
            mysql.roles_mapping OK
            mysql.servers OK
            mysql.table_stats OK
            mysql.tables_priv OK
            mysql.time_zone OK
            mysql.time_zone_leap_second OK
            mysql.time_zone_name OK
            mysql.time_zone_transition OK
            mysql.time_zone_transition_type OK
            mysql.user OK
            Phase 2/7: Installing used storage engines... Skipped
            Phase 3/7: Fixing views... Skipped
            Phase 4/7: Running 'mysql_fix_privilege_tables'
            Phase 5/7: Fixing table and database names ... Skipped
            Phase 6/7: Checking and upgrading tables... Skipped
            Phase 7/7: Running 'FLUSH PRIVILEGES'
            OK
            root /var/lib # mysql.server restart
            Shutting down MySQL. SUCCESS!
            Starting MySQL. SUCCESS!

            MariaDB [mysql]> select * from global_priv;
            Empty set (0.002 sec)
            When upgrading from 10.3, running mysql_upgrade on user table with ~15 records empty global_priv table is created, server is unusable, nobody cant connect without skip-grant-tables.

            No errors shown by mysql_upgrade output:
            {noformat}
            root /var/lib # /usr/local/mariadb/bin/mysql_upgrade -v -v -s -p
            Enter password:
            Looking for 'mysql' as: /usr/local/mariadb/bin/mysql
            Looking for 'mysqlcheck' as: /usr/local/mariadb/bin/mysqlcheck
            The --upgrade-system-tables option was used, user tables won't be touched.
            Phase 1/7: Checking and upgrading mysql database
            Running 'mysqlcheck' with connection arguments: --port='3306' --socket='/var/run/mysqld/mysqld.sock'
            # Connecting to localhost...
            # Disconnecting from localhost...
            Processing databases
            mysql
            mysql.column_stats OK
            mysql.columns_priv OK
            mysql.db OK
            mysql.event OK
            mysql.func OK
            mysql.gtid_slave_pos OK
            mysql.help_category OK
            mysql.help_keyword OK
            mysql.help_relation OK
            mysql.help_topic OK
            mysql.host OK
            mysql.index_stats OK
            mysql.plugin OK
            mysql.proc OK
            mysql.procs_priv OK
            mysql.proxies_priv OK
            mysql.roles_mapping OK
            mysql.servers OK
            mysql.table_stats OK
            mysql.tables_priv OK
            mysql.time_zone OK
            mysql.time_zone_leap_second OK
            mysql.time_zone_name OK
            mysql.time_zone_transition OK
            mysql.time_zone_transition_type OK
            mysql.user OK
            Phase 2/7: Installing used storage engines... Skipped
            Phase 3/7: Fixing views... Skipped
            Phase 4/7: Running 'mysql_fix_privilege_tables'
            Phase 5/7: Fixing table and database names ... Skipped
            Phase 6/7: Checking and upgrading tables... Skipped
            Phase 7/7: Running 'FLUSH PRIVILEGES'
            OK
            root /var/lib # mysql.server restart
            Shutting down MySQL. SUCCESS!
            Starting MySQL. SUCCESS!
            {noformat}
            {noformat}
            MariaDB [mysql]> select * from global_priv;
            Empty set (0.002 sec)
            {noformat}
            serg Sergei Golubchik made changes -
            Summary mysql_upgrade creating empty global_priv table when updating from 10.3 mysql_upgrade creating empty global_priv table
            serg Sergei Golubchik made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            serg Sergei Golubchik made changes -
            Status In Progress [ 3 ] Stalled [ 10000 ]
            serg Sergei Golubchik made changes -
            Fix Version/s 10.4.13 [ 24223 ]
            Fix Version/s 10.4 [ 22408 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            elenst Elena Stepanova made changes -
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 101718 ] MariaDB v4 [ 157063 ]

            People

              serg Sergei Golubchik
              Lulu Lulu
              Votes:
              1 Vote for this issue
              Watchers:
              8 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.