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

Assertion `!item->null_value' failed in Type_handler_inet6::make_sort_key_part (#2)

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.5
    • 10.5.7
    • Data types
    • None

    Description

      Note: Bugfix for MDEV-22758 has already been released, and the test case from it passes.

      CREATE TABLE t1 (c INET6);
      INSERT INTO t1 VALUES ('::'),(NULL);
      SELECT * FROM t1 ORDER BY IFNULL(c, 'foo');
       
      # Cleanup
      DROP TABLE t1;
      

      10.5 baa60b59

      mariadbd: /data/src/10.5/plugin/type_inet/sql_type_inet.cc:1395: virtual void Type_handler_inet6::make_sort_key_part(uchar*, Item*, const SORT_FIELD_ATTR*, Sort_param*) const: Assertion `!item->null_value' failed.
      200630 13:55:09 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fa4efaddf12 in __GI___assert_fail (assertion=0x560b95e874ab "!item->null_value", file=0x560b95e870f0 "/data/src/10.5/plugin/type_inet/sql_type_inet.cc", line=1395, function=0x560b95e87920 <Type_handler_inet6::make_sort_key_part(unsigned char*, Item*, SORT_FIELD_ATTR const*, Sort_param*) const::__PRETTY_FUNCTION__> "virtual void Type_handler_inet6::make_sort_key_part(uchar*, Item*, const SORT_FIELD_ATTR*, Sort_param*) const") at assert.c:101
      #8  0x0000560b9582de06 in Type_handler_inet6::make_sort_key_part (this=0x560b96f71570 <type_handler_inet6>, to=0x7fa4d806630c '\245' <repeats 200 times>..., item=0x7fa4d80150c0, sort_field=0x7fa4d80179d0, param=0x7fa4ea678080) at /data/src/10.5/plugin/type_inet/sql_type_inet.cc:1395
      #9  0x0000560b94e6174f in make_sortkey (param=0x7fa4ea678080, to=0x7fa4d806630c '\245' <repeats 200 times>...) at /data/src/10.5/sql/filesort.cc:2990
      #10 0x0000560b94e5d15f in make_sortkey (param=0x7fa4ea678080, to=0x7fa4d806630c '\245' <repeats 200 times>..., ref_pos=0x7fa4d800a718 "", using_packed_sortkeys=false) at /data/src/10.5/sql/filesort.cc:1330
      #11 0x0000560b94e5be77 in find_all_keys (thd=0x7fa4d8000b18, param=0x7fa4ea678080, select=0x7fa4d8017080, fs_info=0x7fa4d8065fa0, buffpek_pointers=0x7fa4ea6782a0, tempfile=0x7fa4ea678130, pq=0x0, found_rows=0x7fa4d8066190) at /data/src/10.5/sql/filesort.cc:949
      #12 0x0000560b94e59e54 in filesort (thd=0x7fa4d8000b18, table=0x7fa4d8009768, filesort=0x7fa4d8017250, tracker=0x7fa4d8017940, join=0x7fa4d8015340, first_table_bit=1) at /data/src/10.5/sql/filesort.cc:356
      #13 0x0000560b94b99256 in create_sort_index (thd=0x7fa4d8000b18, join=0x7fa4d8015340, tab=0x7fa4d8016740, fsort=0x7fa4d8017250) at /data/src/10.5/sql/sql_select.cc:23837
      #14 0x0000560b94b93430 in st_join_table::sort_table (this=0x7fa4d8016740) at /data/src/10.5/sql/sql_select.cc:21587
      #15 0x0000560b94b9300b in join_init_read_record (tab=0x7fa4d8016740) at /data/src/10.5/sql/sql_select.cc:21526
      #16 0x0000560b94b90da3 in sub_select (join=0x7fa4d8015340, join_tab=0x7fa4d8016740, end_of_records=false) at /data/src/10.5/sql/sql_select.cc:20600
      #17 0x0000560b94b90264 in do_select (join=0x7fa4d8015340, procedure=0x0) at /data/src/10.5/sql/sql_select.cc:20137
      #18 0x0000560b94b63f59 in JOIN::exec_inner (this=0x7fa4d8015340) at /data/src/10.5/sql/sql_select.cc:4447
      #19 0x0000560b94b63085 in JOIN::exec (this=0x7fa4d8015340) at /data/src/10.5/sql/sql_select.cc:4228
      #20 0x0000560b94b647b6 in mysql_select (thd=0x7fa4d8000b18, tables=0x7fa4d8013f88, fields=..., conds=0x0, og_num=1, order=0x7fa4d80151a8, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fa4d8015318, unit=0x7fa4d8004b30, select_lex=0x7fa4d8013990) at /data/src/10.5/sql/sql_select.cc:4652
      #21 0x0000560b94b5447e in handle_select (thd=0x7fa4d8000b18, lex=0x7fa4d8004a68, result=0x7fa4d8015318, setup_tables_done_option=0) at /data/src/10.5/sql/sql_select.cc:429
      #22 0x0000560b94b19ada in execute_sqlcom_select (thd=0x7fa4d8000b18, all_tables=0x7fa4d8013f88) at /data/src/10.5/sql/sql_parse.cc:6211
      #23 0x0000560b94b10dd7 in mysql_execute_command (thd=0x7fa4d8000b18) at /data/src/10.5/sql/sql_parse.cc:3939
      #24 0x0000560b94b1e927 in mysql_parse (thd=0x7fa4d8000b18, rawbuf=0x7fa4d80138d0 "SELECT * FROM t1 ORDER BY IFNULL(c, 'foo')", length=42, parser_state=0x7fa4ea679520, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:7995
      #25 0x0000560b94b0ac75 in dispatch_command (command=COM_QUERY, thd=0x7fa4d8000b18, packet=0x7fa4d81b05e9 "", packet_length=42, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:1875
      #26 0x0000560b94b093ad in do_command (thd=0x7fa4d8000b18) at /data/src/10.5/sql/sql_parse.cc:1356
      #27 0x0000560b94cae563 in do_handle_one_connection (connect=0x560b977cb1f8, put_in_cache=true) at /data/src/10.5/sql/sql_connect.cc:1411
      #28 0x0000560b94cae2cb in handle_one_connection (arg=0x560b977be248) at /data/src/10.5/sql/sql_connect.cc:1313
      #29 0x0000560b951eb5b6 in pfs_spawn_thread (arg=0x560b976a6a18) at /data/src/10.5/storage/perfschema/pfs.cc:2201
      #30 0x00007fa4f1a664a4 in start_thread (arg=0x7fa4ea67a700) at pthread_create.c:456
      #31 0x00007fa4efb9ad0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      No obvious problem on a non-debug build.

      Attachments

        Activity

          People

            bar Alexander Barkov
            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.