Uploaded image for project: 'Percona Server for MySQL'
  1. Percona Server for MySQL
  2. PS-7340

Add validation of default_table_encryption to confirm keyring plugin is loaded before changing modes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 8.0.20-11
    • Fix Version/s: 8.0.21-12
    • Component/s: None
    • Labels:
      None

      Description

      default_table_encryption should validate that keyring plugin is loaded before changing modes.

      Server version: 8.0.21-12-debug Source distribution
      
      Copyright (c) 2009-2020 Percona LLC and/or its affiliates
      Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
      
      Oracle is a registered trademark of Oracle Corporation and/or its
      affiliates. Other names may be trademarks of their respective
      owners.
      
      Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
      
      mysql> CREATE DATABASE test;
      Query OK, 1 row affected (0.00 sec)
      
      mysql> USE test;
      Database changed
      mysql> CREATE TABLE t1(title CHAR (1),body TEXT);
      Query OK, 0 rows affected (0.04 sec)
      mysql> ALTER TABLE t1 ADD FULLTEXT INDEX idx1(title,body)WITH PARSER ngram;
      Query OK, 0 rows affected, 1 warning (0.31 sec)
      Records: 0  Duplicates: 0  Warnings: 1
      mysql> SET GLOBAL default_table_encryption=ONLINE_TO_KEYRING;                                                                                                                                                                                                                                                                 Query OK, 0 rows affected (0.00 sec)
      
      mysql> CREATE FULLTEXT INDEX idx2 on t1(body);
      ERROR 2013 (HY000): Lost connection to MySQL server during query
      mysql> Bye
      

      See PS-7338 for more information.

       

      Another test case, moved here from PS-7341.

      SET PERSIST should do validation when switching default_table_encryption modes.

      Currently this can lead to:

      Welcome to the MySQL monitor.  Commands end with ; or \g.
      Your MySQL connection id is 7
      Server version: 8.0.21-12-debug Source distribution
      
      Copyright (c) 2009-2020 Percona LLC and/or its affiliates
      Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
      
      Oracle is a registered trademark of Oracle Corporation and/or its
      affiliates. Other names may be trademarks of their respective
      owners.
      
      Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
      
      mysql> CREATE DATABASE test;
      Query OK, 1 row affected (0.01 sec)
      
      mysql> USE test;
      Database changed
      mysql> CREATE TABLE t1(id INT UNSIGNED KEY,title CHAR (1),body TEXT,FULLTEXT (title));
      Query OK, 0 rows affected (0.25 sec)
      
      mysql> SET PERSIST default_table_encryption=ONLINE_TO_KEYRING;
      Query OK, 0 rows affected (0.00 sec)
      
      mysql> CREATE FULLTEXT INDEX idx_t ON t1(title);
      ERROR 2013 (HY000): Lost connection to MySQL server during query

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              oleksandr.kachan Oleksandr Kachan
              Reporter:
              hrvoje.matijakovic Hrvoje Matijakovic
              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 - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 1 day, 2 hours
                  1d 2h

                    Smart Checklist