JSON Schema Validation Functions ERROR 3819 (HY000): Check constraint ’geo_chk_1’ is violated. mysql>  SHOW WARNINGS\G *************************** 1. row *************************** Level: Error Code: 3934 Message: The JSON document location ’#/latitude’ failed requirement ’maximum’ at JSON Schema location ’#/properties/latitude’. *************************** 2. row *************************** Level: Error Code: 3819 Message: Check constraint ’geo_chk_1’ is violated. 2 rows in set (0.00 sec) mysql>  INSERT INTO geo VALUES(@point3); ERROR 3819 (HY000): Check constraint ’geo_chk_1’ is violated. mysql>  SHOW WARNINGS\G *************************** 1. row *************************** Level: Error Code: 3934 Message: The JSON document location ’#’ failed requirement ’required’ at JSON Schema location ’#’. *************************** 2. row *************************** Level: Error Code: 3819 Message: Check constraint ’geo_chk_1’ is violated. 2 rows in set (0.00 sec) mysql>  SELECT JSON_SCHEMA_VALID(’{"type":"string","pattern":"("}’, ’"abc"’); +---------------------------------------------------------------+ | JSON_SCHEMA_VALID(’{"type":"string","pattern":"("}’, ’"abc"’) | +---------------------------------------------------------------+ | 1 | +---------------------------------------------------------------+ 1 row in set (0.04 sec) Validates a JSON  document  against a JSON  schema . Both  schema  and  document  are required. As with JSON_VALID_SCHEMA(), the schema must be a valid JSON object, and the document must be a valid JSON document. Provided that these conditions are met, the function returns a report, as a JSON document, on the outcome of the validation. If the JSON document is considered valid according to the JSON Schema, the function returns a JSON object with one property  valid  having the value "true". If the JSON document fails validation, the function returns a JSON object which includes the properties listed here: JSON Schema has support for specifying regular expression patterns for strings, but the implementation used by MySQL silently ignores invalid patterns. This means that  JSON_SCHEMA_VALID()  can return true even when a regular expression pattern is invalid, as shown here: See Section 13.1.20.6, “CHECK Constraints” , for more information. The third coordinate value defined above is also invalid, since it is missing the required  latitude property. As before, you can see this by attempting to insert the value into the  geo  table, then issuing SHOW WARNINGS  afterwards: In MySQL 8.0.19 and later, you can obtain precise information about the nature of the failure—in this case, that the  latitude  value exceeds the maximum defined in the schema—by issuing a  SHOW WARNINGS  statement: • JSON_SCHEMA_VALIDATION_REPORT( schema , document ) • valid : Always "false" for a failed schema validation 2384