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

Assertion `scale <= precision' failed in decimal_bin_size

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.5.4, 10.2(EOL), 10.3(EOL), 10.4(EOL)
    • 10.5
    • None
    • None

    Description

      --source include/have_innodb.inc
       
      CREATE TABLE t1 (pk int) ENGINE=InnoDB;
      SELECT 1 FROM t1 GROUP BY  ROUND((CONVERT('1978-04-10', DECIMAL(61,36))),pk);
      

      10.2 00572a0b0cc81c38f19

      /10.2/strings/decimal.c:1467: decimal_bin_size: Assertion `scale <= precision' failed.
       
      assert/assert.c:92(__assert_fail_base)[0x7f3acaaaabd7]
      /lib/x86_64-linux-gnu/libc.so.6(+0x2dc82)[0x7f3acaaaac82]
      /10.2/sql/mysqld(decimal_bin_size+0xf3)[0x55653a0d06d1]
      strings/decimal.c:1468(decimal_bin_size)[0x556538b81341]
      sql/my_decimal.h:264(my_decimal_get_binary_size(unsigned int, unsigned int))[0x556538b66015]
      sql/sql_select.cc:22989(calc_group_buffer(JOIN*, st_order*))[0x556538ad9ff3]
      sql/sql_select.cc:1972(JOIN::optimize_inner())[0x556538ad1953]
      sql/sql_select.cc:1115(JOIN::optimize())[0x556538aeae33]
      sql/sql_select.cc:3804(mysql_select(THD*, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x556538aca7e5]
      sql/sql_select.cc:376(handle_select(THD*, LEX*, select_result*, unsigned long))[0x556538a52155]
      sql/sql_parse.cc:6477(execute_sqlcom_select(THD*, TABLE_LIST*))[0x556538a3f61b]
      sql/sql_parse.cc:3535(mysql_execute_command(THD*))[0x556538a5a8b9]
      sql/sql_parse.cc:8011(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x556538a35f6e]
      sql/sql_parse.cc:1834(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x556538a330ed]
      sql/sql_parse.cc:1386(do_command(THD*))[0x556538d5ad62]
      sql/sql_connect.cc:1335(do_handle_one_connection(CONNECT*))[0x556538d5a76a]
      sql/sql_connect.cc:1242(handle_one_connection)[0x556539f0bfda]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7f3acb6ef6ba]
      x86_64/clone.S:111(clone)[0x7f3acab8441d]
      

      Attachments

        Issue Links

          Activity

            People

              holyfoot Alexey Botchkov
              alice Alice Sherepa
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.