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

Assertion on evaluating foreign referential action for self-reference in system versioned table

Details

    Description

      Assertion `mode == 16 || mode == 12 || !fix_block->page.file_page_was_freed' failed in buf_page_get_low

      It looks like all previous bugs with this assertion failure are closed at the moment.

      I'm not sure whether the problem is really versioning-specific, but I couldn't get rid of versioning in the test case.

      --source include/have_innodb.inc
       
      CREATE TABLE t1 (
          pk INT PRIMARY KEY,
          f1 INT,
          f2 INT,
          f3 TEXT,
          KEY(f1),
          FULLTEXT(f3),
          KEY(f3(10)),
          FOREIGN KEY (f2) REFERENCES t1 (f1) ON DELETE SET NULL
      ) ENGINE=InnoDB WITH SYSTEM VERSIONING;
      INSERT INTO t1 VALUES (1,8,8,'a'), (2,8,8,REPEAT('b',8071));
       
      --error ER_FOREIGN_DUPLICATE_KEY_WITH_CHILD_INFO
      DELETE FROM t1;
      SELECT * FROM t1;
       
      # Cleanup
      DROP TABLE t1;
      

      10.3 caa35f8e

      2020-09-01 16:55:52 9 [ERROR] InnoDB: Duplicate FTS_DOC_ID value on table `test`.`t1`
      mysqld: /data/src/10.3/storage/innobase/buf/buf0buf.cc:4879: buf_block_t* buf_page_get_low(page_id_t, const page_size_t&, ulint, buf_block_t*, ulint, const char*, unsigned int, mtr_t*, dberr_t*): Assertion `mode == 16 || mode == 12 || !fix_block->page.file_page_was_freed' failed.
      200901 16:55:52 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f6329c77f12 in __GI___assert_fail (assertion=0x55fd98b16df8 "mode == 16 || mode == 12 || !fix_block->page.file_page_was_freed", file=0x55fd98b14d18 "/data/src/10.3/storage/innobase/buf/buf0buf.cc", line=4879, function=0x55fd98b1aae0 <buf_page_get_low(page_id_t, page_size_t const&, unsigned long, buf_block_t*, unsigned long, char const*, unsigned int, mtr_t*, dberr_t*)::__PRETTY_FUNCTION__> "buf_block_t* buf_page_get_low(page_id_t, const page_size_t&, ulint, buf_block_t*, ulint, const char*, unsigned int, mtr_t*, dberr_t*)") at assert.c:101
      #8  0x000055fd98437bc9 in buf_page_get_low (page_id=..., page_size=..., rw_latch=1, guess=0x0, mode=10, file=0x55fd98affa80 "/data/src/10.3/storage/innobase/btr/btr0cur.cc", line=7991, mtr=0x7f6324073d70, err=0x0) at /data/src/10.3/storage/innobase/buf/buf0buf.cc:4879
      #9  0x000055fd9843802b in buf_page_get_gen (page_id=..., page_size=..., rw_latch=1, guess=0x0, mode=10, file=0x55fd98affa80 "/data/src/10.3/storage/innobase/btr/btr0cur.cc", line=7991, mtr=0x7f6324073d70, err=0x0) at /data/src/10.3/storage/innobase/buf/buf0buf.cc:4974
      #10 0x000055fd984017cd in btr_copy_blob_prefix (buf=0x7f62d0049670 "a", '\217' <repeats 199 times>..., len=8071, space_id=5, page_no=8, offset=38) at /data/src/10.3/storage/innobase/btr/btr0cur.cc:7991
      #11 0x000055fd984022dc in btr_copy_externally_stored_field_prefix_low (buf=0x7f62d0049670 "a", '\217' <repeats 199 times>..., len=8071, page_size=..., space_id=5, page_no=8, offset=38) at /data/src/10.3/storage/innobase/btr/btr0cur.cc:8201
      #12 0x000055fd98402571 in btr_copy_externally_stored_field (len=0x7f6324074390, data=0x7f631f4e40d7 "", page_size=..., local_len=0, heap=0x7f62d00495f0) at /data/src/10.3/storage/innobase/btr/btr0cur.cc:8307
      #13 0x000055fd98402691 in btr_rec_copy_externally_stored_field (rec=0x7f631f4e40b7 "\200", offsets=0x7f6324074610, page_size=..., no=6, len=0x7f6324074390, heap=0x7f62d00495f0) at /data/src/10.3/storage/innobase/btr/btr0cur.cc:8363
      #14 0x000055fd98305828 in row_sel_store_mysql_field (mysql_rec=0x7f62d00082a0 "\370\002", prebuilt=0x7f62d0040f00, rec=0x7f631f4e40b7 "\200", index=0x7f62d00a5a30, offsets=0x7f6324074610, field_no=6, templ=0x7f62d000a730) at /data/src/10.3/storage/innobase/row/row0sel.cc:2959
      #15 0x000055fd98306295 in row_sel_store_mysql_rec (mysql_rec=0x7f62d00082a0 "\370\002", prebuilt=0x7f62d0040f00, rec=0x7f631f4e40b7 "\200", vrow=0x0, rec_clust=false, index=0x7f62d00a5a30, offsets=0x7f6324074610) at /data/src/10.3/storage/innobase/row/row0sel.cc:3168
      #16 0x000055fd9830cad6 in row_search_mvcc (buf=0x7f62d00082a0 "\370\002", mode=PAGE_CUR_G, prebuilt=0x7f62d0040f00, match_mode=0, direction=1) at /data/src/10.3/storage/innobase/row/row0sel.cc:5486
      #17 0x000055fd98129bb8 in ha_innobase::general_fetch (this=0x7f62d000c248, buf=0x7f62d00082a0 "\370\002", direction=1, match_mode=0) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:9502
      #18 0x000055fd9812a13c in ha_innobase::rnd_next (this=0x7f62d000c248, buf=0x7f62d00082a0 "\370\002") at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:9711
      #19 0x000055fd97efa764 in handler::ha_rnd_next (this=0x7f62d000c248, buf=0x7f62d00082a0 "\370\002") at /data/src/10.3/sql/handler.cc:2847
      #20 0x000055fd9808c56b in rr_sequential (info=0x7f62d0015760) at /data/src/10.3/sql/records.cc:485
      #21 0x000055fd97b378fd in READ_RECORD::read_record (this=0x7f62d0015760) at /data/src/10.3/sql/records.h:70
      #22 0x000055fd97c518e8 in sub_select (join=0x7f62d0013160, join_tab=0x7f62d0015698, end_of_records=false) at /data/src/10.3/sql/sql_select.cc:19733
      #23 0x000055fd97c50d03 in do_select (join=0x7f62d0013160, procedure=0x0) at /data/src/10.3/sql/sql_select.cc:19254
      #24 0x000055fd97c27c29 in JOIN::exec_inner (this=0x7f62d0013160) at /data/src/10.3/sql/sql_select.cc:4116
      #25 0x000055fd97c26ffc in JOIN::exec (this=0x7f62d0013160) at /data/src/10.3/sql/sql_select.cc:3910
      #26 0x000055fd97c2830d in mysql_select (thd=0x7f62d0000af0, tables=0x7f62d0012a08, wild_num=1, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f62d0013138, unit=0x7f62d00049b8, select_lex=0x7f62d0005140) at /data/src/10.3/sql/sql_select.cc:4315
      #27 0x000055fd97c198e2 in handle_select (thd=0x7f62d0000af0, lex=0x7f62d00048f8, result=0x7f62d0013138, setup_tables_done_option=0) at /data/src/10.3/sql/sql_select.cc:370
      #28 0x000055fd97be11fc in execute_sqlcom_select (thd=0x7f62d0000af0, all_tables=0x7f62d0012a08) at /data/src/10.3/sql/sql_parse.cc:6286
      #29 0x000055fd97bd794f in mysql_execute_command (thd=0x7f62d0000af0) at /data/src/10.3/sql/sql_parse.cc:3812
      #30 0x000055fd97be5507 in mysql_parse (thd=0x7f62d0000af0, rawbuf=0x7f62d0012818 "SELECT * FROM t1", length=16, parser_state=0x7f63240765e0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7810
      #31 0x000055fd97bd1d4e in dispatch_command (command=COM_QUERY, thd=0x7f62d0000af0, packet=0x7f62d0165811 "", packet_length=16, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1848
      #32 0x000055fd97bd0666 in do_command (thd=0x7f62d0000af0) at /data/src/10.3/sql/sql_parse.cc:1393
      #33 0x000055fd97d49f57 in do_handle_one_connection (connect=0x55fd9a59be80) at /data/src/10.3/sql/sql_connect.cc:1403
      #34 0x000055fd97d49cb9 in handle_one_connection (arg=0x55fd9a59be80) at /data/src/10.3/sql/sql_connect.cc:1308
      #35 0x000055fd98701e60 in pfs_spawn_thread (arg=0x55fd9a5b6e30) at /data/src/10.3/storage/perfschema/pfs.cc:1869
      #36 0x00007f632bc004a4 in start_thread (arg=0x7f6324077700) at pthread_create.c:456
      #37 0x00007f6329d34d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      Reproducible on 10.3+.
      The test case is not applicable to earlier versions due to system versioning.

      Non-debug builds produce the same ER_FOREIGN_DUPLICATE_KEY_WITH_CHILD_INFO upon DELETE (I'm not sure whether it's legit), but no crash.

      Attachments

        Issue Links

          Activity

            elenst Elena Stepanova added a comment - - edited

            Please note that the test case in the description uses an explicit primary key because I was told it makes bugs easier to investigate; but the failure is not only reproducible before the primary key, but also it seems far more obvious that the error on DELETE is already wrong – since there are no unique keys (defined by the user), there should be no duplicate key errors.

            Test case without PK

            --source include/have_innodb.inc
             
            CREATE TABLE t1 (
                f1 INT,
                f2 INT,
                f3 TEXT,
                KEY(f1),
                FULLTEXT(f3),
                KEY(f3(10)),
                FOREIGN KEY (f2) REFERENCES t1 (f1) ON DELETE SET NULL
            ) ENGINE=InnoDB WITH SYSTEM VERSIONING;
            INSERT INTO t1 VALUES (8,8,'a'), (8,8,REPEAT('b',8071));
             
            --error ER_FOREIGN_DUPLICATE_KEY_WITH_CHILD_INFO
            DELETE FROM t1;
            SELECT * FROM t1;
             
            # Cleanup
            DROP TABLE t1;
            

            elenst Elena Stepanova added a comment - - edited Please note that the test case in the description uses an explicit primary key because I was told it makes bugs easier to investigate; but the failure is not only reproducible before the primary key, but also it seems far more obvious that the error on DELETE is already wrong – since there are no unique keys (defined by the user), there should be no duplicate key errors. Test case without PK --source include/have_innodb.inc CREATE TABLE t1 ( f1 INT , f2 INT , f3 TEXT, KEY (f1), FULLTEXT(f3), KEY (f3(10)), FOREIGN KEY (f2) REFERENCES t1 (f1) ON DELETE SET NULL ) ENGINE=InnoDB WITH SYSTEM VERSIONING; INSERT INTO t1 VALUES (8,8, 'a' ), (8,8,REPEAT( 'b' ,8071)); --error ER_FOREIGN_DUPLICATE_KEY_WITH_CHILD_INFO DELETE FROM t1; SELECT * FROM t1; # Cleanup DROP TABLE t1;

            It was previously filed as MDEV-21137 and closed as a duplicate of MDEV-21138 without fixing MDEV-21138 and verifying that it covers both cases, and even without adding the alternative failure and test case to the bug report. Please don't do it with this one.

            elenst Elena Stepanova added a comment - It was previously filed as MDEV-21137 and closed as a duplicate of MDEV-21138 without fixing MDEV-21138 and verifying that it covers both cases, and even without adding the alternative failure and test case to the bug report. Please don't do it with this one.

            A slightly different test case, yet another completely different assertion failure. Again, don't discard it until it's been verified that the same fix fixes all of them, and add a test case for every variation of the failure.

            --source include/have_innodb.inc
             
            CREATE TABLE t1 (
                pk INT PRIMARY KEY,
                f1 INT,
                f2 INT,
                f3 TEXT,
                KEY(f1),
                KEY(f3(10)),
                FOREIGN KEY (f2) REFERENCES t1 (f1) ON DELETE SET NULL
            ) ENGINE=InnoDB WITH SYSTEM VERSIONING;
            INSERT INTO t1 VALUES (1,8,8,'a'), (2,8,8,REPEAT('b',8193));
             
            DELETE FROM t1;
             
            # Cleanup
            DROP TABLE t1;
            

            10.3 c277bcd5

            mysqld: /data/src/10.3/storage/innobase/row/row0ins.cc:3421: dberr_t row_ins_index_entry_set_vals(const dict_index_t*, dtuple_t*, const dtuple_t*): Assertion `!dfield_is_ext(row_field)' failed.
            200902  1:49:42 [ERROR] mysqld got signal 6 ;
             
            #7  0x00007f7a77a25f12 in __GI___assert_fail (assertion=0x55bac25e7618 "!dfield_is_ext(row_field)", file=0x55bac25e6460 "/data/src/10.3/storage/innobase/row/row0ins.cc", line=3421, function=0x55bac25ea600 <row_ins_index_entry_set_vals(dict_index_t const*, dtuple_t*, dtuple_t const*)::__PRETTY_FUNCTION__> "dberr_t row_ins_index_entry_set_vals(const dict_index_t*, dtuple_t*, const dtuple_t*)") at assert.c:101
            #8  0x000055bac1dec356 in row_ins_index_entry_set_vals (index=0x7f7a1c0a4ea0, entry=0x7f7a1c03a7d8, row=0x7f7a1c036510) at /data/src/10.3/storage/innobase/row/row0ins.cc:3421
            #9  0x000055bac1dec577 in row_ins_index_entry_step (node=0x7f7a1c036620, thr=0x7f7a1c073fb8) at /data/src/10.3/storage/innobase/row/row0ins.cc:3463
            #10 0x000055bac1decb19 in row_ins (node=0x7f7a1c036620, thr=0x7f7a1c073fb8) at /data/src/10.3/storage/innobase/row/row0ins.cc:3609
            #11 0x000055bac1ded2ec in row_ins_step (thr=0x7f7a1c073fb8) at /data/src/10.3/storage/innobase/row/row0ins.cc:3748
            #12 0x000055bac1e1612c in row_update_vers_insert (thr=0x7f7a1c073fb8, node=0x7f7a1c0958c0) at /data/src/10.3/storage/innobase/row/row0mysql.cc:2150
            #13 0x000055bac1e162b6 in row_update_cascade_for_mysql (thr=0x7f7a1c073fb8, node=0x7f7a1c0958c0, table=0x7f7a1c00c850) at /data/src/10.3/storage/innobase/row/row0mysql.cc:2206
            #14 0x000055bac1de6730 in row_ins_foreign_check_on_constraint (thr=0x7f7a1c073fb8, foreign=0x7f7a1c0a2950, pcur=0x7f7a70dc4b90, entry=0x7f7a1c077b38, mtr=0x7f7a70dc4f30) at /data/src/10.3/storage/innobase/row/row0ins.cc:1396
            #15 0x000055bac1de77fa in row_ins_check_foreign_constraint (check_ref=0, foreign=0x7f7a1c0a2950, table=0x7f7a1c00c850, entry=0x7f7a1c077b38, thr=0x7f7a1c073fb8) at /data/src/10.3/storage/innobase/row/row0ins.cc:1819
            #16 0x000055bac1e7a3e5 in row_upd_check_references_constraints (node=0x7f7a1c073bf0, pcur=0x7f7a70dc5580, table=0x7f7a1c00c850, index=0x7f7a1c0a6110, offsets=0x7f7a1c0954b0, thr=0x7f7a1c073fb8, mtr=0x7f7a70dc5c80) at /data/src/10.3/storage/innobase/row/row0upd.cc:295
            #17 0x000055bac1e804d2 in row_upd_sec_index_entry (node=0x7f7a1c073bf0, thr=0x7f7a1c073fb8) at /data/src/10.3/storage/innobase/row/row0upd.cc:2519
            #18 0x000055bac1e80841 in row_upd_sec_step (node=0x7f7a1c073bf0, thr=0x7f7a1c073fb8) at /data/src/10.3/storage/innobase/row/row0upd.cc:2568
            #19 0x000055bac1e835c0 in row_upd (node=0x7f7a1c073bf0, thr=0x7f7a1c073fb8) at /data/src/10.3/storage/innobase/row/row0upd.cc:3337
            #20 0x000055bac1e83a0d in row_upd_step (thr=0x7f7a1c073fb8) at /data/src/10.3/storage/innobase/row/row0upd.cc:3452
            #21 0x000055bac1e15457 in row_update_for_mysql (prebuilt=0x7f7a1c072ff0) at /data/src/10.3/storage/innobase/row/row0mysql.cc:1847
            #22 0x000055bac1c7afc3 in ha_innobase::update_row (this=0x7f7a1c00c068, old_row=0x7f7a1c0082c8 "\370\001", new_row=0x7f7a1c0082a0 "\370\001") at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:8778
            #23 0x000055bac1a58834 in handler::ha_update_row (this=0x7f7a1c00c068, old_data=0x7f7a1c0082c8 "\370\001", new_data=0x7f7a1c0082a0 "\370\001") at /data/src/10.3/sql/handler.cc:6498
            #24 0x000055bac1c00d45 in TABLE::delete_row (this=0x7f7a1c0723b0) at /data/src/10.3/sql/sql_delete.cc:249
            #25 0x000055bac1bfddef in mysql_delete (thd=0x7f7a1c000af0, table_list=0x7f7a1c0128e0, conds=0x7f7a1c013d20, order_list=0x7f7a1c0053b8, limit=18446744073709551615, options=0, result=0x0) at /data/src/10.3/sql/sql_delete.cc:720
            #26 0x000055bac172d7b8 in mysql_execute_command (thd=0x7f7a1c000af0) at /data/src/10.3/sql/sql_parse.cc:4649
            #27 0x000055bac1738513 in mysql_parse (thd=0x7f7a1c000af0, rawbuf=0x7f7a1c012818 "DELETE FROM t1", length=14, parser_state=0x7f7a70dc75e0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7810
            #28 0x000055bac1724d5a in dispatch_command (command=COM_QUERY, thd=0x7f7a1c000af0, packet=0x7f7a1c165761 "DELETE FROM t1", packet_length=14, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1848
            #29 0x000055bac1723672 in do_command (thd=0x7f7a1c000af0) at /data/src/10.3/sql/sql_parse.cc:1393
            #30 0x000055bac189cf6b in do_handle_one_connection (connect=0x55bac404cfb0) at /data/src/10.3/sql/sql_connect.cc:1403
            #31 0x000055bac189cccd in handle_one_connection (arg=0x55bac404cfb0) at /data/src/10.3/sql/sql_connect.cc:1308
            #32 0x000055bac2254d76 in pfs_spawn_thread (arg=0x55bac4057790) at /data/src/10.3/storage/perfschema/pfs.cc:1869
            #33 0x00007f7a799ae4a4 in start_thread (arg=0x7f7a70dc8700) at pthread_create.c:456
            #34 0x00007f7a77ae2d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
            

            Non-debug build doesn't crash, but it produces an unexpected error upon DELETE:

            mysqltest: At line 14: query 'DELETE FROM t1' failed: 1062: Duplicate entry '2' for key 'PRIMARY'
            

            elenst Elena Stepanova added a comment - A slightly different test case, yet another completely different assertion failure. Again, don't discard it until it's been verified that the same fix fixes all of them, and add a test case for every variation of the failure . --source include/have_innodb.inc   CREATE TABLE t1 ( pk INT PRIMARY KEY , f1 INT , f2 INT , f3 TEXT, KEY (f1), KEY (f3(10)), FOREIGN KEY (f2) REFERENCES t1 (f1) ON DELETE SET NULL ) ENGINE=InnoDB WITH SYSTEM VERSIONING; INSERT INTO t1 VALUES (1,8,8, 'a' ), (2,8,8,REPEAT( 'b' ,8193));   DELETE FROM t1;   # Cleanup DROP TABLE t1; 10.3 c277bcd5 mysqld: /data/src/10.3/storage/innobase/row/row0ins.cc:3421: dberr_t row_ins_index_entry_set_vals(const dict_index_t*, dtuple_t*, const dtuple_t*): Assertion `!dfield_is_ext(row_field)' failed. 200902 1:49:42 [ERROR] mysqld got signal 6 ;   #7 0x00007f7a77a25f12 in __GI___assert_fail (assertion=0x55bac25e7618 "!dfield_is_ext(row_field)", file=0x55bac25e6460 "/data/src/10.3/storage/innobase/row/row0ins.cc", line=3421, function=0x55bac25ea600 <row_ins_index_entry_set_vals(dict_index_t const*, dtuple_t*, dtuple_t const*)::__PRETTY_FUNCTION__> "dberr_t row_ins_index_entry_set_vals(const dict_index_t*, dtuple_t*, const dtuple_t*)") at assert.c:101 #8 0x000055bac1dec356 in row_ins_index_entry_set_vals (index=0x7f7a1c0a4ea0, entry=0x7f7a1c03a7d8, row=0x7f7a1c036510) at /data/src/10.3/storage/innobase/row/row0ins.cc:3421 #9 0x000055bac1dec577 in row_ins_index_entry_step (node=0x7f7a1c036620, thr=0x7f7a1c073fb8) at /data/src/10.3/storage/innobase/row/row0ins.cc:3463 #10 0x000055bac1decb19 in row_ins (node=0x7f7a1c036620, thr=0x7f7a1c073fb8) at /data/src/10.3/storage/innobase/row/row0ins.cc:3609 #11 0x000055bac1ded2ec in row_ins_step (thr=0x7f7a1c073fb8) at /data/src/10.3/storage/innobase/row/row0ins.cc:3748 #12 0x000055bac1e1612c in row_update_vers_insert (thr=0x7f7a1c073fb8, node=0x7f7a1c0958c0) at /data/src/10.3/storage/innobase/row/row0mysql.cc:2150 #13 0x000055bac1e162b6 in row_update_cascade_for_mysql (thr=0x7f7a1c073fb8, node=0x7f7a1c0958c0, table=0x7f7a1c00c850) at /data/src/10.3/storage/innobase/row/row0mysql.cc:2206 #14 0x000055bac1de6730 in row_ins_foreign_check_on_constraint (thr=0x7f7a1c073fb8, foreign=0x7f7a1c0a2950, pcur=0x7f7a70dc4b90, entry=0x7f7a1c077b38, mtr=0x7f7a70dc4f30) at /data/src/10.3/storage/innobase/row/row0ins.cc:1396 #15 0x000055bac1de77fa in row_ins_check_foreign_constraint (check_ref=0, foreign=0x7f7a1c0a2950, table=0x7f7a1c00c850, entry=0x7f7a1c077b38, thr=0x7f7a1c073fb8) at /data/src/10.3/storage/innobase/row/row0ins.cc:1819 #16 0x000055bac1e7a3e5 in row_upd_check_references_constraints (node=0x7f7a1c073bf0, pcur=0x7f7a70dc5580, table=0x7f7a1c00c850, index=0x7f7a1c0a6110, offsets=0x7f7a1c0954b0, thr=0x7f7a1c073fb8, mtr=0x7f7a70dc5c80) at /data/src/10.3/storage/innobase/row/row0upd.cc:295 #17 0x000055bac1e804d2 in row_upd_sec_index_entry (node=0x7f7a1c073bf0, thr=0x7f7a1c073fb8) at /data/src/10.3/storage/innobase/row/row0upd.cc:2519 #18 0x000055bac1e80841 in row_upd_sec_step (node=0x7f7a1c073bf0, thr=0x7f7a1c073fb8) at /data/src/10.3/storage/innobase/row/row0upd.cc:2568 #19 0x000055bac1e835c0 in row_upd (node=0x7f7a1c073bf0, thr=0x7f7a1c073fb8) at /data/src/10.3/storage/innobase/row/row0upd.cc:3337 #20 0x000055bac1e83a0d in row_upd_step (thr=0x7f7a1c073fb8) at /data/src/10.3/storage/innobase/row/row0upd.cc:3452 #21 0x000055bac1e15457 in row_update_for_mysql (prebuilt=0x7f7a1c072ff0) at /data/src/10.3/storage/innobase/row/row0mysql.cc:1847 #22 0x000055bac1c7afc3 in ha_innobase::update_row (this=0x7f7a1c00c068, old_row=0x7f7a1c0082c8 "\370\001", new_row=0x7f7a1c0082a0 "\370\001") at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:8778 #23 0x000055bac1a58834 in handler::ha_update_row (this=0x7f7a1c00c068, old_data=0x7f7a1c0082c8 "\370\001", new_data=0x7f7a1c0082a0 "\370\001") at /data/src/10.3/sql/handler.cc:6498 #24 0x000055bac1c00d45 in TABLE::delete_row (this=0x7f7a1c0723b0) at /data/src/10.3/sql/sql_delete.cc:249 #25 0x000055bac1bfddef in mysql_delete (thd=0x7f7a1c000af0, table_list=0x7f7a1c0128e0, conds=0x7f7a1c013d20, order_list=0x7f7a1c0053b8, limit=18446744073709551615, options=0, result=0x0) at /data/src/10.3/sql/sql_delete.cc:720 #26 0x000055bac172d7b8 in mysql_execute_command (thd=0x7f7a1c000af0) at /data/src/10.3/sql/sql_parse.cc:4649 #27 0x000055bac1738513 in mysql_parse (thd=0x7f7a1c000af0, rawbuf=0x7f7a1c012818 "DELETE FROM t1", length=14, parser_state=0x7f7a70dc75e0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7810 #28 0x000055bac1724d5a in dispatch_command (command=COM_QUERY, thd=0x7f7a1c000af0, packet=0x7f7a1c165761 "DELETE FROM t1", packet_length=14, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1848 #29 0x000055bac1723672 in do_command (thd=0x7f7a1c000af0) at /data/src/10.3/sql/sql_parse.cc:1393 #30 0x000055bac189cf6b in do_handle_one_connection (connect=0x55bac404cfb0) at /data/src/10.3/sql/sql_connect.cc:1403 #31 0x000055bac189cccd in handle_one_connection (arg=0x55bac404cfb0) at /data/src/10.3/sql/sql_connect.cc:1308 #32 0x000055bac2254d76 in pfs_spawn_thread (arg=0x55bac4057790) at /data/src/10.3/storage/perfschema/pfs.cc:1869 #33 0x00007f7a799ae4a4 in start_thread (arg=0x7f7a70dc8700) at pthread_create.c:456 #34 0x00007f7a77ae2d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97 Non-debug build doesn't crash, but it produces an unexpected error upon DELETE: mysqltest: At line 14: query 'DELETE FROM t1' failed: 1062: Duplicate entry '2' for key 'PRIMARY'

            Because this involves system versioning, I think that this belongs to midenok, who is the assignee of MDEV-21137 and MDEV-21138.

            marko Marko Mäkelä added a comment - Because this involves system versioning, I think that this belongs to midenok , who is the assignee of MDEV-21137 and MDEV-21138 .

            The same test case but with ROW_FORMAT=COMPRESSED causes yet another assertion failure:

            --source include/have_innodb.inc
             
            CREATE TABLE t1 (
                pk INT PRIMARY KEY,
                f1 INT,
                f2 INT,
                f3 TEXT,
                KEY(f1),
                FULLTEXT(f3),
                KEY(f3(10)),
                FOREIGN KEY (f2) REFERENCES t1 (f1) ON DELETE SET NULL
            ) ENGINE=InnoDB ROW_FORMAT=COMPRESSED WITH SYSTEM VERSIONING;
            INSERT INTO t1 VALUES (1,8,8,'a'), (2,8,8,REPEAT('b',8071));
             
            --error ER_FOREIGN_DUPLICATE_KEY_WITH_CHILD_INFO
            DELETE FROM t1;
            SELECT * FROM t1;
             
            # Cleanup
            DROP TABLE t1;
            

            10.4 9b688471

            2020-09-08 12:07:47 9 [ERROR] InnoDB: Duplicate FTS_DOC_ID value on table `test`.`t1`
            mysqld: /data/src/10.4/storage/innobase/buf/buf0buf.cc:3810: buf_page_t* buf_page_get_zip(page_id_t, ulint): Assertion `!bpage->file_page_was_freed' failed.
            200908 12:07:47 [ERROR] mysqld got signal 6 ;
             
            #6  0x00007fd84c9b1729 in __assert_fail_base (fmt=0x7fd84cb47588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x561150bbc488 "!bpage->file_page_was_freed", file=0x561150bba348 "/data/src/10.4/storage/innobase/buf/buf0buf.cc", line=3810, function=<optimized out>) at assert.c:92
            #7  0x00007fd84c9c2f36 in __GI___assert_fail (assertion=0x561150bbc488 "!bpage->file_page_was_freed", file=0x561150bba348 "/data/src/10.4/storage/innobase/buf/buf0buf.cc", line=3810, function=0x561150bbc3a8 "buf_page_t* buf_page_get_zip(page_id_t, ulint)") at assert.c:101
            #8  0x00005611503aa06c in buf_page_get_zip (page_id=..., zip_size=8192) at /data/src/10.4/storage/innobase/buf/buf0buf.cc:3810
            #9  0x00005611503793df in btr_copy_zblob_prefix (buf=0x7fd7f007be70 "a", '\217' <repeats 199 times>..., len=8071, zip_size=8192, space_id=5, page_no=8, offset=12) at /data/src/10.4/storage/innobase/btr/btr0cur.cc:8348
            #10 0x00005611503799dd in btr_copy_externally_stored_field_prefix_low (buf=0x7fd7f007be70 "a", '\217' <repeats 199 times>..., len=8071, zip_size=8192, space_id=5, page_no=8, offset=12) at /data/src/10.4/storage/innobase/btr/btr0cur.cc:8471
            #11 0x0000561150379c99 in btr_copy_externally_stored_field (len=0x7fd845b84658, data=0x7fd8463540d7 "", zip_size=8192, local_len=0, heap=0x7fd7f007bdf0) at /data/src/10.4/storage/innobase/btr/btr0cur.cc:8581
            #12 0x0000561150379db9 in btr_rec_copy_externally_stored_field (rec=0x7fd8463540b7 "\200", offsets=0x7fd845b848e0, zip_size=8192, no=6, len=0x7fd845b84658, heap=0x7fd7f007bdf0) at /data/src/10.4/storage/innobase/btr/btr0cur.cc:8636
            #13 0x000056115028f96e in row_sel_store_mysql_field (mysql_rec=0x7fd7f0181cd0 "\370\002", prebuilt=0x7fd7f01ae310, rec=0x7fd8463540b7 "\200", index=0x7fd7f012fd20, offsets=0x7fd845b848e0, field_no=6, templ=0x7fd7f0074f80) at /data/src/10.4/storage/innobase/row/row0sel.cc:2906
            #14 0x00005611502903b4 in row_sel_store_mysql_rec (mysql_rec=0x7fd7f0181cd0 "\370\002", prebuilt=0x7fd7f01ae310, rec=0x7fd8463540b7 "\200", vrow=0x0, rec_clust=false, index=0x7fd7f012fd20, offsets=0x7fd845b848e0) at /data/src/10.4/storage/innobase/row/row0sel.cc:3117
            #15 0x0000561150297206 in row_search_mvcc (buf=0x7fd7f0181cd0 "\370\002", mode=PAGE_CUR_G, prebuilt=0x7fd7f01ae310, match_mode=0, direction=1) at /data/src/10.4/storage/innobase/row/row0sel.cc:5488
            #16 0x00005611500a47c4 in ha_innobase::general_fetch (this=0x7fd7f01ad5a8, buf=0x7fd7f0181cd0 "\370\002", direction=1, match_mode=0) at /data/src/10.4/storage/innobase/handler/ha_innodb.cc:9481
            #17 0x00005611500a4d49 in ha_innobase::rnd_next (this=0x7fd7f01ad5a8, buf=0x7fd7f0181cd0 "\370\002") at /data/src/10.4/storage/innobase/handler/ha_innodb.cc:9691
            #18 0x000056114fe48f38 in handler::ha_rnd_next (this=0x7fd7f01ad5a8, buf=0x7fd7f0181cd0 "\370\002") at /data/src/10.4/sql/handler.cc:2862
            #19 0x000056114fff97c0 in rr_sequential (info=0x7fd7f00171f8) at /data/src/10.4/sql/records.cc:485
            #20 0x000056114fa26ed7 in READ_RECORD::read_record (this=0x7fd7f00171f8) at /data/src/10.4/sql/records.h:70
            #21 0x000056114fb5a58c in sub_select (join=0x7fd7f0014a58, join_tab=0x7fd7f0017130, end_of_records=false) at /data/src/10.4/sql/sql_select.cc:20427
            #22 0x000056114fb5999c in do_select (join=0x7fd7f0014a58, procedure=0x0) at /data/src/10.4/sql/sql_select.cc:19946
            #23 0x000056114fb2e6ab in JOIN::exec_inner (this=0x7fd7f0014a58) at /data/src/10.4/sql/sql_select.cc:4478
            #24 0x000056114fb2d7da in JOIN::exec (this=0x7fd7f0014a58) at /data/src/10.4/sql/sql_select.cc:4260
            #25 0x000056114fb2ef2e in mysql_select (thd=0x7fd7f0000d90, tables=0x7fd7f0013a80, wild_num=1, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fd7f0014a30, unit=0x7fd7f0004cb8, select_lex=0x7fd7f00134c0) at /data/src/10.4/sql/sql_select.cc:4695
            #26 0x000056114fb1e93f in handle_select (thd=0x7fd7f0000d90, lex=0x7fd7f0004bf8, result=0x7fd7f0014a30, setup_tables_done_option=0) at /data/src/10.4/sql/sql_select.cc:410
            #27 0x000056114fae43c4 in execute_sqlcom_select (thd=0x7fd7f0000d90, all_tables=0x7fd7f0013a80) at /data/src/10.4/sql/sql_parse.cc:6355
            #28 0x000056114fadaa16 in mysql_execute_command (thd=0x7fd7f0000d90) at /data/src/10.4/sql/sql_parse.cc:3889
            #29 0x000056114fae83cf in mysql_parse (thd=0x7fd7f0000d90, rawbuf=0x7fd7f0013438 "SELECT * FROM t1", length=16, parser_state=0x7fd845b86550, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:7896
            #30 0x000056114fad48de in dispatch_command (command=COM_QUERY, thd=0x7fd7f0000d90, packet=0x7fd7f0008791 "", packet_length=16, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1834
            #31 0x000056114fad3146 in do_command (thd=0x7fd7f0000d90) at /data/src/10.4/sql/sql_parse.cc:1352
            #32 0x000056114fc60d95 in do_handle_one_connection (connect=0x56115345c5c0) at /data/src/10.4/sql/sql_connect.cc:1412
            #33 0x000056114fc60ade in handle_one_connection (arg=0x56115345c5c0) at /data/src/10.4/sql/sql_connect.cc:1316
            #34 0x000056115067ac4c in pfs_spawn_thread (arg=0x561153365110) at /data/src/10.4/storage/perfschema/pfs.cc:1869
            #35 0x00007fd84ceda609 in start_thread (arg=<optimized out>) at pthread_create.c:477
            #36 0x00007fd84caae103 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            

            elenst Elena Stepanova added a comment - The same test case but with ROW_FORMAT=COMPRESSED causes yet another assertion failure: --source include/have_innodb.inc   CREATE TABLE t1 ( pk INT PRIMARY KEY , f1 INT , f2 INT , f3 TEXT, KEY (f1), FULLTEXT(f3), KEY (f3(10)), FOREIGN KEY (f2) REFERENCES t1 (f1) ON DELETE SET NULL ) ENGINE=InnoDB ROW_FORMAT=COMPRESSED WITH SYSTEM VERSIONING; INSERT INTO t1 VALUES (1,8,8, 'a' ), (2,8,8,REPEAT( 'b' ,8071)); --error ER_FOREIGN_DUPLICATE_KEY_WITH_CHILD_INFO DELETE FROM t1; SELECT * FROM t1; # Cleanup DROP TABLE t1; 10.4 9b688471 2020-09-08 12:07:47 9 [ERROR] InnoDB: Duplicate FTS_DOC_ID value on table `test`.`t1` mysqld: /data/src/10.4/storage/innobase/buf/buf0buf.cc:3810: buf_page_t* buf_page_get_zip(page_id_t, ulint): Assertion `!bpage->file_page_was_freed' failed. 200908 12:07:47 [ERROR] mysqld got signal 6 ;   #6 0x00007fd84c9b1729 in __assert_fail_base (fmt=0x7fd84cb47588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x561150bbc488 "!bpage->file_page_was_freed", file=0x561150bba348 "/data/src/10.4/storage/innobase/buf/buf0buf.cc", line=3810, function=<optimized out>) at assert.c:92 #7 0x00007fd84c9c2f36 in __GI___assert_fail (assertion=0x561150bbc488 "!bpage->file_page_was_freed", file=0x561150bba348 "/data/src/10.4/storage/innobase/buf/buf0buf.cc", line=3810, function=0x561150bbc3a8 "buf_page_t* buf_page_get_zip(page_id_t, ulint)") at assert.c:101 #8 0x00005611503aa06c in buf_page_get_zip (page_id=..., zip_size=8192) at /data/src/10.4/storage/innobase/buf/buf0buf.cc:3810 #9 0x00005611503793df in btr_copy_zblob_prefix (buf=0x7fd7f007be70 "a", '\217' <repeats 199 times>..., len=8071, zip_size=8192, space_id=5, page_no=8, offset=12) at /data/src/10.4/storage/innobase/btr/btr0cur.cc:8348 #10 0x00005611503799dd in btr_copy_externally_stored_field_prefix_low (buf=0x7fd7f007be70 "a", '\217' <repeats 199 times>..., len=8071, zip_size=8192, space_id=5, page_no=8, offset=12) at /data/src/10.4/storage/innobase/btr/btr0cur.cc:8471 #11 0x0000561150379c99 in btr_copy_externally_stored_field (len=0x7fd845b84658, data=0x7fd8463540d7 "", zip_size=8192, local_len=0, heap=0x7fd7f007bdf0) at /data/src/10.4/storage/innobase/btr/btr0cur.cc:8581 #12 0x0000561150379db9 in btr_rec_copy_externally_stored_field (rec=0x7fd8463540b7 "\200", offsets=0x7fd845b848e0, zip_size=8192, no=6, len=0x7fd845b84658, heap=0x7fd7f007bdf0) at /data/src/10.4/storage/innobase/btr/btr0cur.cc:8636 #13 0x000056115028f96e in row_sel_store_mysql_field (mysql_rec=0x7fd7f0181cd0 "\370\002", prebuilt=0x7fd7f01ae310, rec=0x7fd8463540b7 "\200", index=0x7fd7f012fd20, offsets=0x7fd845b848e0, field_no=6, templ=0x7fd7f0074f80) at /data/src/10.4/storage/innobase/row/row0sel.cc:2906 #14 0x00005611502903b4 in row_sel_store_mysql_rec (mysql_rec=0x7fd7f0181cd0 "\370\002", prebuilt=0x7fd7f01ae310, rec=0x7fd8463540b7 "\200", vrow=0x0, rec_clust=false, index=0x7fd7f012fd20, offsets=0x7fd845b848e0) at /data/src/10.4/storage/innobase/row/row0sel.cc:3117 #15 0x0000561150297206 in row_search_mvcc (buf=0x7fd7f0181cd0 "\370\002", mode=PAGE_CUR_G, prebuilt=0x7fd7f01ae310, match_mode=0, direction=1) at /data/src/10.4/storage/innobase/row/row0sel.cc:5488 #16 0x00005611500a47c4 in ha_innobase::general_fetch (this=0x7fd7f01ad5a8, buf=0x7fd7f0181cd0 "\370\002", direction=1, match_mode=0) at /data/src/10.4/storage/innobase/handler/ha_innodb.cc:9481 #17 0x00005611500a4d49 in ha_innobase::rnd_next (this=0x7fd7f01ad5a8, buf=0x7fd7f0181cd0 "\370\002") at /data/src/10.4/storage/innobase/handler/ha_innodb.cc:9691 #18 0x000056114fe48f38 in handler::ha_rnd_next (this=0x7fd7f01ad5a8, buf=0x7fd7f0181cd0 "\370\002") at /data/src/10.4/sql/handler.cc:2862 #19 0x000056114fff97c0 in rr_sequential (info=0x7fd7f00171f8) at /data/src/10.4/sql/records.cc:485 #20 0x000056114fa26ed7 in READ_RECORD::read_record (this=0x7fd7f00171f8) at /data/src/10.4/sql/records.h:70 #21 0x000056114fb5a58c in sub_select (join=0x7fd7f0014a58, join_tab=0x7fd7f0017130, end_of_records=false) at /data/src/10.4/sql/sql_select.cc:20427 #22 0x000056114fb5999c in do_select (join=0x7fd7f0014a58, procedure=0x0) at /data/src/10.4/sql/sql_select.cc:19946 #23 0x000056114fb2e6ab in JOIN::exec_inner (this=0x7fd7f0014a58) at /data/src/10.4/sql/sql_select.cc:4478 #24 0x000056114fb2d7da in JOIN::exec (this=0x7fd7f0014a58) at /data/src/10.4/sql/sql_select.cc:4260 #25 0x000056114fb2ef2e in mysql_select (thd=0x7fd7f0000d90, tables=0x7fd7f0013a80, wild_num=1, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fd7f0014a30, unit=0x7fd7f0004cb8, select_lex=0x7fd7f00134c0) at /data/src/10.4/sql/sql_select.cc:4695 #26 0x000056114fb1e93f in handle_select (thd=0x7fd7f0000d90, lex=0x7fd7f0004bf8, result=0x7fd7f0014a30, setup_tables_done_option=0) at /data/src/10.4/sql/sql_select.cc:410 #27 0x000056114fae43c4 in execute_sqlcom_select (thd=0x7fd7f0000d90, all_tables=0x7fd7f0013a80) at /data/src/10.4/sql/sql_parse.cc:6355 #28 0x000056114fadaa16 in mysql_execute_command (thd=0x7fd7f0000d90) at /data/src/10.4/sql/sql_parse.cc:3889 #29 0x000056114fae83cf in mysql_parse (thd=0x7fd7f0000d90, rawbuf=0x7fd7f0013438 "SELECT * FROM t1", length=16, parser_state=0x7fd845b86550, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:7896 #30 0x000056114fad48de in dispatch_command (command=COM_QUERY, thd=0x7fd7f0000d90, packet=0x7fd7f0008791 "", packet_length=16, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1834 #31 0x000056114fad3146 in do_command (thd=0x7fd7f0000d90) at /data/src/10.4/sql/sql_parse.cc:1352 #32 0x000056114fc60d95 in do_handle_one_connection (connect=0x56115345c5c0) at /data/src/10.4/sql/sql_connect.cc:1412 #33 0x000056114fc60ade in handle_one_connection (arg=0x56115345c5c0) at /data/src/10.4/sql/sql_connect.cc:1316 #34 0x000056115067ac4c in pfs_spawn_thread (arg=0x561153365110) at /data/src/10.4/storage/perfschema/pfs.cc:1869 #35 0x00007fd84ceda609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #36 0x00007fd84caae103 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

            And more

            --source include/have_innodb.inc
             
            CREATE TABLE t1 (
              f1 INT,
              f2 INT,
              f3 INT,
              f4 TEXT,
              KEY ind1 (f3),
              FOREIGN KEY (f2) REFERENCES t1 (f3) ON DELETE SET NULL,
              FOREIGN KEY (f1) REFERENCES t1 (f2) ON DELETE SET NULL
            ) ENGINE=InnoDB WITH SYSTEM VERSIONING;
            INSERT INTO t1 VALUES (1,1,1,REPEAT('a',8193)), (1,1,1,REPEAT('a',8193));
            --error ER_ROW_IS_REFERENCED_2
            DELETE FROM t1;
            ALTER TABLE t1 ADD KEY idx (f4(10));
             
            # Cleanup
            DROP TABLE t1;
            

            10.3 ade782c0

            2020-09-21  0:39:43 9 [ERROR] [FATAL] InnoDB: FIL_PAGE_TYPE=17855 on BLOB read space 5 page 8 flags 33
            200921  0:39:43 [ERROR] mysqld got signal 6 ;
             
            #5  0x00007fdeb3117859 in __GI_abort () at abort.c:79
            #6  0x0000555c97c3ce13 in ib::fatal::~fatal (this=0x7fdeac2dcc30, __in_chrg=<optimized out>) at /data/src/10.3/storage/innobase/ut/ut0ut.cc:603
            #7  0x0000555c97c88ba9 in btr_check_blob_fil_page_type (space_id=5, page_no=8, page=0x7fdeacad4000 "", read=1) at /data/src/10.3/storage/innobase/btr/btr0cur.cc:7689
            #8  0x0000555c97c8a00e in btr_copy_blob_prefix (buf=0x7fde5c0bd6e0 'a' <repeats 200 times>..., len=3072, space_id=5, page_no=8, offset=38) at /data/src/10.3/storage/innobase/btr/btr0cur.cc:7995
            #9  0x0000555c97c8aae8 in btr_copy_externally_stored_field_prefix_low (buf=0x7fde5c0bd6e0 'a' <repeats 200 times>..., len=3072, page_size=..., space_id=5, page_no=8, offset=38) at /data/src/10.3/storage/innobase/btr/btr0cur.cc:8200
            #10 0x0000555c97c8ac5a in btr_copy_externally_stored_field_prefix (buf=0x7fde5c0bd6e0 'a' <repeats 200 times>..., len=3072, page_size=..., data=0x7fdeacac017a "", local_len=0) at /data/src/10.3/storage/innobase/btr/btr0cur.cc:8257
            #11 0x0000555c97de93a2 in row_ext_cache_fill (ext=0x7fde5c0bd6b0, i=0, page_size=..., dfield=0x7fde5c0bd620) at /data/src/10.3/storage/innobase/row/row0ext.cc:78
            #12 0x0000555c97de9543 in row_ext_create (n_ext=1, ext=0x7fde5c0bd598, flags=33, tuple=0x7fde5c0bd5a0, heap=0x7fde5c0bd4f0) at /data/src/10.3/storage/innobase/row/row0ext.cc:128
            #13 0x0000555c97b7ec21 in row_build_low (type=2, index=0x7fde5c03c390, rec=0x7fdeacac015b "", offsets=0x7fde5c0bd570, col_table=0x7fde5c0b3340, defaults=0x0, add_v=0x0, col_map=0x0, ext=0x7fdeac2dd908, heap=0x7fde5c0bd4f0) at /data/src/10.3/storage/innobase/row/row0row.cc:569
            #14 0x0000555c97b7ed0e in row_build_w_add_vcol (type=2, index=0x7fde5c03c390, rec=0x7fdeacac015b "", offsets=0x7fde5c0bd570, col_table=0x7fde5c0b3340, defaults=0x0, add_v=0x0, col_map=0x0, ext=0x7fdeac2dd908, heap=0x7fde5c0bd4f0) at /data/src/10.3/storage/innobase/row/row0row.cc:668
            #15 0x0000555c97b354b6 in row_merge_read_clustered_index (trx=0x7fdeacde60f0, table=0x7fde5c168230, old_table=0x7fde5c0b3340, new_table=0x7fde5c0b3340, online=true, index=0x7fde5c16a5f8, fts_sort_idx=0x0, psort_info=0x0, files=0x7fde5c14c3f0, key_numbers=0x7fde5c16a600, n_index=1, defaults=0x0, add_v=0x0, col_map=0x0, add_autoinc=18446744073709551615, sequence=..., block=0x7fdea42f4000 "", skip_pk_sort=false, tmpfd=0x7fdeac2de530, stage=0x7fde5c06ab80, pct_cost=50, crypt_block=0x0, eval_table=0x7fde5c168230, allow_not_null=false) at /data/src/10.3/storage/innobase/row/row0merge.cc:2156
            #16 0x0000555c97b3e232 in row_merge_build_indexes (trx=0x7fdeacde60f0, old_table=0x7fde5c0b3340, new_table=0x7fde5c0b3340, online=true, indexes=0x7fde5c16a5f8, key_numbers=0x7fde5c16a600, n_indexes=1, table=0x7fde5c168230, defaults=0x0, col_map=0x0, add_autoinc=18446744073709551615, sequence=..., skip_pk_sort=false, stage=0x7fde5c06ab80, add_v=0x0, eval_table=0x7fde5c168230, allow_not_null=false) at /data/src/10.3/storage/innobase/row/row0merge.cc:4709
            #17 0x0000555c979fd4cf in ha_innobase::inplace_alter_table (this=0x7fde5c0b9028, altered_table=0x7fde5c168230, ha_alter_info=0x7fdeac2df1b0) at /data/src/10.3/storage/innobase/handler/handler0alter.cc:7148
            #18 0x0000555c9753c78b in handler::ha_inplace_alter_table (this=0x7fde5c0b9028, altered_table=0x7fde5c168230, ha_alter_info=0x7fdeac2df1b0) at /data/src/10.3/sql/handler.h:4207
            #19 0x0000555c97530b38 in mysql_inplace_alter_table (thd=0x7fde5c000d90, table_list=0x7fde5c012bb0, table=0x7fde5c0b83e0, altered_table=0x7fde5c168230, ha_alter_info=0x7fdeac2df1b0, inplace_supported=HA_ALTER_INPLACE_NOCOPY_NO_LOCK, target_mdl_request=0x7fdeac2df330, alter_ctx=0x7fdeac2df8e0) at /data/src/10.3/sql/sql_table.cc:7654
            #20 0x0000555c97537823 in mysql_alter_table (thd=0x7fde5c000d90, new_db=0x7fde5c005478, new_name=0x7fde5c005840, create_info=0x7fdeac2e04d0, table_list=0x7fde5c012bb0, alter_info=0x7fdeac2e0410, order_num=0, order=0x0, ignore=false) at /data/src/10.3/sql/sql_table.cc:9946
            #21 0x0000555c975c7ab0 in Sql_cmd_alter_table::execute (this=0x7fde5c0132e8, thd=0x7fde5c000d90) at /data/src/10.3/sql/sql_alter.cc:512
            #22 0x0000555c974539e1 in mysql_execute_command (thd=0x7fde5c000d90) at /data/src/10.3/sql/sql_parse.cc:6022
            #23 0x0000555c97459246 in mysql_parse (thd=0x7fde5c000d90, rawbuf=0x7fde5c012ab8 "ALTER TABLE t1 ADD KEY idx (f4(10))", length=35, parser_state=0x7fdeac2e15c0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7810
            #24 0x0000555c97445a07 in dispatch_command (command=COM_QUERY, thd=0x7fde5c000d90, packet=0x7fde5c008f11 "ALTER TABLE t1 ADD KEY idx (f4(10))", packet_length=35, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1847
            #25 0x0000555c974443a7 in do_command (thd=0x7fde5c000d90) at /data/src/10.3/sql/sql_parse.cc:1393
            #26 0x0000555c975c1948 in do_handle_one_connection (connect=0x555c9a5b2150) at /data/src/10.3/sql/sql_connect.cc:1403
            #27 0x0000555c975c16a4 in handle_one_connection (arg=0x555c9a5b2150) at /data/src/10.3/sql/sql_connect.cc:1308
            #28 0x0000555c97f89491 in pfs_spawn_thread (arg=0x555c9a5b98b0) at /data/src/10.3/storage/perfschema/pfs.cc:1869
            #29 0x00007fdeb363a609 in start_thread (arg=<optimized out>) at pthread_create.c:477
            #30 0x00007fdeb3214103 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            

            elenst Elena Stepanova added a comment - And more --source include/have_innodb.inc   CREATE TABLE t1 ( f1 INT , f2 INT , f3 INT , f4 TEXT, KEY ind1 (f3), FOREIGN KEY (f2) REFERENCES t1 (f3) ON DELETE SET NULL , FOREIGN KEY (f1) REFERENCES t1 (f2) ON DELETE SET NULL ) ENGINE=InnoDB WITH SYSTEM VERSIONING; INSERT INTO t1 VALUES (1,1,1,REPEAT( 'a' ,8193)), (1,1,1,REPEAT( 'a' ,8193)); --error ER_ROW_IS_REFERENCED_2 DELETE FROM t1; ALTER TABLE t1 ADD KEY idx (f4(10));   # Cleanup DROP TABLE t1; 10.3 ade782c0 2020-09-21 0:39:43 9 [ERROR] [FATAL] InnoDB: FIL_PAGE_TYPE=17855 on BLOB read space 5 page 8 flags 33 200921 0:39:43 [ERROR] mysqld got signal 6 ;   #5 0x00007fdeb3117859 in __GI_abort () at abort.c:79 #6 0x0000555c97c3ce13 in ib::fatal::~fatal (this=0x7fdeac2dcc30, __in_chrg=<optimized out>) at /data/src/10.3/storage/innobase/ut/ut0ut.cc:603 #7 0x0000555c97c88ba9 in btr_check_blob_fil_page_type (space_id=5, page_no=8, page=0x7fdeacad4000 "", read=1) at /data/src/10.3/storage/innobase/btr/btr0cur.cc:7689 #8 0x0000555c97c8a00e in btr_copy_blob_prefix (buf=0x7fde5c0bd6e0 'a' <repeats 200 times>..., len=3072, space_id=5, page_no=8, offset=38) at /data/src/10.3/storage/innobase/btr/btr0cur.cc:7995 #9 0x0000555c97c8aae8 in btr_copy_externally_stored_field_prefix_low (buf=0x7fde5c0bd6e0 'a' <repeats 200 times>..., len=3072, page_size=..., space_id=5, page_no=8, offset=38) at /data/src/10.3/storage/innobase/btr/btr0cur.cc:8200 #10 0x0000555c97c8ac5a in btr_copy_externally_stored_field_prefix (buf=0x7fde5c0bd6e0 'a' <repeats 200 times>..., len=3072, page_size=..., data=0x7fdeacac017a "", local_len=0) at /data/src/10.3/storage/innobase/btr/btr0cur.cc:8257 #11 0x0000555c97de93a2 in row_ext_cache_fill (ext=0x7fde5c0bd6b0, i=0, page_size=..., dfield=0x7fde5c0bd620) at /data/src/10.3/storage/innobase/row/row0ext.cc:78 #12 0x0000555c97de9543 in row_ext_create (n_ext=1, ext=0x7fde5c0bd598, flags=33, tuple=0x7fde5c0bd5a0, heap=0x7fde5c0bd4f0) at /data/src/10.3/storage/innobase/row/row0ext.cc:128 #13 0x0000555c97b7ec21 in row_build_low (type=2, index=0x7fde5c03c390, rec=0x7fdeacac015b "", offsets=0x7fde5c0bd570, col_table=0x7fde5c0b3340, defaults=0x0, add_v=0x0, col_map=0x0, ext=0x7fdeac2dd908, heap=0x7fde5c0bd4f0) at /data/src/10.3/storage/innobase/row/row0row.cc:569 #14 0x0000555c97b7ed0e in row_build_w_add_vcol (type=2, index=0x7fde5c03c390, rec=0x7fdeacac015b "", offsets=0x7fde5c0bd570, col_table=0x7fde5c0b3340, defaults=0x0, add_v=0x0, col_map=0x0, ext=0x7fdeac2dd908, heap=0x7fde5c0bd4f0) at /data/src/10.3/storage/innobase/row/row0row.cc:668 #15 0x0000555c97b354b6 in row_merge_read_clustered_index (trx=0x7fdeacde60f0, table=0x7fde5c168230, old_table=0x7fde5c0b3340, new_table=0x7fde5c0b3340, online=true, index=0x7fde5c16a5f8, fts_sort_idx=0x0, psort_info=0x0, files=0x7fde5c14c3f0, key_numbers=0x7fde5c16a600, n_index=1, defaults=0x0, add_v=0x0, col_map=0x0, add_autoinc=18446744073709551615, sequence=..., block=0x7fdea42f4000 "", skip_pk_sort=false, tmpfd=0x7fdeac2de530, stage=0x7fde5c06ab80, pct_cost=50, crypt_block=0x0, eval_table=0x7fde5c168230, allow_not_null=false) at /data/src/10.3/storage/innobase/row/row0merge.cc:2156 #16 0x0000555c97b3e232 in row_merge_build_indexes (trx=0x7fdeacde60f0, old_table=0x7fde5c0b3340, new_table=0x7fde5c0b3340, online=true, indexes=0x7fde5c16a5f8, key_numbers=0x7fde5c16a600, n_indexes=1, table=0x7fde5c168230, defaults=0x0, col_map=0x0, add_autoinc=18446744073709551615, sequence=..., skip_pk_sort=false, stage=0x7fde5c06ab80, add_v=0x0, eval_table=0x7fde5c168230, allow_not_null=false) at /data/src/10.3/storage/innobase/row/row0merge.cc:4709 #17 0x0000555c979fd4cf in ha_innobase::inplace_alter_table (this=0x7fde5c0b9028, altered_table=0x7fde5c168230, ha_alter_info=0x7fdeac2df1b0) at /data/src/10.3/storage/innobase/handler/handler0alter.cc:7148 #18 0x0000555c9753c78b in handler::ha_inplace_alter_table (this=0x7fde5c0b9028, altered_table=0x7fde5c168230, ha_alter_info=0x7fdeac2df1b0) at /data/src/10.3/sql/handler.h:4207 #19 0x0000555c97530b38 in mysql_inplace_alter_table (thd=0x7fde5c000d90, table_list=0x7fde5c012bb0, table=0x7fde5c0b83e0, altered_table=0x7fde5c168230, ha_alter_info=0x7fdeac2df1b0, inplace_supported=HA_ALTER_INPLACE_NOCOPY_NO_LOCK, target_mdl_request=0x7fdeac2df330, alter_ctx=0x7fdeac2df8e0) at /data/src/10.3/sql/sql_table.cc:7654 #20 0x0000555c97537823 in mysql_alter_table (thd=0x7fde5c000d90, new_db=0x7fde5c005478, new_name=0x7fde5c005840, create_info=0x7fdeac2e04d0, table_list=0x7fde5c012bb0, alter_info=0x7fdeac2e0410, order_num=0, order=0x0, ignore=false) at /data/src/10.3/sql/sql_table.cc:9946 #21 0x0000555c975c7ab0 in Sql_cmd_alter_table::execute (this=0x7fde5c0132e8, thd=0x7fde5c000d90) at /data/src/10.3/sql/sql_alter.cc:512 #22 0x0000555c974539e1 in mysql_execute_command (thd=0x7fde5c000d90) at /data/src/10.3/sql/sql_parse.cc:6022 #23 0x0000555c97459246 in mysql_parse (thd=0x7fde5c000d90, rawbuf=0x7fde5c012ab8 "ALTER TABLE t1 ADD KEY idx (f4(10))", length=35, parser_state=0x7fdeac2e15c0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7810 #24 0x0000555c97445a07 in dispatch_command (command=COM_QUERY, thd=0x7fde5c000d90, packet=0x7fde5c008f11 "ALTER TABLE t1 ADD KEY idx (f4(10))", packet_length=35, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1847 #25 0x0000555c974443a7 in do_command (thd=0x7fde5c000d90) at /data/src/10.3/sql/sql_parse.cc:1393 #26 0x0000555c975c1948 in do_handle_one_connection (connect=0x555c9a5b2150) at /data/src/10.3/sql/sql_connect.cc:1403 #27 0x0000555c975c16a4 in handle_one_connection (arg=0x555c9a5b2150) at /data/src/10.3/sql/sql_connect.cc:1308 #28 0x0000555c97f89491 in pfs_spawn_thread (arg=0x555c9a5b98b0) at /data/src/10.3/storage/perfschema/pfs.cc:1869 #29 0x00007fdeb363a609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #30 0x00007fdeb3214103 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

            People

              midenok Aleksey Midenkov
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.