-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
affects-8.5This bug affects the 8.5.x(LTS) versions.This bug affects the 8.5.x(LTS) versions.component/parserseverity/moderatesig/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)
DROP TABLE IF EXISTS t0;
DROP TABLE IF EXISTS t1;
CREATE TABLE t0(c0 INTEGER, c1 INTEGER);
INSERT IGNORE INTO t0 VALUES (1, 2);
INSERT IGNORE INTO t0 VALUES (4, 6);
SELECT MOD(3, 1 BETWEEN c0 AND c1) FROM t0;
2. What did you expect to see? (Required)
see the following case:
I observed that the TiDB documentation includes references to the MySQL manual:https://docs.pingcap.com/zh/tidb/stable/numeric-functions-and-operators
3. What did you see instead (Required)
// MySQL 8.4.1
mysql> SELECT MOD(3, 1 BETWEEN c0 AND c1) FROM t0;
+-----------------------------+
| MOD(3, 1 BETWEEN c0 AND c1) |
+-----------------------------+
| 0 |
| NULL |
+-----------------------------+
2 rows in set, 1 warning (0.01 sec)
// TiDB
mysql> SELECT MOD(3, 1 BETWEEN c0 AND c1) FROM t0;
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 23 near "BETWEEN c0 AND c1) FROM t0"
4. What is your TiDB version? (Required)
mysql> select version();
+--------------------+
| version() |
+--------------------+
| 8.0.11-TiDB-v8.5.0 |
+--------------------+
1 row in set (0.04 sec)
Metadata
Metadata
Assignees
Labels
affects-8.5This bug affects the 8.5.x(LTS) versions.This bug affects the 8.5.x(LTS) versions.component/parserseverity/moderatesig/sql-infraSIG: SQL InfraSIG: SQL Infratype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.