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

Assertion `ha_alter_info->alter_info->drop_list.elements > 0' failed in ha_innodb::prepare_inplace_alter_table

    XMLWordPrintable

    Details

      Description

      --source include/have_innodb.inc
       
      CREATE TABLE t1 (a INT, b INT) ENGINE=InnoDB;
      ALTER TABLE t1 DROP FOREIGN KEY IF EXISTS fk, DROP COLUMN b;
       
      # Cleanup
      DROP TABLE t1;
      

      10.0 9216a4f69f

      mysqld: /data/src/10.0/storage/innobase/handler/handler0alter.cc:3676: virtual bool ha_innodb::prepare_inplace_alter_table(TABLE*, Alter_inplace_info*): Assertion `ha_alter_info->alter_info->drop_list.elements > 0' failed.
      180214  1:06:12 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f70fe1e2ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x00007f70f6b66888 in ha_innodb::prepare_inplace_alter_table (this=0x7f70ea07e888, altered_table=0x7f70ea11f070, ha_alter_info=0x7f71002a6260) at /data/src/10.0/storage/innobase/handler/handler0alter.cc:3676
      #9  0x00000000008429f1 in handler::ha_prepare_inplace_alter_table (this=0x7f70ea07e888, altered_table=0x7f70ea11f070, ha_alter_info=0x7f71002a6260) at /data/src/10.0/sql/handler.cc:4206
      #10 0x0000000000700fb7 in mysql_inplace_alter_table (thd=0x7f70f2769070, table_list=0x7f70ea1a41b0, table=0x7f70ea09e470, altered_table=0x7f70ea11f070, ha_alter_info=0x7f71002a6260, inplace_supported=HA_ALTER_INPLACE_NO_LOCK_AFTER_PREPARE, target_mdl_request=0x7f71002a5cb0, alter_ctx=0x7f71002a6840) at /data/src/10.0/sql/sql_table.cc:7085
      #11 0x0000000000705852 in mysql_alter_table (thd=0x7f70f2769070, new_db=0x7f70ea1a4790 "test", new_name=0x0, create_info=0x7f71002a74e0, table_list=0x7f70ea1a41b0, alter_info=0x7f71002a7450, order_num=0, order=0x0, ignore=false) at /data/src/10.0/sql/sql_table.cc:8949
      #12 0x000000000076e2b1 in Sql_cmd_alter_table::execute (this=0x7f70ea1a47e8, thd=0x7f70f2769070) at /data/src/10.0/sql/sql_alter.cc:312
      #13 0x0000000000654607 in mysql_execute_command (thd=0x7f70f2769070) at /data/src/10.0/sql/sql_parse.cc:5114
      #14 0x0000000000657a3e in mysql_parse (thd=0x7f70f2769070, rawbuf=0x7f70ea1a4088 "ALTER TABLE t1 DROP FOREIGN KEY IF EXISTS fk, DROP COLUMN b", length=59, parser_state=0x7f71002a8640) at /data/src/10.0/sql/sql_parse.cc:6569
      #15 0x000000000064a57d in dispatch_command (command=COM_QUERY, thd=0x7f70f2769070, packet=0x7f70f81ef071 "ALTER TABLE t1 DROP FOREIGN KEY IF EXISTS fk, DROP COLUMN b", packet_length=59) at /data/src/10.0/sql/sql_parse.cc:1296
      #16 0x000000000064987d in do_command (thd=0x7f70f2769070) at /data/src/10.0/sql/sql_parse.cc:999
      #17 0x0000000000769a04 in do_handle_one_connection (thd_arg=0x7f70f2769070) at /data/src/10.0/sql/sql_connect.cc:1377
      #18 0x0000000000769776 in handle_one_connection (arg=0x7f70f2769070) at /data/src/10.0/sql/sql_connect.cc:1292
      #19 0x0000000000aca0fc in pfs_spawn_thread (arg=0x7f70f2719670) at /data/src/10.0/storage/perfschema/pfs.cc:1861
      #20 0x00007f70ffee6494 in start_thread (arg=0x7f71002a9700) at pthread_create.c:333
      #21 0x00007f70fe29f93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      No visible effect on non-debug builds.

        Attachments

          Activity

            People

            Assignee:
            monty Michael Widenius
            Reporter:
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: