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

No table can be created after second encryption plugin attempted to load

    Details

      Description

      The error below happens after attempt to load second encryption plugin (in any order tried aws_key_management, file_key_management and debug_key_management)

      MariaDB [test]> select * from information_schema.plugins where plugin_type='encryption';
      +---------------------+----------------+---------------+-------------+---------------------+------------------------+------------------------+------------------------+----------------------------------+----------------+-------------+-----------------+---------------------+
      | PLUGIN_NAME         | PLUGIN_VERSION | PLUGIN_STATUS | PLUGIN_TYPE | PLUGIN_TYPE_VERSION | PLUGIN_LIBRARY         | PLUGIN_LIBRARY_VERSION | PLUGIN_AUTHOR          | PLUGIN_DESCRIPTION               | PLUGIN_LICENSE | LOAD_OPTION | PLUGIN_MATURITY | PLUGIN_AUTH_VERSION |
      +---------------------+----------------+---------------+-------------+---------------------+------------------------+------------------------+------------------------+----------------------------------+----------------+-------------+-----------------+---------------------+
      | file_key_management | 1.0            | ACTIVE        | ENCRYPTION  | 3.0                 | file_key_management.so | 1.13                   | Denis Endro eperi GmbH | File-based key management plugin | GPL            | ON          | Stable          | 1.0                 |
      +---------------------+----------------+---------------+-------------+---------------------+------------------------+------------------------+------------------------+----------------------------------+----------------+-------------+-----------------+---------------------+
       
      MariaDB [test]> create table a(i int)  engine=innodb;
      Query OK, 0 rows affected (0.22 sec)
       
      MariaDB [test]> drop table a;
      Query OK, 0 rows affected (0.10 sec)
       
      MariaDB [test]> install plugin debug_key_management soname 'debug_key_management.so';
      ERROR 1123 (HY000): Can't initialize function 'debug_key_management'; Plugin initialization function failed.
      MariaDB [test]> create table a(i int)  engine=innodb;
      ERROR 1005 (HY000): Can't create table `test`.`a` (errno: 140 "Wrong create options")
      

      Error log has only this message startup:

      Version: '10.1.24-MariaDB'  socket: '/home/a/test1/dt/my.sock'  port: 3311  Source distribution
      2017-05-22 11:34:52 140430689876736 [ERROR] Plugin 'debug_key_management' registration as a ENCRYPTION failed.
      

      Similar problem happens when attempting to install database with incorrect option

       /usr/local/mysql/scripts/mysql_install_db --no-defaults --basedir=/usr/local/mysql --plugin-load-add=file_key_management --file-key-management-filename=$(pwd)/mysql-test/std_data/keys.txt --innodb-encrypt-tables --innodb-encrypt-log --plugin_load_add=debug_key_management 
       
      2017-05-22 11:20:30 140644433411008 [ERROR] Plugin 'file_key_management' registration as a ENCRYPTION failed.
      2017-05-22 11:20:30 140644433411008 [Note] InnoDB: Using mutexes to ref count buffer pool pages
      2017-05-22 11:20:30 140644433411008 [Note] InnoDB: The InnoDB memory heap is disabled
      2017-05-22 11:20:30 140644433411008 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
      2017-05-22 11:20:30 140644433411008 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
      2017-05-22 11:20:30 140644433411008 [Note] InnoDB: Compressed tables use zlib 1.2.8
      2017-05-22 11:20:30 140644433411008 [Note] InnoDB: Using Linux native AIO
      2017-05-22 11:20:30 140644433411008 [Note] InnoDB: Using SSE crc32 instructions
      2017-05-22 11:20:30 140644433411008 [Note] InnoDB: Initializing buffer pool, size = 128.0M
      2017-05-22 11:20:30 140644433411008 [Note] InnoDB: Completed initialization of buffer pool
      2017-05-22 11:20:30 140644433411008 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
      2017-05-22 11:20:30 140644433411008 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
      2017-05-22 11:20:30 140644433411008 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
      2017-05-22 11:20:31 140644433411008 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
      2017-05-22 11:20:32 140644433411008 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
      2017-05-22 11:20:32 140644433411008 [Warning] InnoDB: New log files created, LSN=45883
      2017-05-22 11:20:32 140644433411008 [Note] InnoDB: Doublewrite buffer not found: creating new
      2017-05-22 11:20:32 140644433411008 [Note] InnoDB: Doublewrite buffer created
      2017-05-22 11:20:32 140644433411008 [Note] InnoDB: 128 rollback segment(s) are active.
      2017-05-22 11:20:32 140644433411008 [Warning] InnoDB: Creating foreign key constraint system tables.
      2017-05-22 11:20:32 140644433411008 [Note] InnoDB: Foreign key constraint system tables created
      2017-05-22 11:20:32 140644433411008 [Note] InnoDB: Creating tablespace and datafile system tables.
      2017-05-22 11:20:32 140644433411008 [Note] InnoDB: Tablespace and datafile system tables created.
      2017-05-22 11:20:32 140644433411008 [Note] InnoDB: Waiting for purge to start
      2017-05-22 11:20:32 140644433411008 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.35-80.0 started; log sequence number 0
      2017-05-22 11:20:32 140643716298496 [Note] InnoDB: Dumping buffer pool(s) not yet started
      ERROR: 1005  Can't create table `mysql`.`innodb_table_stats` (errno: 140 "Wrong create options")
      2017-05-22 11:20:33 140644433411008 [ERROR] Aborting
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                serg Sergei Golubchik
                Reporter:
                anikitin Andrii Nikitin (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: