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

Server crash or assertion `table->insert_values' failure in write_record upon LOAD DATA

Details

    Description

      CREATE TABLE t1 (a INT, b INT, c INT, vc INT AS (c), UNIQUE(a), UNIQUE(b)) WITH SYSTEM VERSIONING;
      INSERT IGNORE INTO t1 (a,b,c) VALUES (1,2,3);
       
      SELECT a, b, c FROM t1 INTO OUTFILE 't1.data';
      LOAD DATA INFILE 't1.data' IGNORE INTO TABLE t1 (a,b,c);
      LOAD DATA INFILE 't1.data' REPLACE INTO TABLE t1 (a,b,c);
       
      # Cleanup
      DROP TABLE t1;
      

      Couldn't reproduce without versioning, on some reason.

      10.3 990289a78f debug

      mysqld: /data/src/10.3/sql/sql_insert.cc:1970: int write_record(THD*, TABLE*, COPY_INFO*): Assertion `table->insert_values' failed.
      180216 16:21:34 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f2aa1e14ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x00005597dd7eea3f in write_record (thd=0x7f2a8c000b00, table=0x7f2a8c0fe730, info=0x7f2a9c081ef0) at /data/src/10.3/sql/sql_insert.cc:1970
      #9  0x00005597ddcc8d14 in read_sep_field (thd=0x7f2a8c000b00, info=..., table_list=0x7f2a8c014e00, fields_vars=..., set_fields=..., set_values=..., read_info=..., enclosed=..., skip_lines=0, ignore_check_option_errors=false) at /data/src/10.3/sql/sql_load.cc:1241
      #10 0x00005597ddcc6ee2 in mysql_load (thd=0x7f2a8c000b00, ex=0x7f2a8c014d78, table_list=0x7f2a8c014e00, fields_vars=..., set_fields=..., set_values=..., handle_duplicates=DUP_REPLACE, ignore=false, read_file_from_client=false) at /data/src/10.3/sql/sql_load.cc:653
      #11 0x00005597dd823949 in mysql_execute_command (thd=0x7f2a8c000b00) at /data/src/10.3/sql/sql_parse.cc:5104
      #12 0x00005597dd82c812 in mysql_parse (thd=0x7f2a8c000b00, rawbuf=0x7f2a8c014c88 "LOAD DATA INFILE 't1.data' REPLACE INTO TABLE t1 (a,b,c)", length=56, parser_state=0x7f2a9c0835e0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7980
      #13 0x00005597dd819fc5 in dispatch_command (command=COM_QUERY, thd=0x7f2a8c000b00, packet=0x7f2a8c00b191 "LOAD DATA INFILE 't1.data' REPLACE INTO TABLE t1 (a,b,c)", packet_length=56, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1825
      #14 0x00005597dd818a04 in do_command (thd=0x7f2a8c000b00) at /data/src/10.3/sql/sql_parse.cc:1370
      #15 0x00005597dd9815e5 in do_handle_one_connection (connect=0x5597e16f0560) at /data/src/10.3/sql/sql_connect.cc:1402
      #16 0x00005597dd981372 in handle_one_connection (arg=0x5597e16f0560) at /data/src/10.3/sql/sql_connect.cc:1308
      #17 0x00005597dde20d6f in pfs_spawn_thread (arg=0x5597e1753bb0) at /data/src/10.3/storage/perfschema/pfs.cc:1862
      #18 0x00007f2aa3aeb494 in start_thread (arg=0x7f2a9c084700) at pthread_create.c:333
      #19 0x00007f2aa1ed193f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      10.3 990289a78f non-debug

      #2  <signal handler called>
      #3  0x00007eff91290c98 in __memmove_avx_unaligned_erms () from /lib/x86_64-linux-gnu/libc.so.6
      #4  0x000055856a6f6964 in memcpy (__len=<optimized out>, __src=<optimized out>, __dest=<optimized out>) at /usr/include/x86_64-linux-gnu/bits/string3.h:53
      #5  write_record (thd=thd@entry=0x7eff700009a8, table=table@entry=0x7eff70081c78, info=info@entry=0x7eff8c3a8970) at /data/src/10.3/sql/sql_insert.cc:1971
      #6  0x000055856aa2034f in read_sep_field (ignore_check_option_errors=false, skip_lines=0, enclosed=..., read_info=..., set_values=..., set_fields=..., fields_vars=..., table_list=0x7eff70011728, info=..., thd=0x7eff700009a8) at /data/src/10.3/sql/sql_load.cc:1241
      #7  mysql_load (thd=<optimized out>, ex=<optimized out>, table_list=0x7eff70011728, fields_vars=..., set_fields=..., set_values=..., handle_duplicates=DUP_REPLACE, ignore=<optimized out>, read_file_from_client=false) at /data/src/10.3/sql/sql_load.cc:653
      #8  0x000055856a71ee54 in mysql_execute_command (thd=0x7eff700009a8) at /data/src/10.3/sql/sql_parse.cc:5104
      #9  0x000055856a72258a in mysql_parse (thd=0x7eff700009a8, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.3/sql/sql_parse.cc:7980
      #10 0x000055856a725dca in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7eff700009a8, packet=packet@entry=0x7eff70009249 "LOAD DATA INFILE 't1.data' REPLACE INTO TABLE t1 (a,b,c)", packet_length=packet_length@entry=56, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.3/sql/sql_parse.cc:1825
      #11 0x000055856a7263bd in do_command (thd=0x7eff700009a8) at /data/src/10.3/sql/sql_parse.cc:1370
      #12 0x000055856a7f7fb4 in do_handle_one_connection (connect=connect@entry=0x55856cdefb98) at /data/src/10.3/sql/sql_connect.cc:1402
      #13 0x000055856a7f8154 in handle_one_connection (arg=arg@entry=0x55856cdefb98) at /data/src/10.3/sql/sql_connect.cc:1308
      #14 0x000055856aaeeb54 in pfs_spawn_thread (arg=0x55856ce61908) at /data/src/10.3/storage/perfschema/pfs.cc:1862
      #15 0x00007eff92e6a494 in start_thread (arg=0x7eff8c3ab700) at pthread_create.c:333
      #16 0x00007eff9125093f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Reproducible with at least MyISAM and InnoDB

      Attachments

        Issue Links

          Activity

            There are some open bugs (linked to this issue) with similar pieces of stack traces, but these pieces are quite generic, so they might or might not be related.

            elenst Elena Stepanova added a comment - There are some open bugs (linked to this issue) with similar pieces of stack traces, but these pieces are quite generic, so they might or might not be related.

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.