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

MariaDB debug build assertion `maybe_null() || !null_value' failed in Item_func_ceiling::time_op

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 12.2.2
    • N/A
    • Optimizer
    • None
    • ubuntu 22.04
    • Not for Release Notes

    Description

      MariaDB debug build (12.2.2-MariaDB-asan-debug) crashes with an assertion failure when using CEIL function on UTC_TIME result. The assertion `maybe_null() || !null_value` fails in `Item_func_ceiling::time_op()`.

      DROP DATABASE IF EXISTS sqlcraft;
      CREATE DATABASE sqlcraft;
      USE sqlcraft;
      CREATE TABLE t0(c0 REAL UNSIGNED  NOT NULL, PRIMARY KEY(c0));
       
       
      SELECT 1 AS c25 
      FROM( SELECT UTC_TIME( ) AS c24 FROM t0 WHERE TIMEDIFF( 'A' , 'A' )  ORDER BY c24  LIMIT 42 ) AS tom24 
      WHERE CEIL( tom24.c24 );
      

      crash logs:
       
      mariadbd: /app/dbms/mariadb-12.2.2/sql/item_func.cc:2444: virtual bool Item_func_ceiling::time_op(THD*, MYSQL_TIME*): Assertion `maybe_null() || !null_value' failed.
      260420  9:53:13 [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 1 AS c25 FROM
        ( SELECT UTC_TIME( ) AS c24 FROM t0 WHERE TIMEDIFF( 'A' , 'A' )  ORDER BY c24  LIMIT 42 ) AS tom24
         WHERE CEIL( tom24.c24 )
      Status: NOT_KILLED
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ammmkilo ammmkilo
              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.