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

ER_TRUNCATED_WRONG_VALUE_FOR_FIELD or Assertion `0' failed in my_mbcharlen_utf16 after setting COLLATION_DATABASE

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 10.1, 10.2, 10.3, 10.4, 10.5
    • 10.4, 10.5
    • Character Sets
    • None

    Description

      Setting to Minor because COLLATION_DATABASE is not supposed to be set by a user.

      CREATE TABLE t1 (a VARCHAR(8));
      INSERT INTO t1 VALUES ('a');
      SET COLLATION_DATABASE= utf16_polish_ci;
      SELECT * INTO OUTFILE 'load.data' FROM t1;
      LOAD DATA INFILE 'load.data' INTO TABLE t1;
       
      # Cleanup
      DROP TABLE t1;
      --let $datadir= `SELECT @@datadir`
      --remove_file $datadir/test/load.data
      

      10.2 b0df247d

      query 'LOAD DATA INFILE 'load.data' INTO TABLE t1' failed: 1366: Incorrect string value: '\x61\x0A' for column `test`.`t1`.`a` at row 1
      

      Reproducible on 10.1-10.5 non-debug and 10.2-10.5 debug.

      10.1 debug build aborts with the assertion failure:

      10.1 f73db933

      mysqld: /data/src/10.1/strings/ctype-ucs2.c:1438: my_mbcharlen_utf16: Assertion `0' failed.
      200714 22:09:43 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fa3893b2f12 in __GI___assert_fail (assertion=0x55d6bedb22a4 "0", file=0x55d6bedb2280 "/data/src/10.1/strings/ctype-ucs2.c", line=1438, function=0x55d6bedb2920 <__PRETTY_FUNCTION__.11457> "my_mbcharlen_utf16") at assert.c:101
      #8  0x000055d6bea0ad00 in my_mbcharlen_utf16 (cs=0x55d6bf36fd40 <my_charset_utf16_polish_uca_ci>, c=97) at /data/src/10.1/strings/ctype-ucs2.c:1438
      #9  0x000055d6be49a695 in READ_INFO::read_field (this=0x7fa38afdd820) at /data/src/10.1/sql/sql_load.cc:1727
      #10 0x000055d6be498a1b in read_sep_field (thd=0x7fa3823ce070, info=..., table_list=0x7fa3805c11f0, fields_vars=..., set_fields=..., set_values=..., read_info=..., enclosed=..., skip_lines=0, ignore_check_option_errors=false) at /data/src/10.1/sql/sql_load.cc:1050
      #11 0x000055d6be497405 in mysql_load (thd=0x7fa3823ce070, ex=0x7fa3805c1168, table_list=0x7fa3805c11f0, fields_vars=..., set_fields=..., set_values=..., handle_duplicates=DUP_ERROR, ignore=false, read_file_from_client=false) at /data/src/10.1/sql/sql_load.cc:591
      #12 0x000055d6be0f8451 in mysql_execute_command (thd=0x7fa3823ce070) at /data/src/10.1/sql/sql_parse.cc:4057
      #13 0x000055d6be101da6 in mysql_parse (thd=0x7fa3823ce070, rawbuf=0x7fa3805c1088 "LOAD DATA INFILE 'load.data' INTO TABLE t1", length=42, parser_state=0x7fa38afde5f0) at /data/src/10.1/sql/sql_parse.cc:7200
      #14 0x000055d6be0f0f7d in dispatch_command (command=COM_QUERY, thd=0x7fa3823ce070, packet=0x7fa3843ee071 "LOAD DATA INFILE 'load.data' INTO TABLE t1", packet_length=42) at /data/src/10.1/sql/sql_parse.cc:1491
      #15 0x000055d6be0efe62 in do_command (thd=0x7fa3823ce070) at /data/src/10.1/sql/sql_parse.cc:1123
      #16 0x000055d6be22dd01 in do_handle_one_connection (thd_arg=0x7fa3823ce070) at /data/src/10.1/sql/sql_connect.cc:1331
      #17 0x000055d6be22da32 in handle_one_connection (arg=0x7fa3823ce070) at /data/src/10.1/sql/sql_connect.cc:1242
      #18 0x000055d6be64be9a in pfs_spawn_thread (arg=0x7fa388839c70) at /data/src/10.1/storage/perfschema/pfs.cc:1868
      #19 0x00007fa38ac614a4 in start_thread (arg=0x7fa38afdf700) at pthread_create.c:456
      #20 0x00007fa38946fd0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      The assertion failure is only reproducible on 10.1.

      Attachments

        Activity

          People

            Unassigned Unassigned
            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.