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

Server crashed in innobase_build_col_map / prepare_inplace_alter_table_dict or Assertion `tuple' failed in dtuple_get_nth_field upon altering table with virtual column

    XMLWordPrintable

Details

    Description

      --source include/have_innodb.inc
       
      CREATE TABLE t1 (a INT, v INT AS (a), d INT NOT NULL, e INT) ENGINE=InnoDB;
      ALTER TABLE t1 FORCE;
       
      # Cleanup
      DROP TABLE t1;
      

      10.3 2b27ac8282ed

      mysqld: /data/src/10.3/storage/innobase/include/data0data.ic:432: dfield_t* dtuple_get_nth_field(const dtuple_t*, ulint): Assertion `tuple' failed.
      180502  1:35:11 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fdfe371cee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x00005638929b2d2d in dtuple_get_nth_field (tuple=0x0, n=2) at /data/src/10.3/storage/innobase/include/data0data.ic:432
      #9  0x00005638929bdca6 in innobase_build_col_map (ha_alter_info=0x7fdfdca5f3f0, altered_table=0x7fdf8816af60, table=0x7fdf8800baf0, new_table=0x7fdf8807d698, old_table=0x7fdf8807ecf8, defaults=0x0, heap=0x7fdf8807ce50) at /data/src/10.3/storage/innobase/handler/handler0alter.cc:3293
      #10 0x00005638929c3543 in prepare_inplace_alter_table_dict (ha_alter_info=0x7fdfdca5f3f0, altered_table=0x7fdf8816af60, old_table=0x7fdf8800baf0, table_name=0x7fdf8800f0c5 "t1", flags=33, flags2=80, fts_doc_id_col=18446744073709551615, add_fts_doc_id=false, add_fts_doc_id_idx=false) at /data/src/10.3/storage/innobase/handler/handler0alter.cc:5150
      #11 0x00005638929c96a2 in ha_innobase::prepare_inplace_alter_table (this=0x7fdf8800c738, altered_table=0x7fdf8816af60, ha_alter_info=0x7fdfdca5f3f0) at /data/src/10.3/storage/innobase/handler/handler0alter.cc:6892
      #12 0x0000563892676c4f in handler::ha_prepare_inplace_alter_table (this=0x7fdf8800c738, altered_table=0x7fdf8816af60, ha_alter_info=0x7fdfdca5f3f0) at /data/src/10.3/sql/handler.cc:4386
      #13 0x00005638924619fb in mysql_inplace_alter_table (thd=0x7fdf88000b00, table_list=0x7fdf88014e40, table=0x7fdf8800baf0, altered_table=0x7fdf8816af60, ha_alter_info=0x7fdfdca5f3f0, inplace_supported=HA_ALTER_INPLACE_NO_LOCK_AFTER_PREPARE, target_mdl_request=0x7fdfdca5f460, alter_ctx=0x7fdfdca60060) at /data/src/10.3/sql/sql_table.cc:7456
      #14 0x0000563892467cb7 in mysql_alter_table (thd=0x7fdf88000b00, new_db=0x7fdf88005168, new_name=0x7fdf88005518, create_info=0x7fdfdca60c50, table_list=0x7fdf88014e40, alter_info=0x7fdfdca60b90, order_num=0, order=0x0, ignore=false) at /data/src/10.3/sql/sql_table.cc:9670
      #15 0x00005638924ed10a in Sql_cmd_alter_table::execute (this=0x7fdf88015498, thd=0x7fdf88000b00) at /data/src/10.3/sql/sql_alter.cc:334
      #16 0x0000563892393ff1 in mysql_execute_command (thd=0x7fdf88000b00) at /data/src/10.3/sql/sql_parse.cc:6282
      #17 0x0000563892398abe in mysql_parse (thd=0x7fdf88000b00, rawbuf=0x7fdf88014d68 "ALTER TABLE t1 FORCE", length=20, parser_state=0x7fdfdca625d0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8001
      #18 0x00005638923862a1 in dispatch_command (command=COM_QUERY, thd=0x7fdf88000b00, packet=0x7fdf88125fb1 "ALTER TABLE t1 FORCE", packet_length=20, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1846
      #19 0x0000563892384ce0 in do_command (thd=0x7fdf88000b00) at /data/src/10.3/sql/sql_parse.cc:1391
      #20 0x00005638924e7b95 in do_handle_one_connection (connect=0x56389501c540) at /data/src/10.3/sql/sql_connect.cc:1402
      #21 0x00005638924e7922 in handle_one_connection (arg=0x56389501c540) at /data/src/10.3/sql/sql_connect.cc:1308
      #22 0x000056389296ba1f in pfs_spawn_thread (arg=0x5638950249c0) at /data/src/10.3/storage/perfschema/pfs.cc:1862
      #23 0x00007fdfe53f3494 in start_thread (arg=0x7fdfdca63700) at pthread_create.c:333
      #24 0x00007fdfe37d993f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      10.3 non-debug 2b27ac8282e

      #2  <signal handler called>
      #3  0x00007f3105db5812 in innobase_build_col_map (heap=0x7f30b406a4c0, defaults=0x0, old_table=0x7f30b4063bb0, new_table=<optimized out>, table=0x7f30b4075a08, altered_table=0x7f30b4068318, ha_alter_info=0x7f30fe743de0) at /data/src/10.3/storage/innobase/handler/handler0alter.cc:3293
      #4  prepare_inplace_alter_table_dict (ha_alter_info=ha_alter_info@entry=0x7f30fe743de0, altered_table=altered_table@entry=0x7f30b4068318, old_table=<optimized out>, table_name=<optimized out>, flags=<optimized out>, flags2=<optimized out>, fts_doc_id_col=18446744073709551615, add_fts_doc_id=false, add_fts_doc_id_idx=<optimized out>) at /data/src/10.3/storage/innobase/handler/handler0alter.cc:5150
      #5  0x00007f310625532c in ha_innobase::prepare_inplace_alter_table (this=<optimized out>, altered_table=<optimized out>, ha_alter_info=<optimized out>) at /data/src/10.3/storage/innobase/handler/handler0alter.cc:6892
      #6  0x00007f3105f2c49b in mysql_inplace_alter_table (target_mdl_request=0x7f30fe743e80, alter_ctx=0x7f30fe744a90, inplace_supported=HA_ALTER_INPLACE_NO_LOCK_AFTER_PREPARE, ha_alter_info=0x7f30fe743de0, altered_table=0x7f30b4068318, table=0x7f30b4075a08, table_list=0x7f30b4011768, thd=0x7f30b40009a8) at /data/src/10.3/sql/sql_table.cc:7456
      #7  mysql_alter_table (thd=thd@entry=0x7f30b40009a8, new_db=new_db@entry=0x7f30b4004e48, new_name=new_name@entry=0x7f30b40051f8, create_info=create_info@entry=0x7f30fe745640, table_list=table_list@entry=0x7f30b4011768, alter_info=alter_info@entry=0x7f30fe745580, order_num=0, order=0x0, ignore=false) at /data/src/10.3/sql/sql_table.cc:9670
      #8  0x00007f3105f7cabc in Sql_cmd_alter_table::execute (this=<optimized out>, thd=0x7f30b40009a8) at /data/src/10.3/sql/sql_alter.cc:334
      #9  0x00007f3105e96e40 in mysql_execute_command (thd=thd@entry=0x7f30b40009a8) at /data/src/10.3/sql/sql_parse.cc:6282
      #10 0x00007f3105e9d95e in mysql_parse (thd=0x7f30b40009a8, rawbuf=<optimized out>, length=20, parser_state=0x7f30fe7475e0, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.3/sql/sql_parse.cc:8001
      #11 0x00007f3105ea03df in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f30b40009a8, packet=packet@entry=0x7f30b4009329 "ALTER TABLE t1 FORCE", packet_length=packet_length@entry=20, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.3/sql/sql_parse.cc:1846
      #12 0x00007f3105ea0cb7 in do_command (thd=0x7f30b40009a8) at /data/src/10.3/sql/sql_parse.cc:1391
      #13 0x00007f3105f79b62 in do_handle_one_connection (connect=connect@entry=0x7f3108542488) at /data/src/10.3/sql/sql_connect.cc:1402
      #14 0x00007f3105f79cfd in handle_one_connection (arg=arg@entry=0x7f3108542488) at /data/src/10.3/sql/sql_connect.cc:1308
      #15 0x00007f3106207971 in pfs_spawn_thread (arg=0x7f31085426e8) at /data/src/10.3/storage/perfschema/pfs.cc:1862
      #16 0x00007f31054c0064 in start_thread (arg=0x7f30fe748700) at pthread_create.c:309
      #17 0x00007f31043a162d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
      

      The problem was introduced by this commit:

      commit 4f9977d8d3292caf509227154dafc416a178d17d
      Author: Thirunarayanan Balathandayuthapani <thiru@mariadb.com>
      Date:   Tue Apr 24 13:15:35 2018 +0530
       
          MDEV-14168 Unconditionally allow ALGORITHM=INPLACE for setting a column NOT NULL
      

      Attachments

        Issue Links

          Activity

            People

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