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

Dump upgrade from pre-10.6 to 10.6+ throws errors on sys views

    XMLWordPrintable

Details

    Description

      • create a dump of 10.5 or earlier including mysql schema etc. A dump of all databases from a freshly bootstrapped server will do (10.5.dump)
      • shut down 10.5, bootstrap and start a fresh 10.6+
      • load the dump of 10.5 into 10.6
      • run mysql_upgrade (it will likely require --force)
      • see the output

        10.6 70021737

        Phase 1/7: Checking and upgrading mysql database
        Processing databases
        mysql
        mysql.column_stats                                 OK
        mysql.columns_priv                                 OK
        mysql.db                                           OK
        mysql.event                                        OK
        mysql.func                                         OK
        mysql.global_priv                                  OK
        mysql.gtid_slave_pos                               OK
        mysql.help_category                                OK
        mysql.help_keyword                                 OK
        mysql.help_relation                                OK
        mysql.help_topic                                   OK
        mysql.index_stats                                  OK
        mysql.innodb_index_stats                           OK
        mysql.innodb_table_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.transaction_registry                         OK
        Phase 2/7: Installing used storage engines... Skipped
        Phase 3/7: Fixing views
        mysql.user                                         OK
        sys.host_summary
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.host_summary_by_file_io
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.host_summary_by_file_io_type
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.host_summary_by_stages
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.host_summary_by_statement_latency
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.host_summary_by_statement_type
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.innodb_buffer_stats_by_schema
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.innodb_buffer_stats_by_table
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.innodb_lock_waits
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.io_by_thread_by_latency
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.io_global_by_file_by_bytes
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.io_global_by_file_by_latency
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.io_global_by_wait_by_bytes
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.io_global_by_wait_by_latency
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.latest_file_io
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.memory_by_host_by_current_bytes
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.memory_by_thread_by_current_bytes
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.memory_by_user_by_current_bytes
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.memory_global_by_current_bytes
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.memory_global_total
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.metrics                                        OK
        sys.processlist
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.ps_check_lost_instrumentation                  OK
        sys.schema_auto_increment_columns                  OK
        sys.schema_index_statistics
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.schema_object_overview                         OK
        sys.schema_redundant_indexes                       OK
        sys.schema_table_lock_waits
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.schema_table_statistics
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.schema_table_statistics_with_buffer
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.schema_tables_with_full_table_scans
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.schema_unused_indexes                          OK
        sys.session
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.session_ssl_status                             OK
        sys.statement_analysis
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.statements_with_errors_or_warnings
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.statements_with_full_table_scans
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.statements_with_runtimes_in_95th_percentile
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.statements_with_sorting
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.statements_with_temp_tables
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.user_summary
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.user_summary_by_file_io
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.user_summary_by_file_io_type
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.user_summary_by_stages
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.user_summary_by_statement_latency
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.user_summary_by_statement_type
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.version                                        OK
        sys.wait_classes_global_by_avg_latency
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.wait_classes_global_by_latency
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.waits_by_host_by_latency
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.waits_by_user_by_latency
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.waits_global_by_latency
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.x$host_summary                                 OK
        sys.x$host_summary_by_file_io                      OK
        sys.x$host_summary_by_file_io_type                 OK
        sys.x$host_summary_by_stages                       OK
        sys.x$host_summary_by_statement_latency            OK
        sys.x$host_summary_by_statement_type               OK
        sys.x$innodb_buffer_stats_by_schema                OK
        sys.x$innodb_buffer_stats_by_table                 OK
        sys.x$innodb_lock_waits                            OK
        sys.x$io_by_thread_by_latency                      OK
        sys.x$io_global_by_file_by_bytes                   OK
        sys.x$io_global_by_file_by_latency                 OK
        sys.x$io_global_by_wait_by_bytes                   OK
        sys.x$io_global_by_wait_by_latency                 OK
        sys.x$latest_file_io                               OK
        sys.x$memory_by_host_by_current_bytes              OK
        sys.x$memory_by_thread_by_current_bytes            OK
        sys.x$memory_by_user_by_current_bytes              OK
        sys.x$memory_global_by_current_bytes               OK
        sys.x$memory_global_total                          OK
        sys.x$processlist                                  OK
        sys.x$ps_digest_95th_percentile_by_avg_us          OK
        sys.x$ps_digest_avg_latency_distribution           OK
        sys.x$ps_schema_table_statistics_io
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.x$schema_flattened_keys                        OK
        sys.x$schema_index_statistics                      OK
        sys.x$schema_table_lock_waits
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.x$schema_table_statistics
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.x$schema_table_statistics_with_buffer
        Error    : Cannot load from mysql.proc. The table is probably corrupted
        error    : Corrupt
        sys.x$schema_tables_with_full_table_scans          OK
        sys.x$session                                      OK
        sys.x$statement_analysis                           OK
        sys.x$statements_with_errors_or_warnings           OK
        sys.x$statements_with_full_table_scans             OK
        sys.x$statements_with_runtimes_in_95th_percentile  OK
        sys.x$statements_with_sorting                      OK
        sys.x$statements_with_temp_tables                  OK
        sys.x$user_summary                                 OK
        sys.x$user_summary_by_file_io                      OK
        sys.x$user_summary_by_file_io_type                 OK
        sys.x$user_summary_by_stages                       OK
        sys.x$user_summary_by_statement_latency            OK
        sys.x$user_summary_by_statement_type               OK
        sys.x$wait_classes_global_by_avg_latency           OK
        sys.x$wait_classes_global_by_latency               OK
        sys.x$waits_by_host_by_latency                     OK
        sys.x$waits_by_user_by_latency                     OK
        sys.x$waits_global_by_latency                      OK
        Phase 4/7: Running 'mysql_fix_privilege_tables'
        Phase 5/7: Fixing table and database names
        Phase 6/7: Checking and upgrading tables
        Processing databases
        information_schema
        performance_schema
        sys
        sys.sys_config                                     OK
        test
        tmp
        Phase 7/7: Running 'FLUSH PRIVILEGES'
        OK
        

      The problem here, as far as I can tell, is that first it tries to check views, including sys schema, which survived the dump load because it doesn't exist in 10.5, but its functions cannot be loaded because mysql.proc structure has changed. mysql.proc is upgraded later, and later sys views are even re-created.

      So all in all, there seems to be no harm (hence Minor), but the output looks scary.

      Attachments

        Activity

          People

            Unassigned Unassigned
            elenst Elena Stepanova
            Votes:
            1 Vote for this issue
            Watchers:
            3 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.