You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
set SQL_MODE='';
droptable if exists ADDDATE;
createtableADDDATE(a int);
droptable ADDDATE;
createtableADDDATE (a int);
-- Tidb is treating function ADDDATE as identifer only when a blank space is given in between ADDDATE (a int);--Similar functions :--SESSION_USER --SUBDATE--SYSTEM_USER
mysql> create table ADDDATE(a int);
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 line1 column 20 near "ADDDATE(a int)"
mysql>droptableADDDATE;
ERROR 1051 (42S02): Unknown table 'test.ADDDATE'
mysql> create table ADDDATE (a int);
Query OK, 0 rows affected (0.00 sec)
4. What is your TiDB version? (Required)
| Release Version: v5.4.0-alpha-264-g6efa36df6
Edition: Community
Git Commit Hash: 6efa36df6cff325106f67ecfe3d79816ba37ca6a
Git Branch: master
UTC Build Time: 2021-11-2916:57:51
GoVersion: go1.17.2
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false |
The text was updated successfully, but these errors were encountered:
This is weird: according to MySQL document (https://dev.mysql.com/doc/refman/8.0/en/function-resolution.html), ADDDATE should be treated as a function without whitespace between the name and (. It should act as other functions in the list, like COUNT.
However, COUNT obeys the rule but ADDDATE doesn't.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
The text was updated successfully, but these errors were encountered: