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

HEX(*) fails with panic #6659

Closed
macneale4 opened this issue Sep 13, 2023 · 0 comments · Fixed by dolthub/go-mysql-server#2039
Closed

HEX(*) fails with panic #6659

macneale4 opened this issue Sep 13, 2023 · 0 comments · Fixed by dolthub/go-mysql-server#2039
Labels
bad error message bug Something isn't working panic

Comments

@macneale4
Copy link
Contributor

Dolt is panicing on a bad query where the case of HEX makes a difference.:

Dolt Behavior:

foo> create table t (b binary(2) primary key);
foo> select hex(*) from t;
a '*' is in a context where it is not allowed.
foo> select HEX(*) from t;
panic: star is just a placeholder node, but IsNullable was called [recovered]
        panic: star is just a placeholder node, but IsNullable was called

goroutine 1 [running]:
github.com/dolthub/go-mysql-server/sql/planbuilder.(*Builder).Parse.func1()
        /Users/neil/Documents/go-mysql-server/sql/planbuilder/parse.go:127 +0xa4
panic({0x1064f4ea0, 0x10695d860})
        /usr/local/go/src/runtime/panic.go:884 +0x1f4

MySQL Behavior:

mysql> create table t (b binary(2) primary key);
Query OK, 0 rows affected (0.01 sec)
mysql> select hex(*) from t;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '*) from t' at line 1
mysql> select HEX(*) from t;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '*) from t' at line 1
@timsehn timsehn added bad error message bug Something isn't working labels Sep 13, 2023
@macneale4 macneale4 changed the title hex(*) failes with panic HED(*) fails with panic Sep 13, 2023
@macneale4 macneale4 changed the title HED(*) fails with panic HEX(*) fails with panic Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bad error message bug Something isn't working panic
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants