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 executing EXISTS subquery containing NATURAL JOIN with UNION. The assertion `cache != __null` fails in `sub_select_cache()`.
DROP DATABASE IF EXISTS sqlcraft; |
CREATE DATABASE sqlcraft; |
USE sqlcraft; |
CREATE OR REPLACE TABLE t0(c0 VARCHAR(100) UNIQUE NOT NULL) engine=InnoDB; |
|
|
|
|
INSERT INTO t0 VALUES ('a%V-'); |
INSERT INTO t0 VALUES ('7~|l*/ |
'); |
|
|
SELECT 1 FROM t0 AS tom0 GROUP BY tom0.c0 |
HAVING EXISTS ( |
SELECT 1 AS c8 |
FROM ( t0 AS tom5 NATURAL JOIN ( SELECT 1 FROM t0 AS tom6 ) AS tom7 ) |
UNION SELECT 1 AS c10 FROM ( SELECT LAST_INSERT_ID( 1 ) AS c9 ) AS tom10 ) LIMIT 42; |
crash logs:
|
|
|
mariadbd: /app/dbms/mariadb-12.2.2/sql/sql_select.cc:24315: enum_nested_loop_state sub_select_cache(JOIN*, JOIN_TAB*, bool): Assertion `cache != __null' failed.
|
260420 9:55:12 [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
|
FROM t0 AS tom0
|
GROUP BY tom0.c0
|
HAVING
|
EXISTS (
|
|
SELECT 1 AS c8
|
|
|
FROM ( t0 AS tom5 NATURAL JOIN ( SELECT 1 FROM t0 AS tom6 ) AS tom7 )
|
|
|
UNION SELECT 1 AS c10
|
FROM
|
|
( SELECT LAST_INSERT_ID( 1 ) AS c9
|
|
) AS tom10
|
|
|
|
) LIMIT 42
|
Status: NOT_KILLED
|
Attachments
Issue Links
- duplicates
-
MDEV-32290 Server crashes at sub_select_cache(JOIN*, st_join_table*, bool)
-
- In Review
-