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

Assertion `scale <= precision' failed in decimal_bin_size

    XMLWordPrintable

Details

    • Q4/2026 Server Maintenance

    Description

      SELECT COLUMN_JSON(UNHEX('010300070004000d007d000f000d00dfe9ce2ba3bcf60303ff290d71cd4c14d50f0000e03d0f001309890e67f466037dc899337129e8'));
      
      

      Thread 1 (Thread 0x724f780636c0 (LWP 246735)):
       
      #9  0x00007a4f90e4527e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
      #10 0x00007a4f90e288ff in __GI_abort () at ./stdlib/abort.c:79
      #11 0x00007a4f90e2881b in __assert_fail_base (fmt=0x7a4f90fd1208 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x56aecf797b00 "scale <= precision", file=file@entry=0x56aecf7973a0 "/10.11/src/strings/decimal.c", line=line@entry=1564, function=function@entry=0x56aecf798100 <__PRETTY_FUNCTION__.6> "decimal_bin_size") at ./assert/assert.c:96
      #12 0x00007a4f90e3b517 in __assert_fail (assertion=assertion@entry=0x56aecf797b00 "scale <= precision", file=file@entry=0x56aecf7973a0 "/10.11/src/strings/decimal.c", line=line@entry=1564, function=function@entry=0x56aecf798100 <__PRETTY_FUNCTION__.6> "decimal_bin_size") at ./assert/assert.c:105
      #13 0x000056aece9e4072 in decimal_bin_size (precision=precision@entry=21250, scale=scale@entry=40483) at /10.11/src/strings/decimal.c:1564
      #14 0x000056aece93cb4c in dynamic_column_decimal_read (store_it_here=0x724f76d73930, data=0x724f76f6414f "\003\377)\rq\315L\024\325\017", length=15) at /10.11/src/mysys/ma_dyncol.c:1221
      #15 0x000056aece93cdf3 in dynamic_column_get_value (hdr=hdr@entry=0x724f76d73890, store_it_here=store_it_here@entry=0x724f76d73930) at /10.11/src/mysys/ma_dyncol.c:2260
      #16 0x000056aece940be7 in mariadb_dyncol_json_internal (str=str@entry=0x724f76d1d4c0, json=json@entry=0x724f76d1d480, lvl=lvl@entry=1) at /10.11/src/mysys/ma_dyncol.c:4221
      #17 0x000056aece941f8f in mariadb_dyncol_json (str=0x724f76d1d4c0, json=0x724f76d1d480) at /10.11/src/mysys/ma_dyncol.c:4288
      #18 0x000056aecd9545b5 in Item_func_dyncol_json::val_str (this=0x52d0000a1000, str=(String *) 0x724f76f640d0 _binary ...) at /10.11/src/sql/item_strfunc.cc:5102
      #19 0x000056aecd58559f in Type_handler::Item_send_str (this=<optimized out>, item=0x52d0000a1000, protocol=0x52c0001f0838, buf=<optimized out>) at /10.11/src/sql/sql_type.cc:7713
      #20 0x000056aecd36a0a9 in Type_handler_string_result::Item_send (this=<optimized out>, item=<optimized out>, protocol=<optimized out>, buf=<optimized out>) at /10.11/src/sql/sql_type.h:5553
      #21 0x000056aeccc60219 in Item::send (this=0x52d0000a1000, protocol=0x52c0001f0838, buffer=0x724f76f640a0) at /10.11/src/sql/item.h:1266
      #22 0x000056aeccd07a2c in Protocol::send_result_set_row (this=this@entry=0x52c0001f0838, row_items=row_items@entry=(List<Item> *) 0x52d0000a0870 1 Item's) at /10.11/src/sql/protocol.cc:1333
      #23 0x000056aecce82780 in select_send::send_data (this=0x52d0000a1ac8, items=...) at /10.11/src/sql/sql_class.cc:3234
      #24 0x000056aecd12c8fe in select_result_sink::send_data_with_check (this=<optimized out>, items=..., u=<optimized out>, sent=sent@entry=0) at /10.11/src/sql/sql_class.h:6082
      #25 0x000056aecd123913 in JOIN::exec_inner (this=this@entry=0x52d0000a1af8) at /10.11/src/sql/sql_select.cc:4890
      #26 0x000056aecd124cb1 in JOIN::exec (this=this@entry=0x52d0000a1af8) at /10.11/src/sql/sql_select.cc:4807
      #27 0x000056aecd120926 in mysql_select (thd=thd@entry=0x52c0001f0218, tables=<optimized out>, fields=..., conds=<optimized out>, og_num=<optimized out>, order=<optimized out>, group=<optimized out>, having=<optimized out>, proc_param=<optimized out>, select_options=<optimized out>, result=<optimized out>, unit=<optimized out>, select_lex=<optimized out>) at /10.11/src/sql/sql_select.cc:5285
      #28 0x000056aecd120fad in handle_select (thd=thd@entry=0x52c0001f0218, lex=lex@entry=0x52c0001f4610, result=result@entry=0x52d0000a1ac8, setup_tables_done_option=setup_tables_done_option@entry=0) at /10.11/src/sql/sql_select.cc:601
      #29 0x000056aeccf805cc in execute_sqlcom_select (thd=thd@entry=0x52c0001f0218, all_tables=<optimized out>) at /10.11/src/sql/sql_parse.cc:6452
      #30 0x000056aeccf9e7b6 in mysql_execute_command (thd=thd@entry=0x52c0001f0218, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /10.11/src/sql/sql_parse.cc:4032
      #31 0x000056aeccface66 in mysql_parse (thd=thd@entry=0x52c0001f0218, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x724f77224150) at /10.11/src/sql/sql_parse.cc:8210
      #32 0x000056aeccfb0d0b in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x52c0001f0218, packet=packet@entry=0x52900028a219 "", packet_length=packet_length@entry=137, blocking=blocking@entry=true) at /10.11/src/sql/sql_parse.cc:1924
      #33 0x000056aeccfb5783 in do_command (thd=thd@entry=0x52c0001f0218, blocking=blocking@entry=true) at /10.11/src/sql/sql_parse.cc:1434
      #34 0x000056aecd3b1bbc in do_handle_one_connection (connect=<optimized out>, connect@entry=0x508000018938, put_in_cache=put_in_cache@entry=true) at /10.11/src/sql/sql_connect.cc:1486
      #35 0x000056aecd3b2095 in handle_one_connection (arg=arg@entry=0x508000018938) at /10.11/src/sql/sql_connect.cc:1398
      #36 0x000056aecde1398f in pfs_spawn_thread (arg=arg@entry=0x517000008598) at /10.11/src/storage/perfschema/pfs.cc:2201
      #37 0x00007a4f91e5ea42 in asan_thread_start (arg=0x7a4f85c11000) at ../../../../src/libsanitizer/asan/asan_interceptors.cpp:234
      #38 0x00007a4f90e9cb84 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:447
      #39 0x00007a4f90f29ecc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      SELECT COLUMN_GET(UNHEX('010300070004000d007d000f000d00dfe9ce2ba3bcf60303ff290d71cd4c14d50f0000e03d0f001309890e67f466037dc899337129e8'), 7 AS CHAR);
      

      Reported by: Khalilov moe (3ntr0py1337) from leetprotect.com

      Attachments

        Activity

          People

            wlad Vladislav Vaintroub
            alice Alice Sherepa
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 0d
                0d
                Remaining:
                Time Spent - 0.25d Remaining Estimate - 0.75d
                0.75d
                Logged:
                Time Spent - 0.25d Remaining Estimate - 0.75d
                0.25d

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.