Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Duplicate
-
10.2.21
-
None
-
Ubuntu 16.04 x64
Description
We have found a serious problem with JSON_VALUE which apparently was partially fixed in 10.2.16. Specifically we're extracting a Date from JSON and if that extraction is in a function it does not work.
ERROR: Truncated incorrect datetime value: '2018-07-26T00:00:00+03:00'
If the extraction is done from the query (ie no function that does it) then it works fine.
Please see the following example:
SET NAMES 'utf8'; |
|
USE import; |
|
DELIMITER $$
|
|
CREATE DEFINER = 'jsupport'@'10.8.0.%' |
FUNCTION J_SON () |
RETURNS date |
BEGIN
|
|
RETURN (SELECT |
date (JSON_VALUE('{"b":"2018-07-26T00:00:00+03:00"}', '$.b'))); |
|
END
|
$$
|
|
DELIMITER ;
|
-- WORKING -> SELECT date (JSON_VALUE('{"b":"2018-07-26T00:00:00+03:00"}', '$.b'));
|
-- BROKEN -> SELECT J_SON(); |
Attachments
Issue Links
- duplicates
-
MDEV-11829 Please add support for datetime with time zone literals (ISO 8601)
- Open