-
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.
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.
create table t1 (a timestamp as (json_extract(k,'$.a')), b datetime as (json_extract(k, '$.a')) stored, k json);
insert into t1 set k='{\"a\":\"2018-09-28 12:59:51\"}';
select * from t1;
-
What did you expect to see?
Get the data. -
What did you see instead?
mysql> select * from t1;
+---+---------------------+------------------------------+
| a | b | k |
+---+---------------------+------------------------------+
| NULL | 2018-09-28 12:59:51 | {"a": "2018-09-28 12:59:51"} |
+---+---------------------+------------------------------+
1 row in set, 1 warning (0.00 sec)
mysql> show warnings;
+---------+------+---------------------------------------------------+
| Level | Code | Message |
+---------+------+---------------------------------------------------+
| Warning | 1105 | cannot convert datum from json to type timestamp. |
+---------+------+---------------------------------------------------+
1 row in set (0.00 sec)
- What version of TiDB are you using (
tidb-server -Vor runselect tidb_version();on TiDB)?
master
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.