[MDEV-20565] Assertion failure on CHANGE COLUMN…SYSTEM VERSIONING Created: 2019-09-12  Updated: 2019-09-12  Resolved: 2019-09-12

Status: Closed
Project: MariaDB Server
Component/s: Data Definition - Alter Table, Storage Engine - InnoDB
Affects Version/s: 10.4.3
Fix Version/s: 10.4.9

Type: Bug Priority: Major
Reporter: Marko Mäkelä Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: crash, instant

Issue Links:
Problem/Incident
is caused by MDEV-15564 Avoid table rebuild in ALTER TABLE on... Closed

 Description   

The following will trigger a debug assertion failure in InnoDB:

--source include/have_innodb.inc
set @@system_versioning_alter_history=keep;
CREATE TABLE t (alpha INT, b INT) ENGINE=InnoDB WITH SYSTEM VERSIONING;
ALTER TABLE t CHANGE COLUMN alpha a INT WITHOUT SYSTEM VERSIONING;
DROP TABLE t;

The assertion failure is as follows:

10.4 ea0be9e2d63467064292559762887495772240fc

Version: '10.4.3-MariaDB-debug-log'  socket: '/dev/shm/10.4o/mysql-test/var/tmp/mysqld.1.sock'  port: 16000  Source distribution
mysqld: /mariadb/10.4o/storage/innobase/handler/handler0alter.cc:9090: bool innobase_rename_or_enlarge_column_try(const dict_table_t *, trx_t *, const char *, ulint, const Field &, const Create_field &, bool): Assertion `col->prtype == prtype' failed.

This is the first affected revision, found by nikitamalyavin.



 Comments   
Comment by Marko Mäkelä [ 2019-09-12 ]

This is a bogus debug assertion. The DATA_VERSIONED bits in dict_col_t::prtype do not affect the storage format.

The assertion would fail whenever adding or removing the SYSTEM VERSIONING attribute of a column and renaming the column at the same time.

If the column is a VARCHAR that is being instantly extended, the assertion would not fail for extending the VARCHAR, renaming the column, and changing the SYSTEM VERSIONING attribute.

Comment by Marko Mäkelä [ 2019-09-12 ]

This was a bogus debug assertion, with no impact for release builds.

Generated at Thu Feb 08 09:00:27 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.