Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-17520 Instant ALTER TABLE for failure-free column type changes
  3. MDEV-17925

Assertion `!dfield_is_null(field)' failed in rec_convert_dtuple_to_rec_comp

    XMLWordPrintable

Details

    Description

      Note: sorry for the raw test case, it's derived from MDEV-17924 and the same excuse applies: I don't want to spend time polishing it. Most of those tables must be redundant, they just help to generate the eventual data which can of course be done without intermediaries.

      --source include/have_innodb.inc
       
      CREATE TABLE t1 (bcol9 BIT NOT NULL) WITH SYSTEM VERSIONING ENGINE=InnoDB;
      CREATE TABLE t2 (icol5 MEDIUMINT DEFAULT NULL) ENGINE=InnoDB;
      CREATE TABLE t3 (geocol5 MULTILINESTRING NOT NULL) ENGINE=InnoDB;
      CREATE TABLE t4 (icol1 INT UNSIGNED) ENGINE=InnoDB;
      SET sql_mode= '';
       
      REPLACE INTO t2 () VALUES (),(),(),();
      SELECT * FROM t2 INTO OUTFILE 'load_t2';
      LOAD DATA INFILE 'load_t2' REPLACE INTO TABLE t2;
      INSERT INTO t2 () VALUES (),();
      INSERT INTO t4 () VALUES (),(),();
      REPLACE INTO t1 () VALUES (),(),(),();
      LOAD DATA INFILE 'load_t2' REPLACE INTO TABLE t1;
      INSERT INTO t1 () VALUES (),();
      INSERT INTO t1 SELECT * FROM t2;
      INSERT IGNORE INTO t4 () VALUES (),(),(),();
      INSERT IGNORE INTO t2 () VALUES (),(),(),();
      SELECT * FROM t4 INTO OUTFILE 'load_t4';
      LOAD DATA INFILE 'load_t4' REPLACE INTO TABLE t4;
      LOAD DATA INFILE 'load_t4' REPLACE INTO TABLE t4;
      LOAD DATA INFILE 'load_t4' REPLACE INTO TABLE t4;
      INSERT IGNORE INTO t1 () VALUES (),(),(),();
      INSERT INTO t4 SELECT * FROM t4;
      INSERT INTO t1 SELECT * FROM t1;
      INSERT IGNORE INTO t1 SELECT * FROM t1;
      INSERT INTO t3 SELECT * FROM t2;
      SELECT * FROM t3 INTO OUTFILE 'load_t3';
      LOAD DATA INFILE 'load_t3' IGNORE INTO TABLE t3;
      INSERT IGNORE INTO t1 SELECT * FROM t1;
      INSERT INTO t1 SELECT * FROM t1;
      CREATE OR REPLACE TABLE t5 (tcol8 TIME ) ENGINE=InnoDB;
      INSERT INTO t3 SELECT * FROM t4;
      INSERT INTO t5 SELECT * FROM t3;
      INSERT INTO t1 SELECT * FROM t3;
      INSERT INTO t1 SELECT * FROM t5;
      SET STATEMENT system_versioning_alter_history= KEEP FOR ALTER TABLE t1 MODIFY COLUMN bcol9 BIT, ALGORITHM=DEFAULT;
      REPLACE INTO t1 () VALUES ();
      

      bb-10.4-MDEV-17520 b6639a3cf

      mysqld: /data/src/bb-10.4-MDEV-17520-2/storage/innobase/rem/rem0rec.cc:1635: 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 = false; rec_t = unsigned char; ulint = long unsigned int]: Assertion `!dfield_is_null(field)' failed.
      181207 11:09:03 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f83a92c0ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x00005597953f1f61 in rec_convert_dtuple_to_rec_comp<false> (rec=0x7f833c0660d5 "", index=0x7f833c024098, field=0x7f833c05eb38, n_fields=6, status=REC_STATUS_ORDINARY, temp=false) at /data/src/bb-10.4-MDEV-17520/storage/innobase/rem/rem0rec.cc:1635
      #9  0x00005597953ea2a6 in rec_convert_dtuple_to_rec_new (buf=0x7f833c0660d5 "", index=0x7f833c024098, dtuple=0x7f833c05eaa8) at /data/src/bb-10.4-MDEV-17520/storage/innobase/rem/rem0rec.cc:1732
      #10 0x00005597953ea3bb in rec_convert_dtuple_to_rec (buf=0x7f833c0660d0 "\230", format=REC_FMT_LEAF, index=0x7f833c024098, dtuple=0x7f833c05eaa8, n_ext=0) at /data/src/bb-10.4-MDEV-17520/storage/innobase/rem/rem0rec.cc:1758
      #11 0x000055979550a9ab in btr_page_split_and_insert (flags=0, cursor=0x7f83a8193b20, offsets=0x7f83a8193ab8, heap=0x7f83a8193ab0, tuple=0x7f833c05eaa8, n_ext=0, mtr=0x7f83a8193f40) at /data/src/bb-10.4-MDEV-17520/storage/innobase/btr/btr0btr.cc:3205
      #12 0x000055979552eb6b in btr_cur_pessimistic_insert (flags=0, cursor=0x7f83a8193b20, offsets=0x7f83a8193ab8, heap=0x7f83a8193ab0, entry=0x7f833c05eaa8, rec=0x7f83a8193ac0, big_rec=0x7f83a8193aa8, n_ext=0, thr=0x7f833c03a460, mtr=0x7f83a8193f40) at /data/src/bb-10.4-MDEV-17520/storage/innobase/btr/btr0cur.cc:3739
      #13 0x0000559795414d27 in row_ins_clust_index_entry_low (flags=0, mode=33, index=0x7f833c024098, n_uniq=0, entry=0x7f833c05eaa8, n_ext=0, thr=0x7f833c03a460, dup_chk_only=false) at /data/src/bb-10.4-MDEV-17520/storage/innobase/row/row0ins.cc:2777
      #14 0x00005597954164e1 in row_ins_clust_index_entry (index=0x7f833c024098, entry=0x7f833c05eaa8, thr=0x7f833c03a460, n_ext=0, dup_chk_only=false) at /data/src/bb-10.4-MDEV-17520/storage/innobase/row/row0ins.cc:3279
      #15 0x00005597954168a6 in row_ins_index_entry (index=0x7f833c024098, entry=0x7f833c05eaa8, thr=0x7f833c03a460) at /data/src/bb-10.4-MDEV-17520/storage/innobase/row/row0ins.cc:3387
      #16 0x0000559795416f7c in row_ins_index_entry_step (node=0x7f833c03a1d0, thr=0x7f833c03a460) at /data/src/bb-10.4-MDEV-17520/storage/innobase/row/row0ins.cc:3555
      #17 0x00005597954173b0 in row_ins (node=0x7f833c03a1d0, thr=0x7f833c03a460) at /data/src/bb-10.4-MDEV-17520/storage/innobase/row/row0ins.cc:3698
      #18 0x0000559795417bb0 in row_ins_step (thr=0x7f833c03a460) at /data/src/bb-10.4-MDEV-17520/storage/innobase/row/row0ins.cc:3943
      #19 0x00005597954376ab in row_insert_for_mysql (mysql_rec=0x7f833c038700 "\377", prebuilt=0x7f833c039c58, ins_mode=ROW_INS_NORMAL) at /data/src/bb-10.4-MDEV-17520/storage/innobase/row/row0mysql.cc:1460
      #20 0x00005597952d07f6 in ha_innobase::write_row (this=0x7f833c05e138, record=0x7f833c038700 "\377") at /data/src/bb-10.4-MDEV-17520/storage/innobase/handler/ha_innodb.cc:8045
      #21 0x0000559794fb06e4 in handler::ha_write_row (this=0x7f833c05e138, buf=0x7f833c038700 "\377") at /data/src/bb-10.4-MDEV-17520/sql/handler.cc:6238
      #22 0x0000559794c5593c in write_record (thd=0x7f833c000b00, table=0x7f833c05d500, info=0x7f83a8194bd0) at /data/src/bb-10.4-MDEV-17520/sql/sql_insert.cc:1696
      #23 0x0000559794c52da7 in mysql_insert (thd=0x7f833c000b00, table_list=0x7f833c0139e0, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_REPLACE, ignore=false) at /data/src/bb-10.4-MDEV-17520/sql/sql_insert.cc:1063
      #24 0x0000559794c991af in mysql_execute_command (thd=0x7f833c000b00) at /data/src/bb-10.4-MDEV-17520/sql/sql_parse.cc:4732
      #25 0x0000559794ca3d6e in mysql_parse (thd=0x7f833c000b00, rawbuf=0x7f833c0138f8 "REPLACE INTO t1 () VALUES ()", length=28, parser_state=0x7f83a8195650, is_com_multi=false, is_next_command=false) at /data/src/bb-10.4-MDEV-17520/sql/sql_parse.cc:8092
      #26 0x0000559794c9105c in dispatch_command (command=COM_QUERY, thd=0x7f833c000b00, packet=0x7f833c01bb21 "REPLACE INTO t1 () VALUES ()", packet_length=28, is_com_multi=false, is_next_command=false) at /data/src/bb-10.4-MDEV-17520/sql/sql_parse.cc:1851
      #27 0x0000559794c8fa80 in do_command (thd=0x7f833c000b00) at /data/src/bb-10.4-MDEV-17520/sql/sql_parse.cc:1396
      #28 0x0000559794dfb168 in do_handle_one_connection (connect=0x5597992717d0) at /data/src/bb-10.4-MDEV-17520/sql/sql_connect.cc:1402
      #29 0x0000559794dfaeec in handle_one_connection (arg=0x5597992717d0) at /data/src/bb-10.4-MDEV-17520/sql/sql_connect.cc:1308
      #30 0x00007f83aad7c494 in start_thread (arg=0x7f83a8196700) at pthread_create.c:333
      #31 0x00007f83a937d93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Not reproducible on current 10.4 bb9b4182e4.

      Attachments

        Activity

          People

            marko Marko Mäkelä
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.