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

Assertion `(length % 4) == 0' failed in my_lengthsp_utf32

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.5, 10.6, 10.2(EOL), 10.3(EOL), 10.4(EOL), 10.7(EOL), 10.8(EOL), 10.9(EOL)
    • 10.5, 10.6
    • Character Sets, Data types
    • None

    Description

      All similar bugs seem to be closed at the moment, with fixes pushed at least into 10.2

      CREATE DATABASE db CHARSET utf32;
      USE db;
      CREATE TABLE t (a DATE, b TIMESTAMP(6), c INT, d INT, e INT, f CHAR(8), g ENUM('foo','bar'));
      --let $datadir= `select @@datadir`
      --write_file $datadir/db/load.data
      1960-02-17,1989-11-16 20:48:50.000000,1,100,1,foo
      1975-07-23,1976-05-20 01:59:19.000000,2,1,2,quxx
      1995-09-24,1973-04-03 00:00:00.000000,3,1,3,bar
      EOF
      LOAD DATA INFILE 'load.data' REPLACE INTO TABLE t FIELDS TERMINATED BY ',';
       
      # Cleanup
      --remove_file $datadir/db/load.data
      DROP DATABASE db;
      

      The test case can probably be further simplified significantly, but it's not easy without sufficient inner knowledge.

      10.2 2be617d8

      mysqld: /data/src/10.2/strings/ctype-ucs2.c:2231: my_lengthsp_utf32: Assertion `(length % 4) == 0' failed.
      220422 14:35:36 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f7280b5f662 in __GI___assert_fail (assertion=0x5616e1997f4f "(length % 4) == 0", file=0x5616e1997da0 "/data/src/10.2/strings/ctype-ucs2.c", line=2231, function=0x5616e1998730 <__PRETTY_FUNCTION__.14> "my_lengthsp_utf32") at assert.c:101
      #8  0x00005616e15503f5 in my_lengthsp_utf32 (cs=0x5616e1dcd4c0 <my_charset_utf32_general_ci>, ptr=0x7f726017f980 "3,bar\n", length=6) at /data/src/10.2/strings/ctype-ucs2.c:2231
      #9  0x00005616e0dbde0e in Field_enum::store (this=0x7f7260036410, from=0x7f726017f980 "3,bar\n", length=6, cs=0x5616e1dcd4c0 <my_charset_utf32_general_ci>) at /data/src/10.2/sql/field.cc:9057
      #10 0x00005616e0da2971 in Field::load_data_set_value (this=0x7f7260036410, pos=0x7f726017f980 "3,bar\n", length=6, cs=0x5616e1dcd4c0 <my_charset_utf32_general_ci>) at /data/src/10.2/sql/field.cc:1426
      #11 0x00005616e0d84c02 in Item_field::load_data_set_value (this=0x7f7260013628, thd=0x7f7260000d90, pos=0x7f726017f980 "3,bar\n", length=6, param=0x7f7276c897e0) at /data/src/10.2/sql/item.h:2725
      #12 0x00005616e0f6a9c5 in read_sep_field (thd=0x7f7260000d90, info=..., table_list=0x7f72600128a0, fields_vars=..., set_fields=..., set_values=..., read_info=..., enclosed=..., skip_lines=0, ignore_check_option_errors=false) at /data/src/10.2/sql/sql_load.cc:1129
      #13 0x00005616e0f6925c in mysql_load (thd=0x7f7260000d90, ex=0x7f7260012818, table_list=0x7f72600128a0, fields_vars=..., set_fields=..., set_values=..., handle_duplicates=DUP_REPLACE, ignore=false, read_file_from_client=false) at /data/src/10.2/sql/sql_load.cc:682
      #14 0x00005616e0b5bc49 in mysql_execute_command (thd=0x7f7260000d90) at /data/src/10.2/sql/sql_parse.cc:4628
      #15 0x00005616e0b65876 in mysql_parse (thd=0x7f7260000d90, rawbuf=0x7f7260012708 "LOAD DATA INFILE 'load.data' REPLACE INTO TABLE t FIELDS TERMINATED BY ','", length=74, parser_state=0x7f7276c8a5e0, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7793
      #16 0x00005616e0b53c19 in dispatch_command (command=COM_QUERY, thd=0x7f7260000d90, packet=0x7f7260008b61 "LOAD DATA INFILE 'load.data' REPLACE INTO TABLE t FIELDS TERMINATED BY ','", packet_length=74, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1827
      #17 0x00005616e0b52732 in do_command (thd=0x7f7260000d90) at /data/src/10.2/sql/sql_parse.cc:1381
      #18 0x00005616e0caa5bc in do_handle_one_connection (connect=0x5616e33a9630) at /data/src/10.2/sql/sql_connect.cc:1336
      #19 0x00005616e0caa330 in handle_one_connection (arg=0x5616e33a9630) at /data/src/10.2/sql/sql_connect.cc:1241
      #20 0x00005616e14b28d3 in pfs_spawn_thread (arg=0x5616e33953d0) at /data/src/10.2/storage/perfschema/pfs.cc:1869
      #21 0x00007f7281023ea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #22 0x00007f7280c28def in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.