[MDEV-17126] UPDATE of a BLOB column with long DEFAULT value fails Created: 2018-09-04  Updated: 2023-04-27

Status: Confirmed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.3.4, 10.4.0
Fix Version/s: 10.4

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

Issue Links:
Problem/Incident
is caused by MDEV-11369 Instant add column for InnoDB Closed
Relates
relates to MDEV-17197 "1713: Undo log record is too big" fo... Confirmed

 Description   

thiru pointed out that the following test fails on the UPDATE statement:

--source include/have_innodb.inc
create table t1 (a int primary key) engine=innodb;
insert into t1 set a=1;
alter table t1 add column b blob default repeat('aaa', 9500);
begin;
update t1 set b = null;
rollback;
drop table t1;

mysqltest: At line 5: query 'update t1 set b = null' failed: 1713: Undo log record is too big

If the ALTER TABLE statement is amended with , FORCE or , ALGORITHM=COPY, qualifier to prohibit instant ALTER, then the test will pass.

Apparently the reason for the failure is that InnoDB is trying to write the default value of the instantly added column into the undo log record. Because undo log records cannot span multiple pages, this will fail.



 Comments   
Comment by Marko Mäkelä [ 2020-04-16 ]

Fixing this may require changing the undo log format, and we prefer to avoid file format changes in GA releases.

Generated at Thu Feb 08 08:34:06 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.