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

Temporary tablespace information missing in INFORMATION SCHEMA.INNODB_TABLESPACES_ENCRYPTION

    XMLWordPrintable

Details

    • Bug
    • Status: Stalled (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.6.16
    • 10.5, 10.6, 11.1, 11.2, 11.4
    • Encryption
    • None
    • RHEL Linux 4.18.0-513.24.1.el8_9.x86_64
      Openstack VM

    Description

      Hi,

      The innodb_temporary table space is not encrypted though innodb_encrypt_temporary_tables is enabled.

      See details below:

      While there are two innodb table spaces listed here (innodb_system and innodb_temporary), only innodb_system is present in the encryption table.

      MariaDB [WebNmsDB]> select * from information_schema.INNODB_SYS_TABLESPACES;
      +------------+------------------+------+------------+-----------+-----------+---------------+-----------+----------------+
      | SPACE      | NAME             | FLAG | ROW_FORMAT | PAGE_SIZE | FILENAME  | FS_BLOCK_SIZE | FILE_SIZE | ALLOCATED_SIZE |
      +------------+------------------+------+------------+-----------+-----------+---------------+-----------+----------------+
      |          0 | innodb_system    |   21 | NULL       |     16384 | ./ibdata1 |          4096 |  79691776 |       79695872 |
      | 4294967294 | innodb_temporary |   21 | NULL       |     16384 | ./ibtmp1  |          4096 |  12582912 |       12582912 |
      +------------+------------------+------+------------+-----------+-----------+---------------+-----------+----------------+
      2 rows in set (0.001 sec)
      

      MariaDB [WebNmsDB]> select * from information_schema.INNODB_TABLESPACES_ENCRYPTION\G
      *************************** 1. row ***************************
                             SPACE: 0
                              NAME: innodb_system
                 ENCRYPTION_SCHEME: 1
                KEYSERVER_REQUESTS: 1
                   MIN_KEY_VERSION: 1
               CURRENT_KEY_VERSION: 1
          KEY_ROTATION_PAGE_NUMBER: NULL
      KEY_ROTATION_MAX_PAGE_NUMBER: NULL
                    CURRENT_KEY_ID: 1
              ROTATING_OR_FLUSHING: 0
      1 row in set (0.001 sec)
      

      MariaDB [WebNmsDB]> WITH tablespace_ids AS (
          ->         SELECT SPACE
          ->         FROM information_schema.INNODB_SYS_TABLESPACES ist
          ->         UNION
          ->         /* information_schema.INNODB_SYS_TABLESPACES doesn't have a row for the system tablespace (MDEV-20802) */
          ->         SELECT 0 AS SPACE
          ->      )
          ->      SELECT NOW() as 'time', 
          ->         'tablespaces', COUNT(*) AS 'tablespaces', 
          ->         'encrypted', SUM(IF(ite.ENCRYPTION_SCHEME IS NOT NULL, ite.ENCRYPTION_SCHEME, 0)) AS 'encrypted', 
          ->         'encrypting', SUM(IF(ite.ROTATING_OR_FLUSHING IS NOT NULL, ite.ROTATING_OR_FLUSHING, 0)) AS 'encrypting'
          ->      FROM tablespace_ids
          ->      LEFT JOIN information_schema.INNODB_TABLESPACES_ENCRYPTION ite
          ->         ON tablespace_ids.SPACE = ite.SPACE;
      +---------------------+-------------+-------------+-----------+-----------+------------+------------+
      | time                | tablespaces | tablespaces | encrypted | encrypted | encrypting | encrypting |
      +---------------------+-------------+-------------+-----------+-----------+------------+------------+
      | 2024-07-17 10:23:10 | tablespaces |           2 | encrypted |         1 | encrypting |          0 |
      +---------------------+-------------+-------------+-----------+-----------+------------+------------+
      1 row in set (0.002 sec)
      

      The "innodb_encrypt_temporary_tables" is ON:

      MariaDB [WebNmsDB]> show variables like 'innodb_encrypt_temporary_tables';
      +---------------------------------+-------+
      | Variable_name                   | Value |
      +---------------------------------+-------+
      | innodb_encrypt_temporary_tables | ON    |
      +---------------------------------+-------+
      1 row in set (0.002 sec)
      

      The config file my.cnf is attached for your reference. Is there anything missing that causes innodb temporary tables not to be encrypted?

      Attachments

        Activity

          People

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