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

Wrong error code/message 1478: 'Table storage engine 'InnoDB' does not support the create option 'ENCRYPTION_KEY_ID'

Details

    Description

      ALTER in following test case produces an unexpected error message/code:

      --source include/have_innodb.inc
      --source suite/encryption/include/have_file_key_management_plugin.inc
       
      CREATE TABLE t1 (i INT) ENGINE=InnoDB ENCRYPTED=YES;
      # Here should be --error <error code>
      ALTER TABLE t1 ENCRYPTION_KEY_ID = 9;
       
      # Cleanup
      DROP TABLE t1;
      

      mysqltest: At line 5: query 'ALTER TABLE t1 ENCRYPTION_KEY_ID = 9' failed: 1478: Table storage engine 'InnoDB' does not support the create option 'ENCRYPTION_KEY_ID'
      

      The change was introduced in 10.1.29 by this commit:

      commit 88edb1b3edcea0dad82659ca6622448e535a3fa6
      Author: Marko Mäkelä <marko.makela@mariadb.com>
      Date:   Mon Oct 30 18:47:43 2017 +0200
       
          MDEV-14219 Allow online table rebuild when encryption or compression parameters change
      

      Judging by test result modifications in the commit, it was intentional. However, it is really wrong and misleading, the table option is obviously supported, it's just the key value that's wrong.

      Attachments

        Issue Links

          Activity

            serg, how could this be fixed? I seem to remember that you are reluctant to add storage engine specific error messages.

            marko Marko Mäkelä added a comment - serg , how could this be fixed? I seem to remember that you are reluctant to add storage engine specific error messages.

            Yes, to the server-wide errmsg-utf8.txt file.

            But InnoDB does that in many places, and it's quite fine:

            push_warning(
            	m_thd, Sql_condition::WARN_LEVEL_WARN,
            	ER_ILLEGAL_HA_CREATE_OPTION,
            	"InnoDB: DATA DIRECTORY requires"
            	" innodb_file_per_table.");
            

            I cannot say if it's applicable to this particular case as I cannot understand from the commit 88edb1b3edc, how it had caused ER_ILLEGAL_HA_CREATE_OPTION to appear.

            serg Sergei Golubchik added a comment - Yes, to the server-wide errmsg-utf8.txt file. But InnoDB does that in many places, and it's quite fine: push_warning( m_thd, Sql_condition::WARN_LEVEL_WARN, ER_ILLEGAL_HA_CREATE_OPTION, "InnoDB: DATA DIRECTORY requires" " innodb_file_per_table." ); I cannot say if it's applicable to this particular case as I cannot understand from the commit 88edb1b3edc, how it had caused ER_ILLEGAL_HA_CREATE_OPTION to appear.

            It looks like the easiest fix of this would be to allow create_table_info_t::create_options_are_invalid() and create_table_info_t::check_table_options() construct a complete string, such as ENCRYPTION_KEY_ID=9, possibly in a fixed-length data member of create_table_info_t. We also claim that ROW_FORMAT is not supported, when referring to specific ROW_FORMAT values under certain circumstances.

            marko Marko Mäkelä added a comment - It looks like the easiest fix of this would be to allow create_table_info_t::create_options_are_invalid() and create_table_info_t::check_table_options() construct a complete string, such as ENCRYPTION_KEY_ID=9 , possibly in a fixed-length data member of create_table_info_t . We also claim that ROW_FORMAT is not supported, when referring to specific ROW_FORMAT values under certain circumstances.

            People

              vlad.lesin Vladislav Lesin
              elenst Elena Stepanova
              Votes:
              1 Vote for this issue
              Watchers:
              4 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.