-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Closed
Labels
component/expressioncomponent/jsontype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.type/compatibility
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
- What did you do?
If possible, provide a recipe for reproducing the error.
➜ ~ tidiff 'select cast("2018-01-02 01:01:01.111111" as json)'
MySQL(127.0.0.1:3306)> select cast("2018-01-02 01:01:01.111111" as json)
Error 3141: Invalid JSON text in argument 1 to function cast_as_json: "The document root must not be followed by other values." at position 4.
TiDB(127.0.0.1:4000)> select cast("2018-01-02 01:01:01.111111" as json)
+--------------------------------------------+
| cast("2018-01-02 01:01:01.111111" as json) |
+--------------------------------------------+
| 2018 |
+--------------------------------------------+
1 row in set (0.003 sec)
- What did you expect to see?
The error should be produced.
- What did you see instead?
Returns an unexpected result.
- What version of TiDB are you using (
tidb-server -Vor runselect tidb_version();on TiDB)?
TiDB(127.0.0.1:4000)> select tidb_version()
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version() |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v2.1.8-24-g7b36cdfb6-dirty
Git Commit Hash: 7b36cdfb6e8a4c279fc360ed79cf1c499b553688
Git Branch: failpoint-2.1
UTC Build Time: 2019-04-30 08:26:17
GoVersion: go version go1.12 darwin/amd64
Race Enabled: false
TiKV Min Version: 2.1.0-alpha.1-ff3dd160846b7d1aed9079c389fc188f7f5ea13e
Check Table Before Drop: false |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.003 sec)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
component/expressioncomponent/jsontype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.type/compatibility