mirror of
				https://github.com/MariaDB/server.git
				synced 2025-10-31 19:06:14 +01:00 
			
		
		
		
	 d671fec431
			
		
	
	
	d671fec431
	
	
	
		
			
			- Moved view checks after privilege tables are fixed. This is to avoid warnings about wrongly defined mysql.proc when checking views. - Don't use stat tables before they have been fixed. - Don't run mysql_fix_view() if 'FOR MYSQL' is used if the view is already a MariaDB view. - Added 'FOR UPGRADE' as an option for 'REPAIR VIEW' to be able to detect if the REPAIR command comes from mariadb_upgrade. In this case we get a warning, instead of an error, if a definer of a view does not exists.
		
			
				
	
	
		
			172 lines
		
	
	
	
		
			8.3 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			172 lines
		
	
	
	
		
			8.3 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
| #
 | |
| # MDEV-20228 `mysql_upgrade` fails on every version upgrade: "ERROR 1267 (HY000) at line 7: Illegal mix of collations (utf8mb4_unicode_ci,COERCIBLE) and (utf8mb4_general_ci,COERCIBLE) for operation 'like'"
 | |
| #
 | |
| SET sql_mode="";
 | |
| SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci;
 | |
| #
 | |
| # Changing character_set_client and collation_connection
 | |
| # for the VIEW mysql.user to utf8mb4/utf8mb4_unicode_ci,
 | |
| # to emulate that mysql.user was created by 'mysqld --bootstrap'
 | |
| # using mysqld compiled with
 | |
| # -DDEFAULT_CHARSET=utf8mb4 -DDEFAULT_COLLATION=utf8mb4_unicode_ci
 | |
| #
 | |
| SELECT CHARACTER_SET_CLIENT, COLLATION_CONNECTION
 | |
| FROM INFORMATION_SCHEMA.VIEWS
 | |
| WHERE TABLE_SCHEMA='mysql' AND TABLE_NAME='user';
 | |
| CHARACTER_SET_CLIENT	COLLATION_CONNECTION
 | |
| utf8mb4	utf8mb4_unicode_ci
 | |
| # Running mysql_upgrade
 | |
| Phase 1/8: 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/8: Installing used storage engines... Skipped
 | |
| Phase 3/8: Running 'mysql_fix_privilege_tables'
 | |
| Phase 4/8: Fixing views
 | |
| mysql.user                                         OK
 | |
| sys.host_summary                                   OK
 | |
| sys.host_summary_by_file_io                        OK
 | |
| sys.host_summary_by_file_io_type                   OK
 | |
| sys.host_summary_by_stages                         OK
 | |
| sys.host_summary_by_statement_latency              OK
 | |
| sys.host_summary_by_statement_type                 OK
 | |
| sys.innodb_buffer_stats_by_schema                  OK
 | |
| sys.innodb_buffer_stats_by_table                   OK
 | |
| sys.innodb_lock_waits                              OK
 | |
| sys.io_by_thread_by_latency                        OK
 | |
| sys.io_global_by_file_by_bytes                     OK
 | |
| sys.io_global_by_file_by_latency                   OK
 | |
| sys.io_global_by_wait_by_bytes                     OK
 | |
| sys.io_global_by_wait_by_latency                   OK
 | |
| sys.latest_file_io                                 OK
 | |
| sys.memory_by_host_by_current_bytes                OK
 | |
| sys.memory_by_thread_by_current_bytes              OK
 | |
| sys.memory_by_user_by_current_bytes                OK
 | |
| sys.memory_global_by_current_bytes                 OK
 | |
| sys.memory_global_total                            OK
 | |
| sys.metrics                                        OK
 | |
| sys.processlist                                    OK
 | |
| sys.ps_check_lost_instrumentation                  OK
 | |
| sys.schema_auto_increment_columns                  OK
 | |
| sys.schema_index_statistics                        OK
 | |
| sys.schema_object_overview                         OK
 | |
| sys.schema_redundant_indexes                       OK
 | |
| sys.schema_table_lock_waits                        OK
 | |
| sys.schema_table_statistics                        OK
 | |
| sys.schema_table_statistics_with_buffer            OK
 | |
| sys.schema_tables_with_full_table_scans            OK
 | |
| sys.schema_unused_indexes                          OK
 | |
| sys.session                                        OK
 | |
| sys.session_ssl_status                             OK
 | |
| sys.statement_analysis                             OK
 | |
| sys.statements_with_errors_or_warnings             OK
 | |
| sys.statements_with_full_table_scans               OK
 | |
| sys.statements_with_runtimes_in_95th_percentile    OK
 | |
| sys.statements_with_sorting                        OK
 | |
| sys.statements_with_temp_tables                    OK
 | |
| sys.user_summary                                   OK
 | |
| sys.user_summary_by_file_io                        OK
 | |
| sys.user_summary_by_file_io_type                   OK
 | |
| sys.user_summary_by_stages                         OK
 | |
| sys.user_summary_by_statement_latency              OK
 | |
| sys.user_summary_by_statement_type                 OK
 | |
| sys.version                                        OK
 | |
| sys.wait_classes_global_by_avg_latency             OK
 | |
| sys.wait_classes_global_by_latency                 OK
 | |
| sys.waits_by_host_by_latency                       OK
 | |
| sys.waits_by_user_by_latency                       OK
 | |
| sys.waits_global_by_latency                        OK
 | |
| 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                OK
 | |
| sys.x$schema_flattened_keys                        OK
 | |
| sys.x$schema_index_statistics                      OK
 | |
| sys.x$schema_table_lock_waits                      OK
 | |
| sys.x$schema_table_statistics                      OK
 | |
| sys.x$schema_table_statistics_with_buffer          OK
 | |
| 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 5/8: Fixing table and database names
 | |
| Phase 6/8: Checking and upgrading tables
 | |
| Processing databases
 | |
| information_schema
 | |
| mtr
 | |
| mtr.global_suppressions                            OK
 | |
| mtr.test_suppressions                              OK
 | |
| performance_schema
 | |
| sys
 | |
| sys.sys_config                                     OK
 | |
| test
 | |
| Phase 7/8: uninstalling plugins
 | |
| Phase 8/8: Running 'FLUSH PRIVILEGES'
 | |
| OK
 | |
| #
 | |
| # Restoring character_set_client and collation_connection back
 | |
| # so post-check returns the expected check-mysqld_1.result
 | |
| #
 | |
| SET NAMES latin1;
 |