This repository was archived by the owner on Jan 28, 2021. It is now read-only.
This repository was archived by the owner on Jan 28, 2021. It is now read-only.
[Panic] - on HAVING query #764
Closed
Description
I came across the panic when testing https://github.com/src-d/sourced-ce
First I deleted all charts, after that I tried to create a new one based on blobs table.
It ran following query:
SELECT blob_content AS blob_content, COUNT(*) AS count, AVG(blob_size) AS `AVG(blob_size)`
FROM (
select * from blobs
) AS expr_qry
GROUP BY blob_content
HAVING ((AVG(blob_size) > 0))
ORDER BY count DESC
LIMIT 10000
and crashed with following error:
time="2019-06-21T14:35:19Z" level=error msg="mysql_server caught panic:\nunresolved column is a placeholder node, but Type was called\n/usr/local/go/src/runtime/panic.go:513 (0x42bdc8)\n/go/pkg/mod/github.com/src-d/[email protected]/sql/expression/unresolved.go:46 (0x9b8d48)\n/go/pkg/mod/github.com/src-d/[email protected]/sql/analyzer/convert_dates.go:161 (0xccab4e)\n/go/pkg/mod/github.com/src-d/[email protected]/sql/analyzer/convert_dates.go:52 (0xcdcc1d)\n/go/pkg/mod/github.com/src-d/[email protected]/sql/expression/unresolved.go:70 (0x9b8f7b)\n/go/pkg/mod/github.com/src-d/[email protected]/sql/expression/function/aggregation/avg.go:58 (0xc9c5c0)\n/go/pkg/mod/github.com/src-d/[email protected]/sql/analyzer/convert_dates.go:51 (0xcdd8f8)\n/go/pkg/mod/github.com/src-d/[email protected]/sql/plan/group_by.go:102 (0x9ce087)\n/go/pkg/mod/github.com/src-d/[email protected]/sql/plan/project.go:74 (0x9db310)\n/go/pkg/mod/github.com/src-d/[email protected]/sql/plan/having.go:54 (0x9d0b30)\n/go/pkg/mod/github.com/src-d/[email protected]/sql/plan/project.go:74 (0x9db310)\n/go/pkg/mod/github.com/src-d/[email protected]/sql/plan/sort.go:96 (0x9e4990)\n/go/pkg/mod/github.com/src-d/[email protected]/sql/plan/limit.go:45 (0x9d6be0)\n/go/pkg/mod/github.com/src-d/[email protected]/sql/analyzer/convert_dates.go:22 (0xcca9ca)\n/go/pkg/mod/github.com/src-d/[email protected]/sql/analyzer/batch.go:67 (0xcca737)\n/go/pkg/mod/github.com/src-d/[email protected]/sql/analyzer/batch.go:38 (0xcca3de)\n/go/pkg/mod/github.com/src-d/[email protected]/sql/analyzer/analyzer.go:171 (0xcc2aeb)\n/go/pkg/mod/github.com/src-d/[email protected]/engine.go:143 (0xd0338c)\n/go/pkg/mod/github.com/src-d/[email protected]/server/handler.go:90 (0xd05028)\n/go/pkg/mod/vitess.io/[email protected]+incompatible/go/mysql/conn.go:819 (0xc079a7)\n/go/pkg/mod/vitess.io/[email protected]+incompatible/go/mysql/conn.go:749 (0xc073b9)\n/go/pkg/mod/vitess.io/[email protected]+incompatible/go/mysql/server.go:441 (0xc173eb)\n/usr/local/go/src/runtime/asm_amd64.s:1333 (0x459690)\n"
Full log in attachment.