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

Assertion `n < tuple->n_fields' failed in dtuple_get_nth_field upon INSERT after DROP COLUMN

    XMLWordPrintable

Details

    Description

      Note: Probably closely related to MDEV-18076.

      --source include/have_innodb.inc
       
      CREATE TABLE t1 (
        f INT,
        pk INT NOT NULL AUTO_INCREMENT,
        KEY (pk)
      ) ENGINE=InnoDB;
       
      ALTER TABLE t1 DROP COLUMN f;
      INSERT INTO t1 (pk) VALUES (1);
       
      # Cleanup
      DROP TABLE t1;
      

      10.4 a8eb0c76b

      mysqld: /data/src/10.4/storage/innobase/include/data0data.ic:433: dfield_t* dtuple_get_nth_field(const dtuple_t*, ulint): Assertion `n < tuple->n_fields' failed.
      181225  0:52:29 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f3deac4cee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x000055f619cfbdf4 in dtuple_get_nth_field (tuple=0x7f3d9807a538, n=4) at /data/src/10.4/storage/innobase/include/data0data.ic:433
      #9  0x000055f619d05887 in row_ins_clust_index_entry_low (flags=0, mode=2, index=0x7f3d981323e8, n_uniq=0, entry=0x7f3d9807a538, n_ext=0, thr=0x7f3d9816c250, dup_chk_only=false) at /data/src/10.4/storage/innobase/row/row0ins.cc:2611
      #10 0x000055f619d077ea in row_ins_clust_index_entry (index=0x7f3d981323e8, entry=0x7f3d9807a538, thr=0x7f3d9816c250, n_ext=0, dup_chk_only=false) at /data/src/10.4/storage/innobase/row/row0ins.cc:3252
      #11 0x000055f619d07ca0 in row_ins_index_entry (index=0x7f3d981323e8, entry=0x7f3d9807a538, thr=0x7f3d9816c250) at /data/src/10.4/storage/innobase/row/row0ins.cc:3377
      #12 0x000055f619d08375 in row_ins_index_entry_step (node=0x7f3d9816bff8, thr=0x7f3d9816c250) at /data/src/10.4/storage/innobase/row/row0ins.cc:3545
      #13 0x000055f619d087a9 in row_ins (node=0x7f3d9816bff8, thr=0x7f3d9816c250) at /data/src/10.4/storage/innobase/row/row0ins.cc:3688
      #14 0x000055f619d08fa9 in row_ins_step (thr=0x7f3d9816c250) at /data/src/10.4/storage/innobase/row/row0ins.cc:3933
      #15 0x000055f619d28a67 in row_insert_for_mysql (mysql_rec=0x7f3d98042100 "\377\001", prebuilt=0x7f3d9816bad8, ins_mode=ROW_INS_NORMAL) at /data/src/10.4/storage/innobase/row/row0mysql.cc:1460
      #16 0x000055f619bc6832 in ha_innobase::write_row (this=0x7f3d9804f328, record=0x7f3d98042100 "\377\001") at /data/src/10.4/storage/innobase/handler/ha_innodb.cc:8066
      #17 0x000055f6198a0cc0 in handler::ha_write_row (this=0x7f3d9804f328, buf=0x7f3d98042100 "\377\001") at /data/src/10.4/sql/handler.cc:6273
      #18 0x000055f619540279 in write_record (thd=0x7f3d98000b00, table=0x7f3d980503d0, info=0x7f3ddff69b90) at /data/src/10.4/sql/sql_insert.cc:2022
      #19 0x000055f61953d5fd in mysql_insert (thd=0x7f3d98000b00, table_list=0x7f3d98015080, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR, ignore=false) at /data/src/10.4/sql/sql_insert.cc:1063
      #20 0x000055f619583c59 in mysql_execute_command (thd=0x7f3d98000b00) at /data/src/10.4/sql/sql_parse.cc:4730
      #21 0x000055f61958e8e4 in mysql_parse (thd=0x7f3d98000b00, rawbuf=0x7f3d98014f98 "INSERT INTO t1 (pk) VALUES (1)", length=30, parser_state=0x7f3ddff6a600, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:8104
      #22 0x000055f61957bb0e in dispatch_command (command=COM_QUERY, thd=0x7f3d98000b00, packet=0x7f3d98137fd1 "INSERT INTO t1 (pk) VALUES (1)", packet_length=30, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1851
      #23 0x000055f61957a532 in do_command (thd=0x7f3d98000b00) at /data/src/10.4/sql/sql_parse.cc:1396
      #24 0x000055f6196e66de in do_handle_one_connection (connect=0x55f61d813600) at /data/src/10.4/sql/sql_connect.cc:1402
      #25 0x000055f6196e6462 in handle_one_connection (arg=0x55f61d813600) at /data/src/10.4/sql/sql_connect.cc:1308
      #26 0x000055f619ba5338 in pfs_spawn_thread (arg=0x55f61d80e5a0) at /data/src/10.4/storage/perfschema/pfs.cc:1862
      #27 0x00007f3dec708494 in start_thread (arg=0x7f3ddff6b700) at pthread_create.c:333
      #28 0x00007f3dead0993f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Not reproducible on 10.3.
      Non-debug build produces the assertion failure from MDEV-18076.

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              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.