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

Assertion `dfield_is_ext(field)' failed in rec_convert_dtuple_to_rec_comp upon DROP COLUMN



      Note: might be related to MDEV-17763, the test case is similar.
      Note: Run with --repeat=N if it doesn't fail right away. It usually fails for me within first 1-2 attempts, but it can probably vary on different machines and builds.

      --source include/have_innodb.inc
      CREATE TABLE t1 (
        pk INT,
        f1 INT,
        f2 CHAR(255),
        f3 BIGINT,
        f4 INT,
        f5 CHAR(255),
        f6 CHAR(255),
        f7 CHAR(255),
        f8 CHAR(10),
        PRIMARY KEY (pk)
      ) ENGINE=InnoDB;
        (1, 1, 'a', 1, 1, 'a', 'a', 'a', 'a'),
        (2, 2, 'b', 2, 2, 'b', 'b', 'b', 'b'),
        (3, 3, 'c', 3, 3, 'c', 'c', 'c', 'c'),
        (4, 4, 'd', 4, 4, 'd', 'd', 'd', 'd'),
        (5, 5, 'e', 5, 5, 'e', 'e', 'e', 'e'),
        (6, 6, 'f', 6, 6, 'f', 'f', 'f', 'f'),
        (7, 7, 'g', 7, 7, 'g', 'g', 'g', 'g'),
        (8, 8, 'h', 8, 8, 'h', 'h', 'h', 'h'),
        (9, 9, 'i', 9, 9, 'i', 'i', 'i', 'i'),
        (10, 0, 'j', 0, 0, 'j', 'j', 'j', 'j'),
        (11, 1, 'k', 1, 1, 'k', 'k', 'k', 'k'),
        (12, 2, 'l', 2, 2, 'l', 'l', 'l', 'l'),
        (13, 3, 'm', 3, 3, 'm', 'm', 'm', 'm'),
        (14, 4, 'n', 4, 4, 'n', 'n', 'n', 'n'),
        (15, 5, 'o', 5, 5, 'o', 'o', 'o', 'o');
      DELETE FROM t1 WHERE pk = 1;
      INSERT INTO t1 VALUES (1, 1, 'a', 1, 1, 'a', 'a', 'a', 'a');
      # Cleanup
      DROP TABLE t1;

      10.4 27f3329ff6

      mysqld: /data/src/10.4/storage/innobase/rem/rem0rec.cc:1608: void rec_convert_dtuple_to_rec_comp(rec_t*, const dict_index_t*, const dfield_t*, ulint, rec_comp_status_t, bool) [with bool mblob = true; rec_t = unsigned char; ulint = long unsigned int]: Assertion `dfield_is_ext(field)' failed.
      181125 17:07:13 [ERROR] mysqld got signal 6 ;
      #7  0x00007fa051265ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x000055841261d59c in rec_convert_dtuple_to_rec_comp<true> (rec=0x7f9ff805b9ff "\200", index=0x7f9ff8097888, field=0x7f9ff805ce60, n_fields=12, status=REC_STATUS_INSTANT, temp=false) at /data/src/10.4/storage/innobase/rem/rem0rec.cc:1608
      #9  0x0000558412616e42 in rec_convert_dtuple_to_rec_new (buf=0x7f9ff805b9ff "\200", index=0x7f9ff8097888, dtuple=0x7f9ff805cdd0) at /data/src/10.4/storage/innobase/rem/rem0rec.cc:1722
      #10 0x00005584126170a5 in rec_convert_dtuple_to_rec (buf=0x7f9ff805b9f8 "", index=0x7f9ff8097888, dtuple=0x7f9ff805cdd0, n_ext=0) at /data/src/10.4/storage/innobase/rem/rem0rec.cc:1766
      #11 0x000055841272c610 in page_cur_tuple_insert (cursor=0x7fa04655f358, tuple=0x7f9ff805cdd0, index=0x7f9ff8097888, offsets=0x7fa04655f2e8, heap=0x7fa04655f2e0, n_ext=0, mtr=0x7fa04655f770) at /data/src/10.4/storage/innobase/include/page0cur.ic:278
      #12 0x0000558412736416 in btr_page_split_and_insert (flags=2, cursor=0x7fa04655f350, offsets=0x7fa04655f2e8, heap=0x7fa04655f2e0, tuple=0x7f9ff805cdd0, n_ext=0, mtr=0x7fa04655f770) at /data/src/10.4/storage/innobase/btr/btr0btr.cc:3284
      #13 0x00005584127597b7 in btr_cur_pessimistic_insert (flags=2, cursor=0x7fa04655f350, offsets=0x7fa04655f2e8, heap=0x7fa04655f2e0, entry=0x7f9ff805cdd0, rec=0x7fa04655f2f0, big_rec=0x7fa04655f2d8, n_ext=0, thr=0x7f9ff805d010, mtr=0x7fa04655f770) at /data/src/10.4/storage/innobase/btr/btr0cur.cc:3695
      #14 0x0000558412640f95 in row_ins_clust_index_entry_low (flags=2, mode=33, index=0x7f9ff8097888, n_uniq=1, entry=0x7f9ff805cdd0, n_ext=0, thr=0x7f9ff805d010, dup_chk_only=false) at /data/src/10.4/storage/innobase/row/row0ins.cc:2767
      #15 0x00005584125388be in innobase_instant_try (ha_alter_info=0x7fa046561bb0, ctx=0x7f9ff8017030, altered_table=0x7f9ff804f4e0, table=0x7f9ff812d030, trx=0x7fa04c049218) at /data/src/10.4/storage/innobase/handler/handler0alter.cc:5647
      #16 0x0000558412552fcb in commit_try_norebuild (ha_alter_info=0x7fa046561bb0, ctx=0x7f9ff8017030, altered_table=0x7f9ff804f4e0, old_table=0x7f9ff812d030, trx=0x7fa04c049218, table_name=0x7f9ff81304cd "t1") at /data/src/10.4/storage/innobase/handler/handler0alter.cc:10013
      #17 0x0000558412545d02 in ha_innobase::commit_inplace_alter_table (this=0x7f9ff80944e8, altered_table=0x7f9ff804f4e0, ha_alter_info=0x7fa046561bb0, commit=true) at /data/src/10.4/storage/innobase/handler/handler0alter.cc:10642
      #18 0x00005584121e0a78 in handler::ha_commit_inplace_alter_table (this=0x7f9ff80944e8, altered_table=0x7f9ff804f4e0, ha_alter_info=0x7fa046561bb0, commit=true) at /data/src/10.4/sql/handler.cc:4457
      #19 0x0000558411faa918 in mysql_inplace_alter_table (thd=0x7f9ff8000b00, table_list=0x7f9ff8014e80, table=0x7f9ff812d030, altered_table=0x7f9ff804f4e0, ha_alter_info=0x7fa046561bb0, inplace_supported=HA_ALTER_INPLACE_INSTANT, target_mdl_request=0x7fa046561ce0, alter_ctx=0x7fa0465628d0) at /data/src/10.4/sql/sql_table.cc:7599
      #20 0x0000558411fb0733 in mysql_alter_table (thd=0x7f9ff8000b00, new_db=0x7f9ff80051b8, new_name=0x7f9ff8005588, create_info=0x7fa0465634c0, table_list=0x7f9ff8014e80, alter_info=0x7fa046563400, order_num=0, order=0x0, ignore=false) at /data/src/10.4/sql/sql_table.cc:9692
      #21 0x00005584120398bd in Sql_cmd_alter_table::execute (this=0x7f9ff80154e8, thd=0x7f9ff8000b00) at /data/src/10.4/sql/sql_alter.cc:497
      #22 0x0000558411ed8ab4 in mysql_execute_command (thd=0x7f9ff8000b00) at /data/src/10.4/sql/sql_parse.cc:6289
      #23 0x0000558411edd9d8 in mysql_parse (thd=0x7f9ff8000b00, rawbuf=0x7f9ff8014d98 "ALTER TABLE t1 DROP COLUMN f1", length=29, parser_state=0x7fa046564600, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:8091
      #24 0x0000558411ecacd7 in dispatch_command (command=COM_QUERY, thd=0x7f9ff8000b00, packet=0x7f9ff800b401 "ALTER TABLE t1 DROP COLUMN f1", packet_length=29, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1851
      #25 0x0000558411ec96fb in do_command (thd=0x7f9ff8000b00) at /data/src/10.4/sql/sql_parse.cc:1396
      #26 0x0000558412033b3c in do_handle_one_connection (connect=0x55841585f3e0) at /data/src/10.4/sql/sql_connect.cc:1402
      #27 0x00005584120338c0 in handle_one_connection (arg=0x55841585f3e0) at /data/src/10.4/sql/sql_connect.cc:1308
      #28 0x00005584124e10a1 in pfs_spawn_thread (arg=0x5584158e46b0) at /data/src/10.4/storage/perfschema/pfs.cc:1862
      #29 0x00007fa052d21494 in start_thread (arg=0x7fa046565700) at pthread_create.c:333
      #30 0x00007fa05132293f in clone () from /lib/x86_64-linux-gnu/libc.so.6

      Not reproducible on 10.3.
      No obvious effect on a non-debug build.


          Issue Links



              • Assignee:
                marko Marko Mäkelä
                elenst Elena Stepanova
              • Votes:
                0 Vote for this issue
                2 Start watching this issue


                • Created: