Skip to content

TiDB v5.2.1 Parser Unexpected Error #28476

@CodingPoeta

Description

@CodingPoeta

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

mysql> SELECT COUNT(*) FROM plan_executions WHERE (EXISTS((SELECT * FROM triggers WHERE plan_executions.trigger_id=triggers.id AND triggers.type='CRON')));

2. What did you expect to see? (Required)

If I change the "(())" after 'EXISTS' into "()", there will be no error:

mysql> SELECT COUNT(*) FROM plan_executions WHERE (EXISTS(SELECT * FROM triggers WHERE plan_executions.trigger_id=triggers.id AND triggers.type='CRON'));
+----------+
| COUNT(*) |
+----------+
|        3 |
+----------+
1 row in set (0.00 sec)

3. What did you see instead (Required)

An error:
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 146 near "))"

4. What is your TiDB version? (Required)

V5.2.1 (In previous version of tidb--v5.1.1, It is OK to execute )

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions