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

Assertion `decimals == 0' failed Item_func_mod::fix_length_and_dec_int

Details

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

    Description

      SELECT MOD(CASE 0 WHEN 1 THEN 0x30 END, 1);
      

      10.6 fa74c1a40ff75ab8041103b81ec3fc44ef286de1

      mariadbd: /data/bld/10.6-asan/sql/item_func.h:1804: void Item_func_mod::fix_length_and_dec_int(): Assertion `decimals == 0' failed.
      250123 21:37:14 [ERROR] /share8t/bld/10.6-asan/sql/mariadbd got signal 6 ;
       
      #9  0x00007fdc65253eb2 in __GI___assert_fail (assertion=0x5555902cb380 "decimals == 0", file=0x5555902cade0 "/data/bld/10.6-asan/sql/item_func.h", line=1804, function=0x5555902cb3c0 "void Item_func_mod::fix_length_and_dec_int()") at ./assert/assert.c:101
      #10 0x000055558e493613 in Item_func_mod::fix_length_and_dec_int (this=0x62d00005afc8) at /data/bld/10.6-asan/sql/item_func.h:1804
      #11 0x000055558e46c58e in Type_handler_int_result::Item_func_mod_fix_length_and_dec (this=0x5555924e8100 <type_handler_slonglong>, item=0x62d00005afc8) at /data/bld/10.6-asan/sql/sql_type.cc:7126
      #12 0x000055558e81fd11 in Item_func_mod::fix_length_and_dec (this=0x62d00005afc8) at /data/bld/10.6-asan/sql/item_func.cc:1702
      #13 0x000055558e811801 in Item_func::fix_fields (this=0x62d00005afc8, thd=0x62b00007e218, ref=0x62d00005b088) at /data/bld/10.6-asan/sql/item_func.cc:378
      #14 0x000055558db70c69 in Item::fix_fields_if_needed (this=0x62d00005afc8, thd=0x62b00007e218, ref=0x62d00005b088) at /data/bld/10.6-asan/sql/item.h:1173
      #15 0x000055558db70c9f in Item::fix_fields_if_needed_for_scalar (this=0x62d00005afc8, thd=0x62b00007e218, ref=0x62d00005b088) at /data/bld/10.6-asan/sql/item.h:1182
      #16 0x000055558dc9eb2d in setup_fields (thd=0x62b00007e218, ref_pointer_array=..., fields=..., column_usage=MARK_COLUMNS_READ, sum_func_list=0x62d00005bd80, pre_fix=0x62d00005a980, allow_sum_func=true, where=THD_WHERE::DEFAULT_WHERE) at /data/bld/10.6-asan/sql/sql_base.cc:7777
      #17 0x000055558dee3c7a in JOIN::prepare (this=0x62d00005ba18, 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=0x62d00005a6a8, unit_arg=0x62b0000825f8) at /data/bld/10.6-asan/sql/sql_select.cc:1512
      #18 0x000055558df0b54e in mysql_select (thd=0x62b00007e218, tables=0x0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x62d00005b9e8, unit=0x62b0000825f8, select_lex=0x62d00005a6a8) at /data/bld/10.6-asan/sql/sql_select.cc:5172
      #19 0x000055558deda1c2 in handle_select (thd=0x62b00007e218, lex=0x62b000082530, result=0x62d00005b9e8, setup_tables_done_option=0) at /data/bld/10.6-asan/sql/sql_select.cc:573
      #20 0x000055558de3ae4a in execute_sqlcom_select (thd=0x62b00007e218, all_tables=0x0) at /data/bld/10.6-asan/sql/sql_parse.cc:6421
      #21 0x000055558de28fa3 in mysql_execute_command (thd=0x62b00007e218, is_called_from_prepared_stmt=false) at /data/bld/10.6-asan/sql/sql_parse.cc:4013
      #22 0x000055558de45c6c in mysql_parse (thd=0x62b00007e218, rawbuf=0x62d00005a5e0 "SELECT MOD(CASE 0 WHEN 1 THEN 0x30 END, 1)", length=42, parser_state=0x7fdc5bce9a90) at /data/bld/10.6-asan/sql/sql_parse.cc:8208
      #23 0x000055558de1b02f in dispatch_command (command=COM_QUERY, thd=0x62b00007e218, packet=0x62900024e219 "SELECT MOD(CASE 0 WHEN 1 THEN 0x30 END, 1)", packet_length=42, blocking=true) at /data/bld/10.6-asan/sql/sql_parse.cc:1908
      #24 0x000055558de17d63 in do_command (thd=0x62b00007e218, blocking=true) at /data/bld/10.6-asan/sql/sql_parse.cc:1421
      #25 0x000055558e29a5d5 in do_handle_one_connection (connect=0x6080000030b8, put_in_cache=true) at /data/bld/10.6-asan/sql/sql_connect.cc:1386
      #26 0x000055558e29a134 in handle_one_connection (arg=0x608000003038) at /data/bld/10.6-asan/sql/sql_connect.cc:1298
      #27 0x000055558ef132c8 in pfs_spawn_thread (arg=0x617000005b98) at /data/bld/10.6-asan/storage/perfschema/pfs.cc:2201
      #28 0x00007fdc652a81c4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #29 0x00007fdc6532885c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      This is an old bug, goes at least as far back as 10.4 and early releases of 10.5.

      No obvious immediate problem on a non-debug build.

      Attachments

        Activity

          There are no comments yet on this issue.

          People

            sanja Oleksandr Byelkin
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.