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

Assertion `precision || !scale' failed in my_decimal_precision_to_length_no_truncation(uint, uint8, bool)

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 5.5(EOL), 10.0(EOL), 10.1(EOL)
    • 5.5.49
    • OTHER
    • None
    • 10.0.25

    Description

      SELECT CASE 1 WHEN 2 THEN ( - '3' ) END;
      

      Stack trace from 5.5 commit ceba41c0951d1d8c9b4961772b4a088769814a66

      mysqld: /src/5.5/sql/my_decimal.h:226: uint32 my_decimal_precision_to_length_no_truncation(uint, uint8, bool): Assertion `precision || !scale' failed.
      160229 19:08:49 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fb8a8e691d2 in __assert_fail () from /lib64/libc.so.6
      #8  0x00000000006f330f in my_decimal_precision_to_length_no_truncation (precision=0, scale=31 '\037', unsigned_flag=false) at /src/5.5/sql/my_decimal.h:226
      #9  0x000000000080cc01 in Item_func_case::fix_length_and_dec (this=0x7fb8a45c6420) at /src/5.5/sql/item_cmpfunc.cc:3114
      #10 0x000000000082de68 in Item_func::fix_fields (this=0x7fb8a45c6420, thd=0x7fb8a75c35a0, ref=0x7fb8a45c6598) at /src/5.5/sql/item_func.cc:231
      #11 0x000000000080c70a in Item_func_case::fix_fields (this=0x7fb8a45c6420, thd=0x7fb8a75c35a0, ref=0x7fb8a45c6598) at /src/5.5/sql/item_cmpfunc.cc:3010
      #12 0x00000000005cf39c in setup_fields (thd=0x7fb8a75c35a0, ref_pointer_array=0x7fb8a45c6c00, fields=..., mark_used_columns=MARK_COLUMNS_READ, sum_func_list=0x7fb8a45c6a00, allow_sum_func=true) at /src/5.5/sql/sql_base.cc:8175
      #13 0x0000000000650c3d in JOIN::prepare (this=0x7fb8a45c66c0, rref_pointer_array=0x7fb8a75c7220, tables_init=0x0, 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=0x7fb8a75c6fb0, unit_arg=0x7fb8a75c68d0) at /src/5.5/sql/sql_select.cc:722
      #14 0x000000000065957f in mysql_select (thd=0x7fb8a75c35a0, rref_pointer_array=0x7fb8a75c7220, tables=0x0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fb8a45c66a0, unit=0x7fb8a75c68d0, select_lex=0x7fb8a75c6fb0) at /src/5.5/sql/sql_select.cc:3074
      #15 0x000000000064fed1 in handle_select (thd=0x7fb8a75c35a0, lex=0x7fb8a75c6820, result=0x7fb8a45c66a0, setup_tables_done_option=0) at /src/5.5/sql/sql_select.cc:319
      #16 0x0000000000629364 in execute_sqlcom_select (thd=0x7fb8a75c35a0, all_tables=0x0) at /src/5.5/sql/sql_parse.cc:4689
      #17 0x0000000000622697 in mysql_execute_command (thd=0x7fb8a75c35a0) at /src/5.5/sql/sql_parse.cc:2234
      #18 0x000000000062be44 in mysql_parse (thd=0x7fb8a75c35a0, rawbuf=0x7fb8a45c6078 "SELECT CASE 1 WHEN 2 THEN ( - '3' ) END", length=39, parser_state=0x7fb8aa8b9650) at /src/5.5/sql/sql_parse.cc:5914
      #19 0x000000000061fc36 in dispatch_command (command=COM_QUERY, thd=0x7fb8a75c35a0, packet=0x7fb8a4b4f5e1 "SELECT CASE 1 WHEN 2 THEN ( - '3' ) END", packet_length=39) at /src/5.5/sql/sql_parse.cc:1079
      #20 0x000000000061edc9 in do_command (thd=0x7fb8a75c35a0) at /src/5.5/sql/sql_parse.cc:793
      #21 0x000000000072185f in do_handle_one_connection (thd_arg=0x7fb8a75c35a0) at /src/5.5/sql/sql_connect.cc:1269
      #22 0x00000000007215ec in handle_one_connection (arg=0x7fb8a75c35a0) at /src/5.5/sql/sql_connect.cc:1185
      #23 0x0000000000c8b271 in pfs_spawn_thread (arg=0x7fb8a75f3140) at /src/5.5/storage/perfschema/pfs.cc:1015
      #24 0x00007fb8aa5310a4 in start_thread () from /lib64/libpthread.so.0
      #25 0x00007fb8a8f2004d in clone () from /lib64/libc.so.6
      

      Attachments

        Activity

          People

            bar Alexander Barkov
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.