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

Assertion `args[0]->decimals == 0' failed in Item_func_round::fix_arg_hex_hybrid

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.5, 10.6, 10.11, 11.4, 11.7(EOL)
    • 10.5, 10.6, 10.11, 11.4
    • Data types
    • None

    Description

      SELECT TRUNCATE(CASE NULL WHEN 1 THEN 0x7F0D END, 2);
      

      10.5 7eded23be6597b4c485e8cad1538f2ae14541f91

      mariadbd: /data/bld/10.5-asan/sql/item_func.cc:2628: void Item_func_round::fix_arg_hex_hybrid(): Assertion `args[0]->decimals == 0' failed.
      250129 19:21:57 [ERROR] /share8t/bld/10.5-asan/sql/mariadbd got signal 6 ;
       
      #9  0x00007ff59ca53eb2 in __GI___assert_fail (assertion=0x560e278088a0 "args[0]->decimals == 0", file=0x560e278059a0 "/data/bld/10.5-asan/sql/item_func.cc", line=2628, function=0x560e278089c0 "void Item_func_round::fix_arg_hex_hybrid()") at ./assert/assert.c:101
      #10 0x0000560e25a97327 in Item_func_round::fix_arg_hex_hybrid (this=0x62b000038e60) at /data/bld/10.5-asan/sql/item_func.cc:2628
      #11 0x0000560e256e7168 in Type_handler_hex_hybrid::Item_func_round_fix_length_and_dec (this=0x560e29803f20 <type_handler_hex_hybrid>, item=0x62b000038e60) at /data/bld/10.5-asan/sql/sql_type.cc:6420
      #12 0x0000560e25acd76f in Item_func_round::fix_length_and_dec (this=0x62b000038e60) at /data/bld/10.5-asan/sql/item_func.h:2022
      #13 0x0000560e25a7c661 in Item_func::fix_fields (this=0x62b000038e60, thd=0x62b000069218, ref=0x62b000038f48) at /data/bld/10.5-asan/sql/item_func.cc:389
      #14 0x0000560e24e1f44d in Item::fix_fields_if_needed (this=0x62b000038e60, thd=0x62b000069218, ref=0x62b000038f48) at /data/bld/10.5-asan/sql/item.h:1005
      #15 0x0000560e24e1f483 in Item::fix_fields_if_needed_for_scalar (this=0x62b000038e60, thd=0x62b000069218, ref=0x62b000038f48) at /data/bld/10.5-asan/sql/item.h:1009
      #16 0x0000560e24f4d656 in setup_fields (thd=0x62b000069218, ref_pointer_array=..., fields=..., column_usage=MARK_COLUMNS_READ, sum_func_list=0x62b000039c60, pre_fix=0x62b000038638, allow_sum_func=true) at /data/bld/10.5-asan/sql/sql_base.cc:7691
      #17 0x0000560e2518979b in JOIN::prepare (this=0x62b000039928, tables_init=0x0, conds_init=0x0, og_num=0, order_init=0x0, skip_order_by=false, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x62b0000384b8, unit_arg=0x62b00006d3d0) at /data/bld/10.5-asan/sql/sql_select.cc:1375
      #18 0x0000560e251afb72 in mysql_select (thd=0x62b000069218, tables=0x0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x62b0000398f8, unit=0x62b00006d3d0, select_lex=0x62b0000384b8) at /data/bld/10.5-asan/sql/sql_select.cc:4897
      #19 0x0000560e2517fe96 in handle_select (thd=0x62b000069218, lex=0x62b00006d308, result=0x62b0000398f8, setup_tables_done_option=0) at /data/bld/10.5-asan/sql/sql_select.cc:449
      #20 0x0000560e250e5a92 in execute_sqlcom_select (thd=0x62b000069218, all_tables=0x0) at /data/bld/10.5-asan/sql/sql_parse.cc:6452
      #21 0x0000560e250d3f29 in mysql_execute_command (thd=0x62b000069218) at /data/bld/10.5-asan/sql/sql_parse.cc:4043
      #22 0x0000560e250f08a1 in mysql_parse (thd=0x62b000069218, rawbuf=0x62b0000383e0 "SELECT TRUNCATE(CASE NULL WHEN 1 THEN 0x7F0D END, 2)", length=52, parser_state=0x7ff593576c70, is_com_multi=false, is_next_command=false) at /data/bld/10.5-asan/sql/sql_parse.cc:8252
      #23 0x0000560e250c5a63 in dispatch_command (command=COM_QUERY, thd=0x62b000069218, packet=0x629000235219 "SELECT TRUNCATE(CASE NULL WHEN 1 THEN 0x7F0D END, 2)", packet_length=52, is_com_multi=false, is_next_command=false) at /data/bld/10.5-asan/sql/sql_parse.cc:1891
      #24 0x0000560e250c23f6 in do_command (thd=0x62b000069218) at /data/bld/10.5-asan/sql/sql_parse.cc:1375
      #25 0x0000560e2551f593 in do_handle_one_connection (connect=0x608000002f38, put_in_cache=true) at /data/bld/10.5-asan/sql/sql_connect.cc:1386
      #26 0x0000560e2551f0f9 in handle_one_connection (arg=0x608000002eb8) at /data/bld/10.5-asan/sql/sql_connect.cc:1298
      #27 0x0000560e2617ef7c in pfs_spawn_thread (arg=0x615000006c18) at /data/bld/10.5-asan/storage/perfschema/pfs.cc:2201
      #28 0x00007ff59caa81c4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #29 0x00007ff59cb2885c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      No obvious problem on a non-debug build.

      Attachments

        Issue Links

          Activity

            There are no comments yet on this issue.

            People

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