-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Closed
Labels
component/expressioncomponent/jsonseverity/moderatesig/executionSIG executionSIG executiontype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Description
Bug Report
Seems there's an incompatible issue related to JSON functions
- What did you do?
select json_extract("\"asd\"","$") in ("asd","abcd");
- What did you expect to see?
in MySQL:5.7
mysql> select json_extract("\"asd\"","$") in ("asd","abcd");
+----------------------------------------------+
| json_extract("\"asd\"","$") in ("asd","abc") |
+----------------------------------------------+
| 0 |
+----------------------------------------------+
1 row in set, 1 warning (0.00 sec)
in MySQL:8
mysql> select json_extract("\"asd\"","$") in ("asd","abcd");
+-----------------------------------------------+
| json_extract("\"asd\"","$") in ("asd","abcd") |
+-----------------------------------------------+
| 1 |
+-----------------------------------------------+
1 row in set (0.00 sec)
- What did you see instead?
MySQL [(none)]> select json_extract("\"asd\"","$") in ("asd","abcd");
ERROR 3140 (22032): Invalid JSON text: The document root must not be followed by other values.
MySQL [(none)]>
- What version of TiDB are you using (
tidb-server -Vor runselect tidb_version();on TiDB)?
Release Version: v4.0.0-alpha-940-g92e774913
Git Commit Hash: 92e774913a2f6166b104d3d8eaed5513733f1830
Git Branch: master
UTC Build Time: 2019-11-24 03:10:38
GoVersion: go version go1.13.1 linux/amd64
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
component/expressioncomponent/jsonseverity/moderatesig/executionSIG executionSIG executiontype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.