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

Increasing VARCHAR length is not reflected in Innodb_instant_alter_column status variable

    Details

      Description

      In cases when instant modification of VARCHAR length is supported, the operation succeeds, but the value of Innodb_instant_alter_column is not increased. There are many ways to reproduce it, here is an example of such supported ALTER directly from the documentation:

      --source include/have_innodb.inc
       
      CREATE OR REPLACE TABLE tab (
         a int PRIMARY KEY,
         b varchar(50),
         c varchar(50)
      ) ENGINE=InnoDB CHARACTER SET=latin1;
       
      SET SESSION alter_algorithm='INSTANT';
       
      show status like '%instant%';
      ALTER TABLE tab MODIFY COLUMN c varchar(100);
      show status like '%instant%';
       
      # Cleanup
      DROP TABLE tab;
      

      10.4 c3394870

      show status like '%instant%';
      Variable_name	Value
      Innodb_instant_alter_column	0
      ALTER TABLE tab MODIFY COLUMN c varchar(100);
      show status like '%instant%';
      Variable_name	Value
      Innodb_instant_alter_column	0
      

      Also reproducible on 10.5.

        Attachments

          Activity

            People

            • Assignee:
              marko Marko Mäkelä
              Reporter:
              elenst Elena Stepanova
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: