While it is common to use MySQL's `JSON_UNQUOTE(JSON_EXTRACT())` combination, MariaDB additionally offers `JSON_VALUE` function to basically perform the same task. The problem is the results from the two methods differ when it comes to surrogate pairs, which are coincidentally what JSON uses to encode extended characters, e.g., emojis.
It seems the linked issue
MDEV-19760 addressed a similar problem in `JSON_VALID` — The fix did resolve a different issue that `JSON`-type fields rejects any surrogate pair because of the default `CHECK(JSON_VALID())` constraint.
Here are simple test cases:
And the result is attached. (Apparently JIRA does not support emojis.)