I start mysql --column-type-info test and run this script:
It reports the following metadata:
Now I run the same script, with latin1 changed to utf8:
Metadata changes to:
Notice, it reports length as 3 and 9 for latin1 and utf8 session character sets respectively.
Looks wrong. It should not depent on the session character set.