You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Warning 1265 Data truncated for column 'tm' at row 1
542
+
Warning 1265 Data truncated for column 'dt' at row 1
543
+
Warning 1366 Incorrect integer value: 'asdf' for column ``.`(temporary)`.`i` at row 1
544
+
Warning 1366 Incorrect double value: 'asdf' for column ``.`(temporary)`.`f` at row 1
545
+
Warning 1366 Incorrect decimal value: 'asdf' for column ``.`(temporary)`.`d` at row 1
529
546
SELECT * FROM
530
547
JSON_TABLE('{}', '$' COLUMNS (x INT PATH '$.x' DEFAULT NULL ON EMPTY)) jt;
531
548
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'NULL ON EMPTY)) jt' at line 2
@@ -739,6 +756,8 @@ FROM JSON_TABLE('{"a":"1993-01-01"}',
739
756
AS jt;
740
757
jp
741
758
0000-00-00
759
+
Warnings:
760
+
Warning 1265 Data truncated for column 'jp' at row 1
742
761
#
743
762
# Bug#25532429: INVALID JSON ERROR NOT THROWN WITH EMPTY TABLES JOIN
744
763
#
@@ -763,6 +782,8 @@ JSON_TABLE('["3.14159"]',
763
782
) AS alias2;
764
783
col18
765
784
3.1415
785
+
Warnings:
786
+
Warning 1265 Data truncated for column 'col18' at row 1
766
787
#Truncated space doesn't trigger ON ERROR
767
788
SELECT * FROM
768
789
JSON_TABLE('["3.14159 "]',
@@ -805,12 +826,17 @@ JSON_TABLE('[3.14159]',
805
826
'$[*]' COLUMNS (col18 DECIMAL(3,3) PATH '$')
806
827
) AS alias2;
807
828
col18
808
-
NULL
829
+
0.999
830
+
Warnings:
831
+
Warning 1264 Out of range value for column 'col18' at row 1
809
832
SELECT * FROM
810
833
JSON_TABLE('[3.14159]',
811
834
'$[*]' COLUMNS (col18 DECIMAL(3,3) PATH '$' ERROR ON ERROR)
812
835
) AS alias2;
813
-
ERROR HY000: Can't store an array or an object in the scalar column 'col18' of JSON_TABLE 'alias2'.
836
+
col18
837
+
0.999
838
+
Warnings:
839
+
Warning 1264 Out of range value for column 'col18' at row 1
814
840
SELECT * FROM
815
841
JSON_TABLE('[0.9]',
816
842
'$[*]' COLUMNS (col18 DECIMAL(3,3) PATH '$')
@@ -825,6 +851,9 @@ DEFAULT "3.14159" ON ERROR)
825
851
col18
826
852
0.000
827
853
0.000
854
+
Warnings:
855
+
Warning 1366 Incorrect decimal value: 'asdf' for column ``.`(temporary)`.`col18` at row 1
856
+
Warning 1366 Incorrect decimal value: 'ghjk' for column ``.`(temporary)`.`col18` at row 2
828
857
CREATE TABLE t1(jd JSON);
829
858
INSERT INTO t1 VALUES('["asdf"]'),('["ghjk"]');
830
859
SELECT * FROM t1,
@@ -835,6 +864,9 @@ DEFAULT "3.14159" ON ERROR)
835
864
jd col18
836
865
["asdf"] 0.000
837
866
["ghjk"] 0.000
867
+
Warnings:
868
+
Warning 1366 Incorrect decimal value: 'asdf' for column ``.`(temporary)`.`col18` at row 1
869
+
Warning 1366 Incorrect decimal value: 'ghjk' for column ``.`(temporary)`.`col18` at row 1
838
870
DROP TABLE t1;
839
871
#
840
872
# Bug#25540027: SIG 11 IN FIND_FIELD_IN_TABLE | SQL/SQL_BASE.CC
@@ -1316,13 +1348,17 @@ id
1316
1348
SELECT id FROM JSON_TABLE('[{"id":"9223372036854775808"}]', '$[*]' COLUMNS
1317
1349
(id BIGINT PATH '$.id')) AS json;
1318
1350
id
1319
-
NULL
1351
+
9223372036854775807
1352
+
Warnings:
1353
+
Warning 1264 Out of range value for column 'id' at row 1
1320
1354
# Here the JSON value is a NUMERIC value, and we thus know if the value
1321
1355
# is signed or unsigned.
1322
1356
SELECT id FROM JSON_TABLE('[{"id":9223372036854775808}]', '$[*]' COLUMNS
1323
1357
(id BIGINT PATH '$.id')) AS json;
1324
1358
id
1325
-
NULL
1359
+
9223372036854775807
1360
+
Warnings:
1361
+
Warning 1264 Out of range value for column 'id' at row 1
1326
1362
# If we tell the JSON table column to be unsigned, we get to store the
1327
1363
# full value correctly.
1328
1364
SELECT id FROM JSON_TABLE('[{"id":"9223372036854775808"}]', '$[*]' COLUMNS
@@ -1524,11 +1560,15 @@ b VARCHAR(3) PATH '$.b' DEFAULT '"ERR"' ON ERROR,
1524
1560
c DATE PATH '$.c' DEFAULT '"2001-01-01"' ON ERROR,
1525
1561
d DECIMAL PATH '$.c' DEFAULT '999' ON ERROR)
1526
1562
) AS jt;
1563
+
Warnings:
1564
+
Warning 1265 Data truncated for column 'b' at row 2
1565
+
Warning 1264 Out of range value for column 'a' at row 3
1566
+
Warning 1265 Data truncated for column 'd' at row 4
0 commit comments