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

Server crashes in prepare_inplace_alter_table_dict upon altering a table with discarded tablespace

    XMLWordPrintable

Details

    Description

      --source include/have_innodb.inc
      CREATE TABLE t1 (a SERIAL) ENGINE = InnoDB;
      ALTER TABLE t1 DISCARD TABLESPACE;
      ALTER TABLE t1 ENGINE InnoDB;
      

      10.1 06106c01481

      #3  <signal handler called>
      #4  0x00007f23f331df74 in prepare_inplace_alter_table_dict (ha_alter_info=0x7f23fc304b00, altered_table=0x7f23e3d79070, old_table=0x7f23e3c81c70, table_name=0x7f23e3c68f5d "t1", flags=1, flags2=80, fts_doc_id_col=18446744073709551615, add_fts_doc_id=false, add_fts_doc_id_idx=false) at /data/src/10.1/storage/innobase/handler/handler0alter.cc:2899
      #5  0x00007f23f3321f74 in ha_innodb::prepare_inplace_alter_table (this=0x7f23e3cb0888, altered_table=0x7f23e3d79070, ha_alter_info=0x7f23fc304b00) at /data/src/10.1/storage/innobase/handler/handler0alter.cc:4163
      #6  0x000055cbd92f05ff in handler::ha_prepare_inplace_alter_table (this=0x7f23e3cb0888, altered_table=0x7f23e3d79070, ha_alter_info=0x7f23fc304b00) at /data/src/10.1/sql/handler.cc:4170
      #7  0x000055cbd916f560 in mysql_inplace_alter_table (thd=0x7f23f07c7070, table_list=0x7f23e3cfa170, table=0x7f23e3c81c70, altered_table=0x7f23e3d79070, ha_alter_info=0x7f23fc304b00, inplace_supported=HA_ALTER_INPLACE_NO_LOCK_AFTER_PREPARE, target_mdl_request=0x7f23fc304b70, alter_ctx=0x7f23fc305710) at /data/src/10.1/sql/sql_table.cc:7128
      #8  0x000055cbd9173f45 in mysql_alter_table (thd=0x7f23f07c7070, new_db=0x7f23e3cfa760 "test", new_name=0x0, create_info=0x7f23fc306300, table_list=0x7f23e3cfa170, alter_info=0x7f23fc306270, order_num=0, order=0x0, ignore=false) at /data/src/10.1/sql/sql_table.cc:8973
      #9  0x000055cbd91e4a0f in Sql_cmd_alter_table::execute (this=0x7f23e3cfa770, thd=0x7f23f07c7070) at /data/src/10.1/sql/sql_alter.cc:325
      #10 0x000055cbd90b5c7a in mysql_execute_command (thd=0x7f23f07c7070) at /data/src/10.1/sql/sql_parse.cc:5699
      #11 0x000055cbd90b9f2b in mysql_parse (thd=0x7f23f07c7070, rawbuf=0x7f23e3cfa088 "ALTER TABLE t1 ENGINE InnoDB", length=28, parser_state=0x7f23fc3075e0) at /data/src/10.1/sql/sql_parse.cc:7344
      #12 0x000055cbd90a8e8a in dispatch_command (command=COM_QUERY, thd=0x7f23f07c7070, packet=0x7f23f2719071 "ALTER TABLE t1 ENGINE InnoDB", packet_length=28) at /data/src/10.1/sql/sql_parse.cc:1484
      #13 0x000055cbd90a7c27 in do_command (thd=0x7f23f07c7070) at /data/src/10.1/sql/sql_parse.cc:1106
      #14 0x000055cbd91dffa1 in do_handle_one_connection (thd_arg=0x7f23f07c7070) at /data/src/10.1/sql/sql_connect.cc:1349
      #15 0x000055cbd91dfd05 in handle_one_connection (arg=0x7f23f07c7070) at /data/src/10.1/sql/sql_connect.cc:1261
      #16 0x000055cbd9597cf2 in pfs_spawn_thread (arg=0x7f23f26e2970) at /data/src/10.1/storage/perfschema/pfs.cc:1860
      #17 0x00007f23fbf98494 in start_thread (arg=0x7f23fc308b00) at pthread_create.c:333
      #18 0x00007f23fa0e393f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      The crash was introduced by this commit:

      commit 50eb40a2a8aa3af6cc271f6028f4d6d74301d030
      Author: Jan Lindström <jan.lindstrom@mariadb.com>
      Date:   Tue Mar 14 12:56:01 2017 +0200
       
          MDEV-11738: Mariadb uses 100% of several of my 8 cpus doing nothing
          
          MDEV-11581: Mariadb starts InnoDB encryption threads
          when key has not changed or data scrubbing turned off
      

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.