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

Server aborts when table does drop column

    XMLWordPrintable

Details

    Description

      --source include/have_innodb.inc
       
      CREATE TABLE t (a VARCHAR(40), b INT) ENGINE=InnoDB;
      ALTER TABLE t MODIFY a VARCHAR(50), DROP b;
       
      # Cleanup
      DROP TABLE t;
      

      10.4 b54e4bf0

      #3  <signal handler called>
      #4  0x000055a44cabf7a2 in ha_innobase::prepare_inplace_alter_table (this=0x61d000247ca8, altered_table=0x7f878da61150, ha_alter_info=0x7f878da5f3e0) at /data/src/10.4/storage/innobase/handler/handler0alter.cc:8338
      #5  0x000055a44c070d95 in handler::ha_prepare_inplace_alter_table (this=0x61d000247ca8, altered_table=0x7f878da61150, ha_alter_info=0x7f878da5f3e0) at /data/src/10.4/sql/handler.cc:4672
      #6  0x000055a44bb1d068 in mysql_inplace_alter_table (thd=0x62b00009a208, table_list=0x62b0000a1358, table=0x62000003c088, altered_table=0x7f878da61150, ha_alter_info=0x7f878da5f3e0, target_mdl_request=0x7f878da5f600, alter_ctx=0x7f878da60660) at /data/src/10.4/sql/sql_table.cc:7882
      #7  0x000055a44bb2fc35 in mysql_alter_table (thd=0x62b00009a208, new_db=0x62b00009ea10, new_name=0x62b00009ee68, create_info=0x7f878da62250, table_list=0x62b0000a1358, recreate_info=0x7f878da620b0, alter_info=0x7f878da62150, order_num=0, order=0x0, ignore=false) at /data/src/10.4/sql/sql_table.cc:10446
      #8  0x000055a44bcb66bc in Sql_cmd_alter_table::execute (this=0x62b0000a1be8, thd=0x62b00009a208) at /data/src/10.4/sql/sql_alter.cc:531
      #9  0x000055a44b8bfe35 in mysql_execute_command (thd=0x62b00009a208) at /data/src/10.4/sql/sql_parse.cc:6216
      #10 0x000055a44b8cb6af in mysql_parse (thd=0x62b00009a208, rawbuf=0x62b0000a1228 "ALTER TABLE t MODIFY a VARCHAR(50), DROP b", length=42, parser_state=0x7f878da64860, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:8010
      #11 0x000055a44b8a197a in dispatch_command (command=COM_QUERY, thd=0x62b00009a208, packet=0x62900029e209 "ALTER TABLE t MODIFY a VARCHAR(50), DROP b", packet_length=42, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1857
      #12 0x000055a44b89e4e9 in do_command (thd=0x62b00009a208) at /data/src/10.4/sql/sql_parse.cc:1378
      #13 0x000055a44bc9da48 in do_handle_one_connection (connect=0x608000000ba8) at /data/src/10.4/sql/sql_connect.cc:1420
      #14 0x000055a44bc9d35f in handle_one_connection (arg=0x608000000ba8) at /data/src/10.4/sql/sql_connect.cc:1324
      #15 0x000055a44c90cdd4 in pfs_spawn_thread (arg=0x615000006208) at /data/src/10.4/storage/perfschema/pfs.cc:1869
      #16 0x00007f87a26a7fd4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #17 0x00007f87a27285bc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      The failure started happening after this commit in 10.4:

      commit 5f09b53bdb4e973e7c7ec2c53a24c98321223f98 423c28f0aa47df796ac4eda5a2288b9fd12d5d31
      Author:     Thirunarayanan Balathandayuthapani
      AuthorDate: Mon Jun 5 19:09:38 2023 +0530
      CommitDate: Tue Jun 27 16:58:22 2023 +0530
       
          MDEV-31086 MODIFY COLUMN can break FK constraints, and lead to unrestorable dumps
      

      Attachments

        Issue Links

          Activity

            People

              thiru Thirunarayanan Balathandayuthapani
              elenst Elena Stepanova
              Votes:
              1 Vote for this issue
              Watchers:
              5 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.