Hello,
I'm using MySQL.
A jOOQ query that used to work until recently suddenly started giving an error message
Illegal mix of collations (latin1_swedish_ci,IMPLICIT), (utf8mb4_0900_ai_ci,COERCIBLE) for operation '='
The query is pretty trivial:
Mytable.MY_FIELD.eq("some string value")
Mytable has CHARSET=latin1. Column my_field is a varchar(2).
I already tried to force the collation on the field,
Mytable.MY_FIELD.collate("utf8mb4_0900_ai_ci").eq("some string value")
but it gives an error:
COLLATION 'utf8mb4_0900_ai_ci' is not valid for CHARACTER SET 'latin1'
To my knowledge the only change was an upgrade of the server to MySQL 8.0.
What is the way out? Is it possible, for example, to force the collation on the constant string itself? In SQL,
`column`="value" collate latin1_general_ci
is valid.
Regards,
Fabrizio