Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.9(EOL), 10.10(EOL), 10.11, 11.0(EOL), 11.1(EOL), 11.2(EOL)
-
None
Description
This script correctly rejects an invalid value being inserted into a JSON column:
CREATE OR REPLACE TABLE t1 (a JSON); |
INSERT INTO t1 VALUES ('Foobar'); |
ERROR 4025 (23000): CONSTRAINT `t1.a` failed for `test`.`t1` |
Assigning the same invalid value to a JSON SP variable works without errors:
DELIMITER $$
|
CREATE OR REPLACE PROCEDURE p1() |
BEGIN
|
DECLARE v1 JSON; |
SET v1 = 'Foobar'; |
SELECT v1; |
END; |
$$
|
DELIMITER ;
|
CALL p1();
|
+--------+
|
| v1 |
|
+--------+
|
| Foobar |
|
+--------+
|
The assignment should probably fail as well.