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

MariaDB debug build assertion `arg2_int >= 0' failed in Item_func_additive_op::result_precision

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Critical
    • Resolution: Unresolved
    • 10.6, 10.11, 11.4, 11.8, 12.3, 12.2.2
    • 10.11, 11.4, 11.8, 12.3
    • Data types
    • None
    • ubuntu 22.04

    Description

      MariaDB debug build (12.2.2-MariaDB-asan-debug) crashes with an assertion failure when performing subtraction with SUM of COALESCE on binary literal. The assertion `arg2_int >= 0` fails in `Item_func_additive_op::result_precision()`.

      DROP DATABASE IF EXISTS sqlcraft;
      CREATE DATABASE sqlcraft;
      USE sqlcraft;
       
      SELECT ( 3.14159 ) - ( ( SUM( COALESCE( b'101010' ) ) ) / ( 42 ) ) AS c4 ;
      

      crash logs:
       
      mariadbd: /app/dbms/mariadb-12.2.2/sql/item_func.cc:1287: virtual void Item_func_additive_op::result_precision(): Assertion `arg2_int >= 0' failed.
      260420  9:55:34 [ERROR] /usr/local/mariadb-asan/bin/mariadbd got signal 6 ;
      Sorry, we probably made a mistake, and this is a bug.
       
      Your assistance in bug reporting will enable us to fix this for the next release.
      To report this bug, see https://mariadb.com/kb/en/reporting-bugs about how to report
      a bug on https://jira.mariadb.org/.
       
      Server version: 12.2.2-MariaDB-asan-debug source revision: d26a6f44c1f2119377e79a9540886c6d8c01472f
       
      Query (0x52d00024e438): SELECT ( 3.14159 ) - ( ( SUM( COALESCE( b'101010' ) ) ) / ( 42 ) ) AS c4
      Status: NOT_KILLED
      

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              ammmkilo ammmkilo
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.