Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
1.4.3
-
None
-
2020-7, 2021-5
Description
Testcase to reproduce:
drop table if exists `I1`; |
drop table if exists `C2`; |
|
|
|
CREATE TABLE `I1` (
|
`id` int(11) DEFAULT NULL, |
`intc` int(11) DEFAULT NULL |
|
) ENGINE=Columnstore DEFAULT CHARSET=utf8;
|
|
|
CREATE TABLE `C2` (
|
`intc` int(6) DEFAULT NULL, |
`id` int(11) NOT NULL, |
`mm_prezzo` decimal(12,0) DEFAULT NULL |
) ENGINE=Columnstore DEFAULT CHARSET=utf8;
|
|
|
INSERT INTO I1
|
select * from (SELECT id,intc
|
FROM C2
|
WHERE intc IN (201909) |
GROUP BY id,intc) as sel1;
|
Cause:
ERROR 1815 (HY000): Internal error: IDB-2021: 'intc' is not in GROUP BY clause. All non-aggregate columns in the SELECT and ORDER BY clause must be included in the GROUP BY clause. |
The select works without insert part,
It works ,without where condition "WHERE intc IN (201909)"
It works with opposite order in group by ("intc,id" instead "id,intc")
Attachments
Issue Links
- is caused by
-
MDEV-24298 SELECT_LEX::find_select_handler() fails to find MCS table running INSERT..SELECT with a single derived at top level in SELECT
- Closed
- split to
-
MCOL-4637 select * into file from (select ... group by) produces spurious error
- Closed