I try to use User Defined Function lib_mysqludf_json from https://github.com/mysqludf/lib_mysqludf_json with MariaDB 10.1.18 and found an incorrect behavior of UDF_ARGS attribute_lengths.
When you use SELECT json_object("citizen_id") FROM ...
you will have:
When you use SELECT json_object(citizen_id AS citizen_id) FROM ...
That's also correct.
But when you use SELECT json_object(citizen_id) FROM ...
That's incorrect. Correct value of attribute_lengths is 10.
That's not reproducable on MySQL. This is not lib_mysqludf_json incorrect behavior, it just uses standart struct UDF_ARGS.