In MariaDB, JSON_MERGE_PRESERVE() is a built-in function that merges two or more JSON documents and returns the result.
JSON_MERGE_PRESERVE() is a synonym for JSON_MERGE(), which has been deprecated. To avoid future issues, you should use the JSON_MERGE_PATCH() function instead. The JSON_MERGE_PATCH() function is an RFC 7396-compliant replacement for JSON_MERGE().