Column status in contracts table is changed to type VARCHAR(20) successfully.
The queries (the last line) fail with this error:
After the error occurs, the table contracts does not exist anymore (in the filesystem it is replaced with a file #sql-1_8).
Reproduction and details:
This seems to be a very specific bug which I cannot reproduce in any other way. Some points that I've noticed while trying to reproduce this:
- This is reproducable on all version from mariadb:10.3.2 and upwards (probably introduced with https://mariadb.com/kb/en/library/instant-add-column-for-innodb/)
- The last line must be an ALTER TABLE statement which changes a columns type from enum to varchar or vice versa, no other types work as far as I know.
- Before changing a column type which triggers the error, there must be a new column added to the table which is the owning side of a foreign key in a single SQL query. i.e. if we changed
There would not be an error anymore.