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

Assertion `decimals_to_set <= 38' failed in Item_func_round::fix_length_and_dec_decimal

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.3(EOL), 10.4(EOL)
    • 10.4.2, 10.3.13
    • Data types
    • None

    Description

      CREATE TABLE t1 (i INT(23));
      SELECT ROUND( i, 18446744073709551594 ) AS f FROM t1;
       
      # Cleanup
      DROP TABLE t1;
      

      10.3 faf206a8486

      mysqld: /data/src/10.3/sql/item_func.cc:2414: void Item_func_round::fix_length_and_dec_decimal(uint): Assertion `decimals_to_set <= 38' failed.
      190106 15:14:26 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f677bec8ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x0000555979bec10e in Item_func_round::fix_length_and_dec_decimal (this=0x7f6764014ff8, decimals_to_set=4294967274) at /data/src/10.3/sql/item_func.cc:2414
      #9  0x0000555979bec5c2 in Item_func_round::fix_arg_int (this=0x7f6764014ff8) at /data/src/10.3/sql/item_func.cc:2486
      #10 0x0000555979a58a9e in Type_handler_int_result::Item_func_round_fix_length_and_dec (this=0x55597b009840 <type_handler_long>, item=0x7f6764014ff8) at /data/src/10.3/sql/sql_type.cc:4203
      #11 0x0000555979bfd37e in Item_func_round::fix_length_and_dec (this=0x7f6764014ff8) at /data/src/10.3/sql/item_func.h:1447
      #12 0x0000555979be3fa9 in Item_func::fix_fields (this=0x7f6764014ff8, thd=0x7f6764000b00, ref=0x7f67640150d8) at /data/src/10.3/sql/item_func.cc:380
      #13 0x000055597977415e in Item::fix_fields_if_needed (this=0x7f6764014ff8, thd=0x7f6764000b00, ref=0x7f67640150d8) at /data/src/10.3/sql/item.h:824
      #14 0x000055597977418b in Item::fix_fields_if_needed_for_scalar (this=0x7f6764014ff8, thd=0x7f6764000b00, ref=0x7f67640150d8) at /data/src/10.3/sql/item.h:828
      #15 0x00005559797e85bc in setup_fields (thd=0x7f6764000b00, ref_pointer_array=..., fields=..., column_usage=MARK_COLUMNS_READ, sum_func_list=0x7f6764015b98, pre_fix=0x7f6764005260, allow_sum_func=true) at /data/src/10.3/sql/sql_base.cc:7420
      #16 0x00005559798af27b in JOIN::prepare (this=0x7f6764015878, tables_init=0x7f6764015120, wild_num=0, 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=0x7f6764005120, unit_arg=0x7f67640049b0) at /data/src/10.3/sql/sql_select.cc:1102
      #17 0x00005559798ba573 in mysql_select (thd=0x7f6764000b00, tables=0x7f6764015120, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f6764015850, unit=0x7f67640049b0, select_lex=0x7f6764005120) at /data/src/10.3/sql/sql_select.cc:4217
      #18 0x00005559798ac558 in handle_select (thd=0x7f6764000b00, lex=0x7f67640048e8, result=0x7f6764015850, setup_tables_done_option=0) at /data/src/10.3/sql/sql_select.cc:385
      #19 0x0000555979876f90 in execute_sqlcom_select (thd=0x7f6764000b00, all_tables=0x7f6764015120) at /data/src/10.3/sql/sql_parse.cc:6548
      #20 0x000055597986d601 in mysql_execute_command (thd=0x7f6764000b00) at /data/src/10.3/sql/sql_parse.cc:3769
      #21 0x000055597987af49 in mysql_parse (thd=0x7f6764000b00, rawbuf=0x7f6764014cd8 "SELECT ROUND( i, 18446744073709551594 ) AS f FROM t1", length=52, parser_state=0x7f677606f5f0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8092
      #22 0x00005559798680fd in dispatch_command (command=COM_QUERY, thd=0x7f6764000b00, packet=0x7f676400b1e1 "SELECT ROUND( i, 18446744073709551594 ) AS f FROM t1", packet_length=52, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1851
      #23 0x0000555979866b21 in do_command (thd=0x7f6764000b00) at /data/src/10.3/sql/sql_parse.cc:1396
      #24 0x00005559799ceb36 in do_handle_one_connection (connect=0x55597cbd0b30) at /data/src/10.3/sql/sql_connect.cc:1402
      #25 0x00005559799ce8ba in handle_one_connection (arg=0x55597cbd0b30) at /data/src/10.3/sql/sql_connect.cc:1308
      #26 0x0000555979e691e1 in pfs_spawn_thread (arg=0x55597cc1d750) at /data/src/10.3/storage/perfschema/pfs.cc:1862
      #27 0x00007f677d984494 in start_thread (arg=0x7f6776070700) at pthread_create.c:333
      #28 0x00007f677bf8593f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Not reproducible on 10.2.
      No visible effect 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.