Increase maximum string literal length to 64K (bytes) while setting a lower limit (of characters) for multibyte charsets based on their max char. length (UTF-8 literals will be limited to 16383 characters) [CORE4881]#1944
1) If connection charset is UTF8 than is is possible to create literals that will use MORE than two bytes for encoding (in practice one may easy to create literals with 3 bpc; I could not create with 4 bytes, but this seems due to my poor windows)
So, value '32767' is wrong, it should be floor( 65535 / 4 ), isn't ?
2) from where 65533 rather than 65535 for second test ?