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

Innodb_instant_alter_column should be a flush-able session status variable

    XMLWordPrintable

Details

    Description

      Innodb_instant_alter_column is a "global" session variable, if this term can be applied here. Its changes in one connection affect other connections' session status, and FLUSH STATUS doesn't reset it.
      In the test below it is compared to a "normal" session variable. Semantically, it would be reasonable to expect that they behave in a similar fashion.

      --source include/have_innodb.inc
       
      create table t (a int) engine=InnoDB;
       
      select variable_name, variable_value from information_schema.session_status
      where variable_name in ('Innodb_instant_alter_column','Com_alter_table');
       
      alter table t add b int;
       
      select variable_name, variable_value from information_schema.session_status
      where variable_name in ('Innodb_instant_alter_column','Com_alter_table');
       
      --connect (con1,localhost,root,,)
       
      select variable_name, variable_value from information_schema.session_status
      where variable_name in ('Innodb_instant_alter_column','Com_alter_table');
       
      --connection default
       
      flush status;
       
      select variable_name, variable_value from information_schema.session_status
      where variable_name in ('Innodb_instant_alter_column','Com_alter_table');
       
      # Cleanup
      drop table t;
      

      10.4 59e7289b6ce93e52b251466e18a2e0eab8b47c36

      create table t (a int) engine=InnoDB;
      select variable_name, variable_value from information_schema.session_status
      where variable_name in ('Innodb_instant_alter_column','Com_alter_table');
      variable_name	variable_value
      COM_ALTER_TABLE	0
      INNODB_INSTANT_ALTER_COLUMN	0
      alter table t add b int;
      select variable_name, variable_value from information_schema.session_status
      where variable_name in ('Innodb_instant_alter_column','Com_alter_table');
      variable_name	variable_value
      COM_ALTER_TABLE	1
      INNODB_INSTANT_ALTER_COLUMN	1
      connect  con1,localhost,root,,;
      select variable_name, variable_value from information_schema.session_status
      where variable_name in ('Innodb_instant_alter_column','Com_alter_table');
      variable_name	variable_value
      COM_ALTER_TABLE	0
      INNODB_INSTANT_ALTER_COLUMN	1
      connection default;
      flush status;
      select variable_name, variable_value from information_schema.session_status
      where variable_name in ('Innodb_instant_alter_column','Com_alter_table');
      variable_name	variable_value
      COM_ALTER_TABLE	0
      INNODB_INSTANT_ALTER_COLUMN	1
      drop table t;
      

      Attachments

        Activity

          People

            serg Sergei Golubchik
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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