Running a query that has a HAVING followed by an ORDER BY doesn't work.
Here's the query that I tried:
SELECT table_schema AS TABLE_CAT,
NULL AS TABLE_SCHEM,
table_name,
CASE
WHEN table_type = 'BASE TABLE' THEN
CASE
WHEN table_schema = 'mysql'
OR table_schema = 'performance_schema' THEN 'SYSTEM TABLE'
ELSE 'TABLE'
end
WHEN table_type = 'TEMPORARY' THEN 'LOCAL_TEMPORARY'
ELSE table_type
end AS TABLE_TYPE,
table_comment AS REMARKS,
NULL AS TYPE_CAT,
NULL AS TYPE_SCHEM,
NULL AS TYPE_NAME,
NULL AS SELF_REFERENCING_COL_NAME,
NULL AS REF_GENERATION
FROM information_schema.tables
WHERE table_schema = 'gitbase'
AND table_name = 'repositories'
HAVING table_type IN ( 'TABLE', 'VIEW', NULL, NULL, NULL )
ORDER BY table_type,
table_schema,
table_name;
This raises: ERROR 1105 (HY000): unknown error: unable to push plan.Sort node below *plan.Having.
The same query without the HAVING clause or without the ORDER BY clause works.
Version used:
v0.24.0-beta1
.Running a query that has a
HAVING
followed by anORDER BY
doesn't work. Here's the query that I tried:This raises:
ERROR 1105 (HY000): unknown error: unable to push plan.Sort node below *plan.Having
.The same query without the
HAVING
clause or without theORDER BY
clause works.