Uploaded image for project: 'Percona Toolkit'
  1. Percona Toolkit
  2. PT-1536

add info about encrypted tablespaces in pt-mysql-summary

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 3.0.9
    • Fix Version/s: 3.0.10
    • Component/s: pt-mysql-summary
    • Labels:
      None

      Description

      Let's start from what we currently have in encryption section for pt-mysql-summary.

      # Encryption #################################################
      Keyring plugins:
      '+--------------+---------------+
      | PLUGIN_NAME  | PLUGIN_STATUS |
      +--------------+---------------+
      | keyring_file | ACTIVE        |
      +--------------+---------------+'
      Encrypted tables:
      +--------------+------------+----------------+
      | TABLE_SCHEMA | TABLE_NAME | CREATE_OPTIONS |
      +--------------+------------+----------------+
      | test         | t1         | ENCRYPTION="Y" |
      | test         | t2         | ENCRYPTION="Y" |
      +--------------+------------+----------------+
      

      Which looks decent, but it doesn't include info if encrypted table is in a encrypted single tablespace or part of some encrypted general tablespace which includes many tables.

      In my case t1 is part of "foo" tablespace and t2 is in a single table tablespace.

      5.7.21>create table t1(a int primary key) encryption='Y';
      5.7.21>CREATE TABLESPACE foo ADD DATAFILE 'foo.ibd' ENCRYPTION='Y';
      5.7.21>alter table t1 tablespace=foo;
      
      5.7.21>create table t2(a int primary key) encryption='Y';
      

      I also have encrypted general tablespace "bar" but it doesn't include any tables so it's not visible here.

      I think it would be helpful to:
      1. add info in encrypted tables part about tablespace to which the table is belonging (and is it a single or general tablespace)
      2. add another table to list encrypted tablespaces (maybe here list just general tablespaces and not single table since it might duplicate a lot with encrypted tables list)

      For 2. it seems it's not straightforward but it can be listed, see here how: https://jira.percona.com/browse/PS-3962

      short example:

      5.7.21>select SPACE, NAME from INNODB_SYS_TABLESPACES where FLAG&8192 = 8192;
      +-------+---------+
      | SPACE | NAME    |
      +-------+---------+
      |    29 | foo     |
      |    30 | test/t2 |
      |    31 | bar     |
      +-------+---------+
      3 rows in set (0.00 sec)
      
      // or just for general tablespaces
      5.7.21>select SPACE, NAME from INNODB_SYS_TABLESPACES where FLAG&8192 = 8192 and SPACE_TYPE='General';
      +-------+------+
      | SPACE | NAME |
      +-------+------+
      |    29 | foo  |
      |    31 | bar  |
      +-------+------+
      2 rows in set (0.00 sec)
      

        Smart Checklist

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  carlos.salguero Carlos Salguero
                  Reporter:
                  tomislav.plavcic@percona.com Tomislav Plavcic
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 1 day, 15 minutes
                    1d 15m