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

ALTER TABLE fails when a stored virtual column is dropped and added

Details

    Description

      Test case

      --source include/have_innodb.inc
      --source include/have_debug_sync.inc
       
      create table t1 (a char(9), b char(9) as (a) stored) engine=InnoDB;
      insert into t1 values ('foobar');
       
      --send
        set debug_sync= 'now wait_for downgraded';
       
      --connect(con1,localhost,root,,)
      set debug_sync= 'alter_table_online_downgraded signal downgraded wait_for goforit';
      --send 
      alter ignore table t1 drop b, add b char(3) as (a) stored, algorithm=copy, lock=none
       
      --connection default
      --reap
      update t1 set a = 'foobarqux';
      set debug_sync= 'now signal goforit';
       
      --connection con1
      --reap  
       
      # Cleanup
      drop table t1;
      set debug_sync= reset;
      

      Attachments

        Issue Links

          Activity

            nikitamalyavin Nikita Malyavin created issue -
            nikitamalyavin Nikita Malyavin made changes -
            Field Original Value New Value
            Priority Major [ 3 ] Critical [ 2 ]
            nikitamalyavin Nikita Malyavin made changes -
            Fix Version/s 10.10 [ 27530 ]
            nikitamalyavin Nikita Malyavin made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            nikitamalyavin Nikita Malyavin made changes -
            Description {code:sql|title=Test case}
            --source include/have_innodb.inc
            --source include/have_debug_sync.inc

            create table t1 (a char(9), b char(9) as (a) stored) engine=InnoDB;
            insert into t values ('foobar');

            --send
              set debug_sync= 'now wait_for downgraded';

            --connect(con1,localhost,root,,)
            set debug_sync= 'alter_table_online_downgraded signal downgraded wait_for goforit';
            --send
            alter ignore table t1 drop b, add b char(3) as (a) stored, algorithm=copy, lock=none

            --connection default
            --reap
            update t set a = 'foobarqux';
            set debug_sync= 'now signal goforit';

            --connection con1
            --reap

            # Cleanup
            drop table t;
            set debug_sync= reset;
            {code}
            {code:sql|title=Test case}
            --source include/have_innodb.inc
            --source include/have_debug_sync.inc

            create table t1 (a char(9), b char(9) as (a) stored) engine=InnoDB;
            insert into t1 values ('foobar');

            --send
              set debug_sync= 'now wait_for downgraded';

            --connect(con1,localhost,root,,)
            set debug_sync= 'alter_table_online_downgraded signal downgraded wait_for goforit';
            --send
            alter ignore table t1 drop b, add b char(3) as (a) stored, algorithm=copy, lock=none

            --connection default
            --reap
            update t1 set a = 'foobarqux';
            set debug_sync= 'now signal goforit';

            --connection con1
            --reap

            # Cleanup
            drop table t;
            set debug_sync= reset;
            {code}
            nikitamalyavin Nikita Malyavin made changes -
            Description {code:sql|title=Test case}
            --source include/have_innodb.inc
            --source include/have_debug_sync.inc

            create table t1 (a char(9), b char(9) as (a) stored) engine=InnoDB;
            insert into t1 values ('foobar');

            --send
              set debug_sync= 'now wait_for downgraded';

            --connect(con1,localhost,root,,)
            set debug_sync= 'alter_table_online_downgraded signal downgraded wait_for goforit';
            --send
            alter ignore table t1 drop b, add b char(3) as (a) stored, algorithm=copy, lock=none

            --connection default
            --reap
            update t1 set a = 'foobarqux';
            set debug_sync= 'now signal goforit';

            --connection con1
            --reap

            # Cleanup
            drop table t;
            set debug_sync= reset;
            {code}
            {code:sql|title=Test case}
            --source include/have_innodb.inc
            --source include/have_debug_sync.inc

            create table t1 (a char(9), b char(9) as (a) stored) engine=InnoDB;
            insert into t1 values ('foobar');

            --send
              set debug_sync= 'now wait_for downgraded';

            --connect(con1,localhost,root,,)
            set debug_sync= 'alter_table_online_downgraded signal downgraded wait_for goforit';
            --send
            alter ignore table t1 drop b, add b char(3) as (a) stored, algorithm=copy, lock=none

            --connection default
            --reap
            update t1 set a = 'foobarqux';
            set debug_sync= 'now signal goforit';

            --connection con1
            --reap

            # Cleanup
            drop table t1;
            set debug_sync= reset;
            {code}
            nikitamalyavin Nikita Malyavin made changes -
            Status In Progress [ 3 ] In Testing [ 10301 ]
            nikitamalyavin Nikita Malyavin made changes -
            Status In Testing [ 10301 ] Stalled [ 10000 ]
            nikitamalyavin Nikita Malyavin made changes -
            Assignee Nikita Malyavin [ nikitamalyavin ] Sergei Golubchik [ serg ]
            Status Stalled [ 10000 ] In Review [ 10002 ]

            please review bb-10.10-MDEV-29021 (commits up to c1feb8c3c3)

            nikitamalyavin Nikita Malyavin added a comment - please review bb-10.10- MDEV-29021 (commits up to c1feb8c3c3 )
            nikitamalyavin Nikita Malyavin made changes -
            nikitamalyavin Nikita Malyavin made changes -
            Component/s Data Definition - Alter Table [ 10114 ]
            Component/s Virtual Columns [ 10803 ]
            serg Sergei Golubchik made changes -
            Assignee Sergei Golubchik [ serg ] Nikita Malyavin [ nikitamalyavin ]
            Status In Review [ 10002 ] Stalled [ 10000 ]
            nikitamalyavin Nikita Malyavin made changes -
            Assignee Nikita Malyavin [ nikitamalyavin ] Sergei Golubchik [ serg ]
            Status Stalled [ 10000 ] In Review [ 10002 ]
            nikitamalyavin Nikita Malyavin made changes -
            serg Sergei Golubchik made changes -
            Status In Review [ 10002 ] In Testing [ 10301 ]
            serg Sergei Golubchik made changes -
            Assignee Sergei Golubchik [ serg ] Nikita Malyavin [ nikitamalyavin ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Fix Version/s 10.11 [ 27614 ]
            Fix Version/s 10.10 [ 27530 ]
            serg Sergei Golubchik made changes -
            Fix Version/s 11.2.1 [ 29034 ]
            Fix Version/s 10.11 [ 27614 ]
            Resolution Fixed [ 1 ]
            Status In Testing [ 10301 ] Closed [ 6 ]

            People

              nikitamalyavin Nikita Malyavin
              nikitamalyavin Nikita Malyavin
              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.