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

InnoDB: Failing assertion: !cursor->index->is_committed() with virtual columns / indexes, WITHOUT foreign keys and temporary tables

    XMLWordPrintable

Details

    Description

      Important note: Only reproducible on a non-debug build.

      --source include/have_innodb.inc
       
      CREATE TABLE t1 ( 
        pk INTEGER AUTO_INCREMENT,
        a INT DEFAULT 0,
        b INT DEFAULT 0,
        c INT,
        d INT AS (b),
        e INT AS (a),
        PRIMARY KEY(pk),
        UNIQUE(c,d),
        UNIQUE(e)
      ) ENGINE=InnoDB;
       
      INSERT INTO t1 (a,b,c) VALUES (1,1,1) ;
       
      ALTER TABLE t1 ADD f INT;
      INSERT IGNORE INTO t1 () VALUES (),(),();
       
      # Cleanup
      DROP TABLE t1;
      

      10.3 cb9fa1a0 RelWithDebInfo

      2019-05-03 03:27:38 0x7eff1e4b5700  InnoDB: Assertion failure in file /data/src/10.3/storage/innobase/row/row0ins.cc line 270
      InnoDB: Failing assertion: !cursor->index->is_committed()
       
      #4  0x00007eff23fe23fa in abort () from /lib/x86_64-linux-gnu/libc.so.6
      #5  0x000055ac7976d918 in ut_dbg_assertion_failed (expr=expr@entry=0x55ac7a073048 "!cursor->index->is_committed()", file=file@entry=0x55ac7a072ba0 "/data/src/10.3/storage/innobase/row/row0ins.cc", line=line@entry=270) at /data/src/10.3/storage/innobase/ut/ut0dbg.cc:60
      #6  0x000055ac79c52883 in row_ins_sec_index_entry_by_modify (mtr=0x7eff1e4b2180, thr=0x7efecc074ee0, entry=0x7efecc070608, heap=0x7efecc067e40, offsets_heap=0x7efecc074050, offsets=0x7eff1e4b1270, cursor=0x7eff1e4b12f0, mode=2, flags=0) at /data/src/10.3/storage/innobase/row/row0ins.cc:270
      #7  row_ins_sec_index_entry_low (flags=flags@entry=0, mode=mode@entry=2, index=index@entry=0x7efecc0716a0, offsets_heap=offsets_heap@entry=0x7efecc074050, heap=heap@entry=0x7efecc067e40, entry=entry@entry=0x7efecc070608, trx_id=0, thr=0x7efecc074ee0, dup_chk_only=false) at /data/src/10.3/storage/innobase/row/row0ins.cc:3155
      #8  0x000055ac79c52d7c in row_ins_sec_index_entry (index=index@entry=0x7efecc0716a0, entry=0x7efecc070608, thr=thr@entry=0x7efecc074ee0, dup_chk_only=dup_chk_only@entry=false) at /data/src/10.3/storage/innobase/row/row0ins.cc:3356
      #9  0x000055ac79c53151 in row_ins_index_entry (thr=0x7efecc074ee0, entry=<optimized out>, index=0x7efecc0716a0) at /data/src/10.3/storage/innobase/row/row0ins.cc:3402
      #10 row_ins_index_entry_step (thr=0x7efecc074ee0, node=<optimized out>) at /data/src/10.3/storage/innobase/row/row0ins.cc:3550
      #11 row_ins (thr=0x7efecc074ee0, node=<optimized out>) at /data/src/10.3/storage/innobase/row/row0ins.cc:3693
      #12 row_ins_step (thr=thr@entry=0x7efecc074ee0) at /data/src/10.3/storage/innobase/row/row0ins.cc:3938
      #13 0x000055ac79c622a5 in row_insert_for_mysql (mysql_rec=mysql_rec@entry=0x7efecc06d748 "\311\003", prebuilt=0x7efecc0745c0, ins_mode=<optimized out>) at /data/src/10.3/storage/innobase/row/row0mysql.cc:1460
      #14 0x000055ac79bb0bd0 in ha_innobase::write_row (this=0x7efecc06c7e0, record=0x7efecc06d748 "\311\003") at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:8073
      #15 0x000055ac79a1b6f7 in handler::ha_write_row (this=0x7efecc06c7e0, buf=0x7efecc06d748 "\311\003") at /data/src/10.3/sql/handler.cc:6331
      #16 0x000055ac798105f6 in write_record (thd=thd@entry=0x7efecc0009a8, table=table@entry=0x7efecc072798, info=info@entry=0x7eff1e4b2c80) at /data/src/10.3/sql/sql_insert.cc:2030
      #17 0x000055ac7981879c in mysql_insert (thd=0x7efecc0009a8, table_list=<optimized out>, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR, ignore=true) at /data/src/10.3/sql/sql_insert.cc:1071
      #18 0x000055ac798420ce in mysql_execute_command (thd=0x7efecc0009a8) at /data/src/10.3/sql/sql_parse.cc:4730
      #19 0x000055ac79843bc1 in mysql_parse (thd=0x7efecc0009a8, rawbuf=<optimized out>, length=40, parser_state=0x7eff1e4b4630, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.3/sql/sql_parse.cc:8091
      #20 0x000055ac79846268 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7efecc0009a8, packet=packet@entry=0x7efecc009329 "INSERT IGNORE INTO t1 () VALUES (),(),()", packet_length=packet_length@entry=40, 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:1858
      #21 0x000055ac79846c20 in do_command (thd=0x7efecc0009a8) at /data/src/10.3/sql/sql_parse.cc:1404
      #22 0x000055ac79919e64 in do_handle_one_connection (connect=connect@entry=0x55ac7b5e20f8) at /data/src/10.3/sql/sql_connect.cc:1402
      #23 0x000055ac7991a004 in handle_one_connection (arg=arg@entry=0x55ac7b5e20f8) at /data/src/10.3/sql/sql_connect.cc:1308
      #24 0x000055ac79b8e514 in pfs_spawn_thread (arg=0x55ac7b57d168) at /data/src/10.3/storage/perfschema/pfs.cc:1862
      #25 0x00007eff260ce494 in start_thread (arg=0x7eff1e4b5700) at pthread_create.c:333
      #26 0x00007eff2409693f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Also reproducible on 10.3.14, I didn't try earlier 10.3 builds because there were other bugs like that.
      Couldn't reproduce on 10.2, 10.4.

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.