Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.1(EOL)
-
10.1.6-2, 10.1.7-1, 10.1.8-1, 10.1.8-2
Description
EXPLAIN FORMAT=JSON does not print HAVING.
Testcase (not necessarily minimal):
create table t0(a int);
|
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
create table t1(a int);
|
insert into t1 select A.a + B.a* 10 + C.a * 100 from t0 A, t0 B, t0 C;
|
create table t2 (
|
a int,
|
b int,
|
key (a)
|
);
|
insert into t2 select A.a*1000 + B.a, A.a*1000 + B.a from t0 A, t1 B;
|
Now, the test query:
explain format=json select a, max(b) as TOP from t2 group by a having TOP > a\G
|
*************************** 1. row ***************************
|
EXPLAIN: {
|
"query_block": {
|
"select_id": 1,
|
"table": {
|
"table_name": "t2",
|
"access_type": "index",
|
"key": "a",
|
"key_length": "5",
|
"used_key_parts": ["a"],
|
"rows": 10443,
|
"filtered": 100
|
}
|
}
|
}
|
HAVING is not printed. GROUP BY is not printed, either, but it's a topic of another issue.