We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
a626b0562c
cf44157
make
./tidb-server -P 8000 -socket /tmp/mysql_0.sql -path $(pwd)/db_data
mysql -h 127.0.0.1 -P 8000 -u root --socket /tmp/mysql_0.sql
( WITH v0 AS ( SELECT TRUE ) ( SELECT 'abc' EXCEPT ( SELECT TRUE ) ) );
The TiDB should return the result of the query, or throw out semantic error for the query.
The TiDB server crashes with error:
mysql> ( WITH v0 AS ( SELECT TRUE ) ( SELECT 'abc' EXCEPT ( SELECT TRUE ) ) ); ERROR 1105 (HY000): interface conversion: ast.StmtNode is *ast.SetOprStmt, not *ast.SelectStmt
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | tidb_version() | +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Release Version: v7.1.1 Edition: Community Git Commit Hash: cf44157 Git Branch: HEAD UTC Build Time: 2023-08-06 19:14:34 GoVersion: go1.20 Race Enabled: false TiKV Min Version: 6.2.0-alpha Check Table Before Drop: false Store: unistore | +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.01 sec)
The bug seems to be a bug in the parser code.
The text was updated successfully, but these errors were encountered:
It is indeed a parser bug: in https://github.com/pingcap/tidb/blob/v7.3.0-alpha/parser/parser.y#L9933, it takes SelectStmtWithClause as a SelectStmt, but it can also be a SetOprStmt.
SelectStmtWithClause
SelectStmt
SetOprStmt
Sorry, something went wrong.
parser: fix panic in parsing CTE within a subquery (#45916)
a0cbff2
close #45838
djshow832
Successfully merging a pull request may close this issue.
Bug Report
1. Minimal reproduce step (Required)
a626b0562c
, also tested with released version: v7.1.1(cf44157
).make
in the repo root directory../tidb-server -P 8000 -socket /tmp/mysql_0.sql -path $(pwd)/db_data
2. What did you expect to see? (Required)
The TiDB should return the result of the query, or throw out semantic error for the query.
3. What did you see instead (Required)
The TiDB server crashes with error:
4. What is your TiDB version? (Required)
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version() |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v7.1.1
Edition: Community
Git Commit Hash: cf44157
Git Branch: HEAD
UTC Build Time: 2023-08-06 19:14:34
GoVersion: go1.20
Race Enabled: false
TiKV Min Version: 6.2.0-alpha
Check Table Before Drop: false
Store: unistore |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.01 sec)
4. Additional Information (Required)
The bug seems to be a bug in the parser code.
The text was updated successfully, but these errors were encountered: