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

Server crash in instant_alter_column_possible or Assertion `!pk->has_virtual()' failed in instant_alter_column_possible upon adding key

    XMLWordPrintable

Details

    Description

      Note: The problem appeared in 10.4 tree with MDEV-371, even though there are no BLOBs in the scenario.

      --source include/have_innodb.inc
      CREATE TABLE t1 (pk INT, PRIMARY KEY USING HASH (pk)) ENGINE=InnoDB;
      ALTER TABLE t1 ADD INDEX (pk);
       
      # Cleanup
      DROP TABLE t1;
      

      10.4 3b47587f

      mysqld: /data/src/10.4/storage/innobase/handler/handler0alter.cc:1489: bool instant_alter_column_possible(const dict_table_t&, const Alter_inplace_info*, const TABLE*, const TABLE*): Assertion `!pk->has_virtual()' failed.
      190303 14:51:32 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f27ba5adee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x000055e41be49ed7 in instant_alter_column_possible (ib_table=..., ha_alter_info=0x7f27b4123900, table=0x7f27601a2fb0, altered_table=0x7f2760153210) at /data/src/10.4/storage/innobase/handler/handler0alter.cc:1489
      #9  0x000055e41be4ad44 in ha_innobase::check_if_supported_inplace_alter (this=0x7f276000d1f8, altered_table=0x7f2760153210, ha_alter_info=0x7f27b4123900) at /data/src/10.4/storage/innobase/handler/handler0alter.cc:1915
      #10 0x000055e41b87bb3f in mysql_alter_table (thd=0x7f2760000b00, new_db=0x7f2760005290, new_name=0x7f2760005690, create_info=0x7f27b4124cd0, table_list=0x7f2760015590, alter_info=0x7f27b4124c10, order_num=0, order=0x0, ignore=false) at /data/src/10.4/sql/sql_table.cc:9890
      #11 0x000055e41b90a0ee in Sql_cmd_alter_table::execute (this=0x7f2760015d08, thd=0x7f2760000b00) at /data/src/10.4/sql/sql_alter.cc:499
      #12 0x000055e41b79b48e in mysql_execute_command (thd=0x7f2760000b00) at /data/src/10.4/sql/sql_parse.cc:6346
      #13 0x000055e41b7a0636 in mysql_parse (thd=0x7f2760000b00, rawbuf=0x7f27600154a8 "ALTER TABLE t1 ADD INDEX (pk)", length=29, parser_state=0x7f27b4126180, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:8157
      #14 0x000055e41b78bd24 in dispatch_command (command=COM_QUERY, thd=0x7f2760000b00, packet=0x7f2760139fd1 "ALTER TABLE t1 ADD INDEX (pk)", packet_length=29, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1829
      #15 0x000055e41b78a4f8 in do_command (thd=0x7f2760000b00) at /data/src/10.4/sql/sql_parse.cc:1358
      #16 0x000055e41b904003 in do_handle_one_connection (connect=0x55e41e0c4d10) at /data/src/10.4/sql/sql_connect.cc:1399
      #17 0x000055e41b903d74 in handle_one_connection (arg=0x55e41e0c4d10) at /data/src/10.4/sql/sql_connect.cc:1302
      #18 0x000055e41bdfad17 in pfs_spawn_thread (arg=0x55e41e10ab80) at /data/src/10.4/storage/perfschema/pfs.cc:1862
      #19 0x00007f27bc284494 in start_thread (arg=0x7f27b4127700) at pthread_create.c:333
      #20 0x00007f27ba66a93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Non-debug builds crashes with the stack trace of MDEV-18798, minus prior "no matching column" error.

      10.4 non-debug 3b47587f

      #2  <signal handler called>
      #3  0x00005581c1a498ce in ha_innobase::commit_inplace_alter_table (this=<optimized out>, altered_table=<optimized out>, ha_alter_info=<optimized out>, commit=<optimized out>) at /data/src/10.4/storage/innobase/handler/handler0alter.cc:11131
      #4  0x00005581c1521714 in mysql_inplace_alter_table (thd=thd@entry=0x7f77300009a8, table_list=0x7f7730011f88, table=table@entry=0x7f77300825a8, altered_table=altered_table@entry=0x7f77300c7af8, ha_alter_info=ha_alter_info@entry=0x7f777c092e10, inplace_supported=inplace_supported@entry=HA_ALTER_INPLACE_NOCOPY_NO_LOCK, alter_ctx=0x7f777c093660, target_mdl_request=0x7f777c092eb0) at /data/src/10.4/sql/sql_table.cc:7695
      #5  0x00005581c16ad33b in mysql_alter_table (thd=<optimized out>, new_db=<optimized out>, new_name=<optimized out>, create_info=<optimized out>, table_list=0x7f7730011f88, alter_info=0x7f777c094160, order_num=0, order=0x0, ignore=false) at /data/src/10.4/sql/sql_table.cc:9922
      #6  0x00005581c16fb57b in Sql_cmd_alter_table::execute (this=0x7f7730000040, thd=0x7f77300009a8) at /data/src/10.4/sql/sql_alter.cc:499
      #7  0x00005581c1613256 in mysql_execute_command (thd=thd@entry=0x7f77300009a8) at /data/src/10.4/sql/sql_parse.cc:6346
      #8  0x00005581c161a711 in mysql_parse (thd=thd@entry=0x7f77300009a8, rawbuf=<optimized out>, length=29, parser_state=parser_state@entry=0x7f777c0971d0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.4/sql/sql_parse.cc:8157
      #9  0x00005581c161cf3f in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f77300009a8, packet=packet@entry=0x7f7730009b39 "ALTER TABLE t1 ADD INDEX (pk)", packet_length=packet_length@entry=29, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.4/sql/sql_parse.cc:1829
      #10 0x00005581c161e397 in do_command (thd=0x7f77300009a8) at /data/src/10.4/sql/sql_parse.cc:1358
      #11 0x00005581c16f894c in do_handle_one_connection (connect=connect@entry=0x5581c376a718) at /data/src/10.4/sql/sql_connect.cc:1399
      #12 0x00005581c16f8ab4 in handle_one_connection (arg=arg@entry=0x5581c376a718) at /data/src/10.4/sql/sql_connect.cc:1302
      #13 0x00005581c1a16154 in pfs_spawn_thread (arg=0x5581c376a778) at /data/src/10.4/storage/perfschema/pfs.cc:1862
      #14 0x00007f77839f6494 in start_thread (arg=0x7f777c098700) at pthread_create.c:333
      #15 0x00007f7781ddc93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Attachments

        Issue Links

          Activity

            People

              sachin.setiya.007 Sachin Setiya (Inactive)
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.