[MDEV-27757] Database upgrade fails: slow_log table Created: 2022-02-07 Updated: 2023-09-25 Resolved: 2023-09-19 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Upgrades |
| Affects Version/s: | 10.6.4 |
| Fix Version/s: | 10.4.32, 10.5.23, 10.6.16, 10.10.7, 10.11.6, 11.0.4, 11.1.3 |
| Type: | Bug | Priority: | Major |
| Reporter: | Wolfgang Petroschka | Assignee: | Daniel Black |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Embedded Linux |
||
| Description |
|
When trying to upgrade a MySQL 5.1.14 database to MariaDB 10.6.4 mariadb-upgrade fails:
After this error, the database is destroyed beyond repair. After studying the source code of mariadb-upgrade and mariadb-check for a while, I found out that the following SQL statement from mysql_fix_privilege_tables_sql.c is causing the problem:
If I drop the slow_log table before the upgrade everything works smoothly and the slow_log table is recreated. Output from MySQL 5.1.14:
So, the table is already using the CSV storage engine and has nullable columns in MySQL. |
| Comments |
| Comment by Sergei Golubchik [ 2022-02-07 ] | ||||||||||||||||||||||||||||||
|
What do you mean, a database is destroyed beyond repair? It seems you should only remove the offending table and run mariadb-upgrade again to have everything upgraded properly. | ||||||||||||||||||||||||||||||
| Comment by Wolfgang Petroschka [ 2022-02-07 ] | ||||||||||||||||||||||||||||||
|
If you re-run the upgrade it fails in another spot and complains about a missing user. | ||||||||||||||||||||||||||||||
| Comment by Wolfgang Petroschka [ 2022-02-08 ] | ||||||||||||||||||||||||||||||
|
@Sergei Golubchik: When I run the upgrade (and it fails as described above), then drop the slow_log table and then try to upgrade again the following error appears:
Looks pretty much broken beyond repair to me... | ||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2023-09-19 ] | ||||||||||||||||||||||||||||||
|
Thanks DrP3pp3r, finally got to this. | ||||||||||||||||||||||||||||||
| Comment by Wolfgang Petroschka [ 2023-09-20 ] | ||||||||||||||||||||||||||||||
|
Awesome. Thanks @Daniel Black for fixing this! |