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

Assertion `type.vers_sys_end()' failed in dfield_t::vers_history_row

    XMLWordPrintable

    Details

      Description

      --source include/have_innodb.inc
       
      CREATE TABLE t1 ( 
          a INT,
          b INT AS (a) VIRTUAL,
          c INT,
          d INT AS (c) VIRTUAL,
          e INT,
          f INT AS (e) VIRTUAL,
          g INT,
          h INT,
          i INT,
          INDEX(d),
          KEY(h),
          FOREIGN KEY (g) REFERENCES t1 (h)
      ) ENGINE=InnoDB WITH SYSTEM VERSIONING;
       
      SET system_versioning_alter_history= KEEP;
      ALTER TABLE t1 DROP COLUMN i;
      INSERT INTO t1 (g,h) VALUES (1,1);
       
      # Cleanup
      DROP TABLE t1;
      

      10.4 37570e84

      mysqld: /data/src/10.4/storage/innobase/include/data0data.h:498: bool dfield_t::vers_history_row() const: Assertion `type.vers_sys_end()' failed.
      191007 16:36:23 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fda257d1f12 in __GI___assert_fail (assertion=0x556e47f204fb "type.vers_sys_end()", file=0x556e47f20510 "/data/src/10.4/storage/innobase/include/data0data.h", line=498, function=0x556e47f24940 <dfield_t::vers_history_row() const::__PRETTY_FUNCTION__> "bool dfield_t::vers_history_row() const") at assert.c:101
      #8  0x0000556e476f034a in dfield_t::vers_history_row (this=0x7fd9cc14d440) at /data/src/10.4/storage/innobase/include/data0data.h:498
      #9  0x0000556e476e9a99 in row_ins_check_foreign_constraint (check_ref=1, foreign=0x7fd9cc15a328, table=0x7fd9cc05c918, entry=0x7fd9cc081d10, thr=0x7fd9cc14d590) at /data/src/10.4/storage/innobase/row/row0ins.cc:1645
      #10 0x0000556e476ea9a1 in row_ins_check_foreign_constraints (table=0x7fd9cc05c918, index=0x7fd9cc05f548, pk=false, entry=0x7fd9cc081d10, thr=0x7fd9cc14d590) at /data/src/10.4/storage/innobase/row/row0ins.cc:2024
      #11 0x0000556e476ee9a9 in row_ins_sec_index_entry (index=0x7fd9cc05f548, entry=0x7fd9cc081d10, thr=0x7fd9cc14d590) at /data/src/10.4/storage/innobase/row/row0ins.cc:3282
      #12 0x0000556e476eecfd in row_ins_index_entry (index=0x7fd9cc05f548, entry=0x7fd9cc081d10, thr=0x7fd9cc14d590) at /data/src/10.4/storage/innobase/row/row0ins.cc:3357
      #13 0x0000556e476ef55a in row_ins_index_entry_step (node=0x7fd9cc14d240, thr=0x7fd9cc14d590) at /data/src/10.4/storage/innobase/row/row0ins.cc:3524
      #14 0x0000556e476ef97e in row_ins (node=0x7fd9cc14d240, thr=0x7fd9cc14d590) at /data/src/10.4/storage/innobase/row/row0ins.cc:3660
      #15 0x0000556e476f0129 in row_ins_step (thr=0x7fd9cc14d590) at /data/src/10.4/storage/innobase/row/row0ins.cc:3803
      #16 0x0000556e477151f4 in row_insert_for_mysql (mysql_rec=0x7fd9cc00be30 "\177\376", prebuilt=0x7fd9cc14cb68, ins_mode=ROW_INS_NORMAL) at /data/src/10.4/storage/innobase/row/row0mysql.cc:1463
      #17 0x0000556e47574c24 in ha_innobase::write_row (this=0x7fd9cc060108, record=0x7fd9cc00be30 "\177\376") at /data/src/10.4/storage/innobase/handler/ha_innodb.cc:8047
      #18 0x0000556e47338abc in handler::ha_write_row (this=0x7fd9cc060108, buf=0x7fd9cc00be30 "\177\376") at /data/src/10.4/sql/handler.cc:6674
      #19 0x0000556e46f82c00 in write_record (thd=0x7fd9cc000b00, table=0x7fd9cc1a1510, info=0x7fda1ab654a0) at /data/src/10.4/sql/sql_insert.cc:2035
      #20 0x0000556e46f7fcd8 in mysql_insert (thd=0x7fd9cc000b00, table_list=0x7fd9cc013218, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR, ignore=false) at /data/src/10.4/sql/sql_insert.cc:1076
      #21 0x0000556e46fcda5c in mysql_execute_command (thd=0x7fd9cc000b00) at /data/src/10.4/sql/sql_parse.cc:4524
      #22 0x0000556e46fda1e7 in mysql_parse (thd=0x7fd9cc000b00, rawbuf=0x7fd9cc013128 "INSERT INTO t1 (g,h) VALUES (1,1)", length=33, parser_state=0x7fda1ab66170, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:7912
      #23 0x0000556e46fc547a in dispatch_command (command=COM_QUERY, thd=0x7fd9cc000b00, packet=0x7fd9cc137c01 "INSERT INTO t1 (g,h) VALUES (1,1)", packet_length=33, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1841
      #24 0x0000556e46fc3b07 in do_command (thd=0x7fd9cc000b00) at /data/src/10.4/sql/sql_parse.cc:1359
      #25 0x0000556e4714b1bb in do_handle_one_connection (connect=0x556e4a37f800) at /data/src/10.4/sql/sql_connect.cc:1412
      #26 0x0000556e4714af0a in handle_one_connection (arg=0x556e4a37f800) at /data/src/10.4/sql/sql_connect.cc:1316
      #27 0x0000556e47b4a209 in pfs_spawn_thread (arg=0x556e4a2fe160) at /data/src/10.4/storage/perfschema/pfs.cc:1862
      #28 0x00007fda273474a4 in start_thread (arg=0x7fda1ab67700) at pthread_create.c:456
      #29 0x00007fda2588ed0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      Also reproducible on 10.5.
      Couldn't reproduce on 10.3.
      No obvious effect on a non-debug build.

        Attachments

          Activity

            People

            Assignee:
            midenok Aleksey Midenkov
            Reporter:
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: