While in the process of upgrading our connector/J to version 5.1 we started seeing the following error:
ComplexByteArrayException: ByteArray objects cannot be converted to strings.
After doing a little homework we found that the root cause was in the way that CONCAT() processed numbers. CONCAT() was returning a binary string due to having both numbers and strings [...]