Browse source

Changelog

Query
From:
To:
Branch:
Path:
Message:
BugID:
User: +
Format:
: 1 checkin (+47/-6) by Henrik Grubbström (Grubba) <grubba@grubba.org> Lines added/removed recently

Friday 08 September 2017

2017-09-08 13:49:49 (2 weeks ago) by Henrik Grubbström (Grubba) <grubba@grubba.org>

DBManager: Improved robustness of DB upgrade code.

When upgrading from MySQL 5.0 to MariaDB 10.1, the mysql_upgrade
script apparently forgets to flush something, which causes the
database to complain, and the upgrade to fail (verbose mode):

[...]
| Phase 3/7: Fixing views
| Processing databases
| information_schema
| mysql
| Phase 4/7: Running 'mysql_fix_privilege_tables'
| [TIMESTAMP] [ERROR] Column count of mysql.db is wrong. Expected 22, found 21. The table is probably corrupted
| [TIMESTAMP] [ERROR] mysqld: Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
| ERROR 1408 (HY000) at line 542: Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
| FATAL ERROR: Upgrade failed

Rerunning the mysql_upgrade script immediately after completes
without further complaints (still verbose mode):

[...]
| Phase 3/7: Fixing views
| Processing databases
| information_schema
| mysql
| performance_schema
| Phase 4/7: Running 'mysql_fix_privilege_tables'
| Phase 5/7: Fixing table and database names
[...]

check_upgrade_mysql() now reruns mysql_upgrade once if it failed the
first time. It also throws an error if it also fails the second time.

Fixes [WS-60].

[permalink]

Bugs mentioned

  1408RESOLVEDForgotten constant definition leads to fatal
Bugs? Suggestions?