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

Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index) || (!(ptr >= table->record[0] && ptr < table->record[0] + table->s->reclength)))' failed in Field_enum::val_int upon INSERT into table with indexed virtual column

    XMLWordPrintable

    Details

      Description

      Note: MDEV-17755 has been fixed by now.

      CREATE TABLE t1 ( 
        id INT NOT NULL AUTO_INCREMENT,
        f ENUM('a','b','c'),
        v ENUM('a','b','c') AS (f),
        KEY(v,id)
      ) ENGINE=MyISAM;
      INSERT INTO t1 (f) VALUES ('a'),('b');
      INSERT IGNORE INTO t1 SELECT * FROM t1;
       
      # Cleanup
      DROP TABLE t1;
      

      10.4 30da40bb8c

      mysqld: /data/src/10.4/sql/field.cc:9118: virtual longlong Field_enum::val_int(): Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index) || (!(ptr >= table->record[0] && ptr < table->record[0] + table->s->reclength)))' failed.
      190108 15:32:35 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f37f7c0eee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x000055fa5f90e33c in Field_enum::val_int (this=0x7f37e000aab0) at /data/src/10.4/sql/field.cc:9118
      #9  0x000055fa5f91bf77 in Field_enum::store_field (this=0x7f37e000aba8, from=0x7f37e000aab0) at /data/src/10.4/sql/field.h:4146
      #10 0x000055fa5f920816 in field_conv_incompatible (to=0x7f37e000aba8, from=0x7f37e000aab0) at /data/src/10.4/sql/field_conv.cc:851
      #11 0x000055fa5f920872 in field_conv (to=0x7f37e000aba8, from=0x7f37e000aab0) at /data/src/10.4/sql/field_conv.cc:864
      #12 0x000055fa5f9544e3 in save_field_in_field (from=0x7f37e000aab0, null_value=0x7f37e0123ff6, to=0x7f37e000aba8, no_conversions=false) at /data/src/10.4/sql/item.cc:6352
      #13 0x000055fa5f954724 in Item_field::save_in_field (this=0x7f37e0123f80, to=0x7f37e000aba8, no_conversions=false) at /data/src/10.4/sql/item.cc:6403
      #14 0x000055fa5f73c23c in TABLE::update_virtual_fields (this=0x7f37e0122ac0, h=0x7f37e01236f8, update_mode=VCOL_UPDATE_FOR_WRITE) at /data/src/10.4/sql/table.cc:7798
      #15 0x000055fa5f5913ce in fill_record (thd=0x7f37e0000b00, table_arg=0x7f37e0122ac0, fields=..., values=..., ignore_errors=false, update=false) at /data/src/10.4/sql/sql_base.cc:8431
      #16 0x000055fa5f59188a in fill_record_n_invoke_before_triggers (thd=0x7f37e0000b00, table=0x7f37e0122ac0, fields=..., values=..., ignore_errors=false, event=TRG_EVENT_INSERT) at /data/src/10.4/sql/sql_base.cc:8562
      #17 0x000055fa5f5d5b4f in mysql_insert (thd=0x7f37e0000b00, table_list=0x7f37e0015090, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR, ignore=false) at /data/src/10.4/sql/sql_insert.cc:960
      #18 0x000055fa5f61c639 in mysql_execute_command (thd=0x7f37e0000b00) at /data/src/10.4/sql/sql_parse.cc:4730
      #19 0x000055fa5f6272c4 in mysql_parse (thd=0x7f37e0000b00, rawbuf=0x7f37e0014f98 "INSERT INTO t1 (f) VALUES ('a'),('b')", length=37, parser_state=0x7f37f1da0600, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:8104
      #20 0x000055fa5f6144ee in dispatch_command (command=COM_QUERY, thd=0x7f37e0000b00, packet=0x7f37e000b421 "INSERT INTO t1 (f) VALUES ('a'),('b')", packet_length=37, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1851
      #21 0x000055fa5f612f12 in do_command (thd=0x7f37e0000b00) at /data/src/10.4/sql/sql_parse.cc:1396
      #22 0x000055fa5f77f140 in do_handle_one_connection (connect=0x55fa622bd320) at /data/src/10.4/sql/sql_connect.cc:1402
      #23 0x000055fa5f77eec4 in handle_one_connection (arg=0x55fa622bd320) at /data/src/10.4/sql/sql_connect.cc:1308
      #24 0x000055fa5fc3e308 in pfs_spawn_thread (arg=0x55fa621ce140) at /data/src/10.4/storage/perfschema/pfs.cc:1862
      #25 0x00007f37f96ca494 in start_thread (arg=0x7f37f1da1700) at pthread_create.c:333
      #26 0x00007f37f7ccb93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Not reproducible with InnoDB (the test case is not applicable due to the order of columns in the key).
      Not reproducible on 10.3.
      No visible effect on a non-debug build.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.