Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.3.2
-
10.3.3-1
Description
In MariaDB 10.3.2, instant adding columns for innodb is supported.
After instant adding columns, the inplace update trigger assertion in some cases.
How to repeat:
create table t1 (c1 int primary key, c2 int);
insert into t1 values(1,1);
alter table t1 add column d1 varchar(20) not null default 'aaa';
update t1 set d1 = '' where c1 = 1; – assert in rec_set_nth_field()
The length of "d1" stored in the record is 0, because of instant adding columns. After update, the length is 0 also. But it can't do inplace update here.
So, it need to do some special check for rec_offs_nth_default() in row_upd_changes_field_size_or_external();
The patch can be work for it.
Attachments
Issue Links
- is caused by
-
MDEV-11369 Instant add column for InnoDB
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Attachment | inplace_update_fix.patch [ 44366 ] |
Description |
In MariaDB 10.3.2, instant adding columns for innodb is supported.
After instant adding columns, the inplace update trigger assertion in some cases. How to repeat: create table t1 (c1 int primary key, c2 int); insert into t1 values(1,1); alter table t1 add column d1 varchar(20) not null default 'aaa'; update t1 set d1 = '' where c1 = 1; {color:red}-- assert in rec_set_nth_field(){color} The length of "d1" stored in the record is 0, because of instant adding columns. After update, the length is 0 also. But it can do inplace update here. So, it need to do some special check for rec_offs_nth_default() in row_upd_changes_field_size_or_external(); The patch can be work for it. |
In MariaDB 10.3.2, instant adding columns for innodb is supported.
After instant adding columns, the inplace update trigger assertion in some cases. How to repeat: create table t1 (c1 int primary key, c2 int); insert into t1 values(1,1); alter table t1 add column d1 varchar(20) not null default 'aaa'; update t1 set d1 = '' where c1 = 1; {color:red}-- assert in rec_set_nth_field(){color} The length of "d1" stored in the record is 0, because of instant adding columns. After update, the length is 0 also. But it can't do inplace update here. So, it need to do some special check for rec_offs_nth_default() in row_upd_changes_field_size_or_external(); The patch can be work for it. |
Link |
This issue is caused by |
Affects Version/s | 10.3.2 [ 22533 ] | |
Affects Version/s | 10.3 [ 22126 ] |
Status | Open [ 1 ] | Confirmed [ 10101 ] |
Fix Version/s | 10.3 [ 22126 ] |
Assignee | Marko Mäkelä [ marko ] |
Sprint | 10.3.3-1 [ 200 ] |
Status | Confirmed [ 10101 ] | In Progress [ 3 ] |
issue.field.resolutiondate | 2017-10-26 10:10:31.0 | 2017-10-26 10:10:31.126 |
Fix Version/s | 10.3.3 [ 22644 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Resolution | Fixed [ 1 ] | |
Status | In Progress [ 3 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 83116 ] | MariaDB v4 [ 153015 ] |