Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic on SELECT DISTINCT(1, 2); #785

Closed
mcuadros opened this issue Apr 8, 2019 · 3 comments · Fixed by src-d/go-mysql-server#672
Closed

panic on SELECT DISTINCT(1, 2); #785

mcuadros opened this issue Apr 8, 2019 · 3 comments · Fixed by src-d/go-mysql-server#672
Assignees
Labels
bug Something isn't working

Comments

@mcuadros
Copy link
Contributor

mcuadros commented Apr 8, 2019

ERRO[1415] mysql_server caught panic:
unable to convert tuple type to SQL
/home/mcuadros/workspace/go/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/type.go:690 (0x7cd7bb)
        com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql.tupleT.SQL: panic("unable to convert tuple type to SQL")
/home/mcuadros/workspace/go/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/server/handler.go:224 (0xc94c19)
        com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/server.rowToSQL: o[i] = s[i].Type.SQL(v)
/home/mcuadros/workspace/go/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/server/handler.go:137 (0xc941e8)
        com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/server.(*Handler).ComQuery: r.Rows = append(r.Rows, rowToSQL(schema, row))
/home/mcuadros/workspace/go/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-vitess.v1/mysql/conn.go:730 (0xb9f7f2)
        com/src-d/gitbase/vendor/gopkg.in/src-d/go-vitess.v1/mysql.(*Conn).handleNextCommand: err := handler.ComQuery(c, query, func(qr *sqltypes.Result) error {
/home/mcuadros/workspace/go/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-vitess.v1/mysql/server.go:430 (0xbb0d5f)
        com/src-d/gitbase/vendor/gopkg.in/src-d/go-vitess.v1/mysql.(*Listener).handle: err := c.handleNextCommand(l.handler)
/usr/lib/go/src/runtime/asm_amd64.s:1337 (0x45c1e0)
        goexit: BYTE    $0x90   // NOP

Using truck at ca3ad0d

@ajnavarro ajnavarro added the bug Something isn't working label Apr 8, 2019
@kuba-- kuba-- self-assigned this Apr 8, 2019
@juanjux juanjux self-assigned this Apr 9, 2019
@erizocosmico
Copy link
Contributor

Panic should not happen, but that's not a valid MySQL query.

@juanjux
Copy link
Contributor

juanjux commented Apr 9, 2019

Yes, should be SELECT DISTINCT 1, 2, as formulated is trying to do a DISTINCT on a tuple.

@mcuadros
Copy link
Contributor Author

mcuadros commented Apr 9, 2019

I know is not a valid query, but the server should never panic :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants