[MDEV-19120] legacy_db_type needs rethinking Created: 2019-04-01 Updated: 2021-01-26 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major |
| Reporter: | Andrew Hutchings (Inactive) | Assignee: | Nikita Malyavin |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | spider | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
With every major release DB_TYPE_FIRST_DYNAMIC changes so dynamic engine plugins shift IDs with it. FRM files are not automatically updated which can cause issues in code that uses these IDs. For example in 10.2 an engine will have ID 44, in 10.3 ID 44 is reserved for DB_TYPE_SEQUENCE. When a TRUNCATE is called after an upgrade MariaDB calls certain functions in the SEQUENCE engine instead of the intended engine plugin which can cause a crash. The only workaround appears to be "ALTER TABLE comment=''" There are several ways this could be solved. mysql_upgrade should probably be aware of this. Maybe the start ID for legacy_db_type should be something high like 100? |
| Comments |
| Comment by Sergei Golubchik [ 2019-04-01 ] | ||||||||||||||||||||||
|
all new frms store the engine name, the server doesn't have to trust frm's legacy_db_type. On the opposite, it can assume that it's wrong and infer it from the engine name when the frm is opened. | ||||||||||||||||||||||
| Comment by Richard Stracke [ 2019-11-25 ] | ||||||||||||||||||||||
|
The same issue exists with spider engine. "ALTER TABLE comment=''" is not an option, because important information will be stored in the comment field for spider. A modified version of columnstore_upgrade for spider could be based on alter table engine = spider like
| ||||||||||||||||||||||
| Comment by Nikita Malyavin [ 2020-10-22 ] | ||||||||||||||||||||||
|
So what am I supposed to do in this "bug"? | ||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2020-10-23 ] | ||||||||||||||||||||||
|
it was incorrectly reported as a bug, looks more like a refactoring task to me. changed. |