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

InnoDB skips the tablespace in rotation list

    XMLWordPrintable

Details

    Description

      In two cases, InnoDB unnecessary skips the tablespaces from the rotation list.
      case 1: All tablespace are unencrypted tables but it needs encryption (crypt_data initialization)
      case 2: Changing innodb_encrypt_tables when background thread iterates through one
      of the tablespace in rotation list.

      The following test case can repeat the scenario for Case 1 :

      -- source include/have_innodb.inc
      -- source include/not_embedded.inc
      -- source include/have_example_key_management_plugin.inc
       
      set global innodb_encrypt_tables=0;
      CREATE TABLE t1 (f1 INT, f2 VARCHAR(256))engine=innodb;
      INSERT INTO t1 VALUES(1, 'MariaDB'), (2, 'Robot'), (3, 'Science');
      INSERT INTO t1 SELECT * FROM t1;
       
      CREATE TABLE t2(f1 INT, f2 VARCHAR(256))engine=innodb;
      INSERT INTO t2 SELECT * FROM t1;
       
      let $restart_parameters=--innodb_encrypt_tables=1;
      --source include/restart_mysqld.inc
       
      set global innodb_encrypt_tables=1;
       
      SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
      NAME
      innodb_system
       
      SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
      NAME
      drop table t2, t1;
      
      

      case 2: As of now, I found out by reading the code. I can write the clumsy test case to repeat it. I will post the test case soon.

      Attachments

        Issue Links

          Activity

            People

              thiru Thirunarayanan Balathandayuthapani
              thiru Thirunarayanan Balathandayuthapani
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.