- 
                Notifications
    You must be signed in to change notification settings 
- Fork 6k
Closed
Labels
affects-5.2This bug affects 5.2.x versions.This bug affects 5.2.x versions.component/parserseverity/majorsig/sql-infraSIG: SQL InfraSIG: SQL Infratype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Description
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
Labels
affects-5.2This bug affects 5.2.x versions.This bug affects 5.2.x versions.component/parserseverity/majorsig/sql-infraSIG: SQL InfraSIG: SQL Infratype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.