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 while parsing SHOW TABLES #39

Open
paulheg opened this issue Oct 28, 2024 · 0 comments
Open

panic while parsing SHOW TABLES #39

paulheg opened this issue Oct 28, 2024 · 0 comments

Comments

@paulheg
Copy link

paulheg commented Oct 28, 2024

Hi,

in the following a minimal example that panics the parser:

package main

import (
	"log"

	"github.com/blastrain/vitess-sqlparser/sqlparser"
)

func main() {

	s, err := sqlparser.Parse("SHOW TABLES;")
	if err != nil {
		log.Fatal(err)
	}

	log.Print(s)
}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x48 pc=0x55381e]

goroutine 1 [running]:
github.com/blastrain/vitess-sqlparser/sqlparser.convertTiDBStmtToVitessShow({0xc000014320?, 0x5ab73d?, 0xc0000901e0?}, 0x0?)
        /home/paul/go/pkg/mod/github.com/blastrain/vitess-sqlparser@v0.0.0-20201030050434-a139afbb1aba/sqlparser/type_converter.go:92 +0x5e
github.com/blastrain/vitess-sqlparser/sqlparser.Parse({0x5ab73d, 0xc})
        /home/paul/go/pkg/mod/github.com/blastrain/vitess-sqlparser@v0.0.0-20201030050434-a139afbb1aba/sqlparser/ast.go:63 +0x265
[...]
exit status 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant