Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDEV-18788 Live upgrade from MySQL 5.6/5.7 to MariaDB 10.4 fails with…
… "Event Scheduler: An error occurred when initializing system tables" if columns or indexes are modified/renamed/dropped in an ALTER TABLE, stat tables must be updated accordingly (e.g. all statistics for a column should be dropped). But if a stat table doesn't exist, it's not a reason to fail the whole ALTER TABLE operation - such an error should be ignored.
- Loading branch information
Showing
3 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
create table t1 (a int); | ||
alter table mysql.column_stats rename to mysql.column_stats1; | ||
flush tables; | ||
alter table t1 change a b varchar(100); | ||
show create table t1; | ||
Table Create Table | ||
t1 CREATE TABLE `t1` ( | ||
`b` varchar(100) DEFAULT NULL | ||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 | ||
alter table mysql.column_stats1 rename to mysql.column_stats; | ||
drop table t1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# | ||
# MDEV-18788 Live upgrade from MySQL 5.6/5.7 to MariaDB 10.4 fails with "Event Scheduler: An error occurred when initializing system tables" | ||
# | ||
create table t1 (a int); | ||
alter table mysql.column_stats rename to mysql.column_stats1; | ||
flush tables; | ||
alter table t1 change a b varchar(100); | ||
show create table t1; | ||
alter table mysql.column_stats1 rename to mysql.column_stats; | ||
drop table t1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters