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

Misleading error message for non-existing ENCRYPTION_KEY_ID

Details

    Description

      When we're trying to encrypt a table with a non-existing key id using 'file_key_management' plugin the error message shown is misleading.

      Repro
      ------
      Key file>

      cat var/tmp/fifo-key.txt
      1;11111111111111111111111111111111
      2;00000000000000000000000000000000
      3;22222222222222222222222222222222
      

      MariaDB [test]> INSTALL SONAME 'file_key_management';
      Query OK, 0 rows affected, 1 warning (0.001 sec)
       
      MariaDB [test]> CREATE TABLE t1(c1 BIGINT NOT NULL, b CHAR(200))  ENGINE=INNODB ENCRYPTED=YES ENCRYPTION_KEY_ID=1;
      Query OK, 0 rows affected (0.002 sec)
       
      MariaDB [test]> ALTER TABLE t1 ENCRYPTION_KEY_ID=4;
      ERROR 1478 (HY000): Table storage engine 'InnoDB' does not support the create option 'ENCRYPTION_KEY_ID'
       
      MariaDB [test]> CREATE TABLE t2(c1 BIGINT NOT NULL, b CHAR(200))  ENGINE=INNODB ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
      ERROR 1005 (HY000): Can't create table `test`.`t2` (errno: 140 "Wrong create options")
      MariaDB [test]>
      

      Expected behavior
      -------------------
      The error message should say> the key id is not existing or is invalid.

      Attachments

        Issue Links

          Activity

            There are no comments yet on this issue.

            People

              serg Sergei Golubchik
              susil.behera Susil Behera
              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.