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

InnoDB: Failing assertion: !rec || !cmp_dtuple_rec(tuple, rec, *offsets)

    XMLWordPrintable

    Details

      Description

      Note: the scenario is very similar to MDEV-11724, so they might well be duplicates; but the failing assertion is different, so I'll file it separately just in case.

      --source include/have_innodb.inc
       
      CREATE TABLE t1 ( 
       y YEAR NULL,
       i SMALLINT NULL,
       vi SMALLINT AS (i) VIRTUAL,
       INDEX(y)
      ) ENGINE=InnoDB;
       
      SELECT * FROM t1 WHERE y BETWEEN 2012 AND 2016 FOR UPDATE;
      INSERT INTO t1 (i) VALUES (1),(2);
      

      10.2 348ccb6f038a6c

      2017-01-05 03:59:03 0x7fd37af3b300  InnoDB: Assertion failure in file /data/src/10.2/storage/innobase/include/page0cur.ic line 293
      InnoDB: Failing assertion: !rec || !cmp_dtuple_rec(tuple, rec, *offsets)
       
      #6  0x00007fd37a4f9f20 in ut_dbg_assertion_failed (expr=0x7fd37aa46f30 "!rec || !cmp_dtuple_rec(tuple, rec, *offsets)", file=0x7fd37aa46e90 "/data/src/10.2/storage/innobase/include/page0cur.ic", line=293) at /data/src/10.2/storage/innobase/ut/ut0dbg.cc:59
      #7  0x00007fd37a52bf41 in page_cur_tuple_insert (cursor=0x7fd37af37a18, tuple=0x7fd3511f7c88, index=0x7fd351165d88, offsets=0x7fd37af379b0, heap=0x7fd37af379a8, n_ext=0, mtr=0x7fd37af37e30, use_cache=false) at /data/src/10.2/storage/innobase/include/page0cur.ic:293
      #8  0x00007fd37a534e5c in btr_cur_optimistic_insert (flags=0, cursor=0x7fd37af37a10, offsets=0x7fd37af379b0, heap=0x7fd37af379a8, entry=0x7fd3511f7c88, rec=0x7fd37af379b8, big_rec=0x7fd37af379a0, n_ext=0, thr=0x7fd351189b38, mtr=0x7fd37af37e30) at /data/src/10.2/storage/innobase/btr/btr0cur.cc:3044
      #9  0x00007fd37a3fd5e8 in row_ins_clust_index_entry_low (flags=0, mode=2, index=0x7fd351165d88, n_uniq=0, entry=0x7fd3511f7c88, n_ext=0, thr=0x7fd351189b38, dup_chk_only=false) at /data/src/10.2/storage/innobase/row/row0ins.cc:2617
      #10 0x00007fd37a3fefe0 in row_ins_clust_index_entry (index=0x7fd351165d88, entry=0x7fd3511f7c88, thr=0x7fd351189b38, n_ext=0, dup_chk_only=false) at /data/src/10.2/storage/innobase/row/row0ins.cc:3169
      #11 0x00007fd37a3ff3ae in row_ins_index_entry (index=0x7fd351165d88, entry=0x7fd3511f7c88, thr=0x7fd351189b38) at /data/src/10.2/storage/innobase/row/row0ins.cc:3276
      #12 0x00007fd37a3ff8ea in row_ins_index_entry_step (node=0x7fd3511898b0, thr=0x7fd351189b38) at /data/src/10.2/storage/innobase/row/row0ins.cc:3426
      #13 0x00007fd37a3ffc9a in row_ins (node=0x7fd3511898b0, thr=0x7fd351189b38) at /data/src/10.2/storage/innobase/row/row0ins.cc:3568
      #15 0x00007fd37a41e677 in row_insert_for_mysql (mysql_rec=0x7fd351028e88 "\373", prebuilt=0x7fd351189088) at /data/src/10.2/storage/innobase/row/row0mysql.cc:1511
      #16 0x00007fd37a2d2921 in ha_innobase::write_row (this=0x7fd3510b7888, record=0x7fd351028e88 "\373") at /data/src/10.2/storage/innobase/handler/ha_innodb.cc:9076
      #17 0x00007fd37a0972ff in handler::ha_write_row (this=0x7fd3510b7888, buf=0x7fd351028e88 "\373") at /data/src/10.2/sql/handler.cc:5960
      #18 0x00007fd379dfeb8a in write_record (thd=0x7fd351016070, table=0x7fd3510d7870, info=0x7fd37af39040) at /data/src/10.2/sql/sql_insert.cc:1890
      #19 0x00007fd379dfc51b in mysql_insert (thd=0x7fd351016070, table_list=0x7fd351064178, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR, ignore=false) at /data/src/10.2/sql/sql_insert.cc:1003
      #20 0x00007fd379e23e7b in mysql_execute_command (thd=0x7fd351016070) at /data/src/10.2/sql/sql_parse.cc:4369
      #21 0x00007fd379e2f328 in mysql_parse (thd=0x7fd351016070, rawbuf=0x7fd351064088 "INSERT INTO t1 (i) VALUES (1),(2)", length=33, parser_state=0x7fd37af39dd0, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7839
      #22 0x00007fd379e1ceee in dispatch_command (command=COM_QUERY, thd=0x7fd351016070, packet=0x7fd351058071 "INSERT INTO t1 (i) VALUES (1),(2)", packet_length=33, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1799
      #23 0x00007fd379e1b8c8 in do_command (thd=0x7fd351016070) at /data/src/10.2/sql/sql_parse.cc:1359
      #24 0x00007fd379f6373e in do_handle_one_connection (connect=0x7fd376871f70) at /data/src/10.2/sql/sql_connect.cc:1354
      #25 0x00007fd379f634cb in handle_one_connection (arg=0x7fd376871f70) at /data/src/10.2/sql/sql_connect.cc:1260
      #26 0x00007fd37a2a232c in pfs_spawn_thread (arg=0x7fd363fed770) at /data/src/10.2/storage/perfschema/pfs.cc:1862
      #27 0x00007fd37944f0a4 in start_thread (arg=0x7fd37af3b300) at pthread_create.c:309
      #28 0x00007fd3773fc87d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
      

      Not reproducible on 10.1.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              monty Michael Widenius
              Reporter:
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: