Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Duplicate
-
12.2.2
-
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 NULLIF with LEAST function containing TIME_FORMAT and DATABASE. The assertion `args[0] == args[2] || thd->stmt_arena->is_stmt_execute()` fails in `Item_func_nullif::fix_length_and_dec()`.
DROP DATABASE IF EXISTS sqlcraft; |
CREATE DATABASE sqlcraft; |
USE sqlcraft; |
CREATE TABLE IF NOT EXISTS t0(c0 CHAR(100) PRIMARY KEY) engine=Aria; |
|
|
|
|
SELECT 1 AS c0 FROM t0 AS tom0 GROUP BY tom0.c0 |
HAVING NULLIF( 'A' , LEAST( NULLIF( 'A' , 'A' ) , TIME_FORMAT( c0 , '%s' ) , DATABASE( ) ) ); |
crash logs:
|
|
|
mariadbd: /app/dbms/mariadb-12.2.2/sql/item_cmpfunc.cc:2756: virtual bool Item_func_nullif::fix_length_and_dec(THD*): Assertion `args[0] == args[2] || thd->stmt_arena->is_stmt_execute()' failed.
|
260420 9:54:23 [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 c0
|
FROM t0 AS tom0
|
GROUP BY tom0.c0
|
HAVING NULLIF( 'A' , LEAST( NULLIF( 'A' , 'A' ) , TIME_FORMAT( c0 , '%s' ) , DATABASE( ) ) )
|
Status: NOT_KILLED
|
Attachments
Issue Links
- duplicates
-
MDEV-19091 Assertion `args[0] == args[2] || thd->stmt_arena->is_stmt_execute()' failed in Item_func_nullif::fix_length_and_dec
-
- Confirmed
-