Problem was that Field_newdate() didn't allocate a string big enough for the result.
Problem was that str->alloc(length) needed a buffer of length+1 as decimals2string() will add an end null.
This patch adds support for right aligned strings and numbers. Left alignment is left as an exercise for anyone needing it. MDEV-25612 "Assertion `to <= end' failed in process_args" fixed. (Was caused by the original version of this patch)