-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
affects-6.5This bug affects the 6.5.x(LTS) versions.This bug affects the 6.5.x(LTS) versions.affects-7.1This bug affects the 7.1.x(LTS) versions.This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.This bug affects the 8.1.x(LTS) versions.impact/panicseverity/majorsig/plannerSIG: PlannerSIG: Plannertype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
CREATE TABLE `p` (
`groupid` bigint(20) DEFAULT NULL,
KEY `k1` (`groupid`)
);
CREATE TABLE `g` (
`groupid` bigint(20) DEFAULT NULL,
`parentid` bigint(20) NOT NULL,
KEY `k1` (`parentid`),
KEY `k2` (`groupid`,`parentid`)
);
set tidb_opt_enable_hash_join=off;
WITH RECURSIVE w(gid) AS (
SELECT
groupId
FROM
p
UNION
SELECT
g.groupId
FROM
g
JOIN w ON g.parentId = w.gid
)
SELECT
1
FROM
g
WHERE
g.groupId IN (
SELECT
gid
FROM
w
);
2. What did you expect to see? (Required)
no error
3. What did you see instead (Required)
ERROR 1105 (HY000): runtime error: invalid memory address or nil pointer dereference
4. What is your TiDB version? (Required)
Master
Metadata
Metadata
Assignees
Labels
affects-6.5This bug affects the 6.5.x(LTS) versions.This bug affects the 6.5.x(LTS) versions.affects-7.1This bug affects the 7.1.x(LTS) versions.This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.This bug affects the 8.1.x(LTS) versions.impact/panicseverity/majorsig/plannerSIG: PlannerSIG: Plannertype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.