Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-14111

Inplace update assert after instant adding column

Details

    • 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

          Activity

            vinchen vinchen created issue -
            vinchen vinchen made changes -
            Field Original Value New Value
            Attachment inplace_update_fix.patch [ 44366 ]
            vinchen vinchen made changes -
            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.
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            Affects Version/s 10.3.2 [ 22533 ]
            Affects Version/s 10.3 [ 22126 ]
            marko Marko Mäkelä made changes -
            Status Open [ 1 ] Confirmed [ 10101 ]
            marko Marko Mäkelä made changes -
            Fix Version/s 10.3 [ 22126 ]
            marko Marko Mäkelä made changes -
            Assignee Marko Mäkelä [ marko ]
            serg Sergei Golubchik made changes -
            Sprint 10.3.3-1 [ 200 ]
            marko Marko Mäkelä made changes -
            Status Confirmed [ 10101 ] In Progress [ 3 ]
            marko Marko Mäkelä made changes -
            issue.field.resolutiondate 2017-10-26 10:10:31.0 2017-10-26 10:10:31.126
            marko Marko Mäkelä made changes -
            Fix Version/s 10.3.3 [ 22644 ]
            Fix Version/s 10.3 [ 22126 ]
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 83116 ] MariaDB v4 [ 153015 ]

            People

              marko Marko Mäkelä
              vinchen vinchen
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.