mirror of
				https://github.com/MariaDB/server.git
				synced 2025-10-31 15:50:51 +03:00 
			
		
		
		
	The problem was that the CSV storage engine does not support NULL fields, yet in some early 5.1 version the log tables (general_log and slow_log) were created with null fields. On top of this, when altering a CSV table column, all fields of the table must be NOT NULL otherwise the alteration fails. The solution is to ensure that during upgrade all columns of the log tables are NOT NULL. mysql-test/r/log_tables_upgrade.result: Add test case result for Bug#49823. mysql-test/std_data/bug49823.CSV: Sample data for test. mysql-test/std_data/bug49823.frm: Add a CSV table which mimics the general_log table, except that it contains a nullable column. mysql-test/t/log_tables_upgrade.test: Add test case for Bug#49823. scripts/mysql_system_tables_fix.sql: Ensure that all columns of the log tables are NOT NULL.
		
			
				
	
	
		
			48 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			48 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| #
 | |
| # Bug#49823: mysql_upgrade fatal error due to general_log / slow_low CSV NULL
 | |
| #
 | |
| USE test;
 | |
| SET @saved_general_log = @@GLOBAL.general_log;
 | |
| SET GLOBAL general_log = OFF;
 | |
| USE mysql;
 | |
| FLUSH TABLES;
 | |
| REPAIR TABLE test.bug49823;
 | |
| Table	Op	Msg_type	Msg_text
 | |
| test.bug49823	repair	status	OK
 | |
| RENAME TABLE general_log TO renamed_general_log;
 | |
| RENAME TABLE test.bug49823 TO general_log;
 | |
| mtr.global_suppressions                            OK
 | |
| mtr.test_suppressions                              OK
 | |
| mysql.columns_priv                                 OK
 | |
| mysql.db                                           OK
 | |
| mysql.event                                        OK
 | |
| mysql.func                                         OK
 | |
| mysql.general_log
 | |
| Error    : You can't use locks with log tables.
 | |
| status   : OK
 | |
| mysql.help_category                                OK
 | |
| mysql.help_keyword                                 OK
 | |
| mysql.help_relation                                OK
 | |
| mysql.help_topic                                   OK
 | |
| mysql.host                                         OK
 | |
| mysql.ndb_binlog_index                             OK
 | |
| mysql.plugin                                       OK
 | |
| mysql.proc                                         OK
 | |
| mysql.procs_priv                                   OK
 | |
| mysql.renamed_general_log                          OK
 | |
| mysql.servers                                      OK
 | |
| mysql.slow_log
 | |
| Error    : You can't use locks with log tables.
 | |
| status   : 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
 | |
| DROP TABLE general_log;
 | |
| RENAME TABLE renamed_general_log TO general_log;
 | |
| SET GLOBAL general_log = @saved_general_log;
 | |
| USE test;
 |