mirromutth / r2dbc-mysql

R2DBC MySQL Implementation
Apache License 2.0
656 stars 98 forks source link

Illegal mix of collations #242

Open kozakp-pragmile opened 2 years ago

kozakp-pragmile commented 2 years ago

I am getting exception

ErrorMessage{errorCode=1267, sqlState='HY000', errorMessage='Illegal mix of collations (utf8mb4_bin,NONE) and (utf8mb4_general_ci,COERCIBLE) for operation '=''} when trying to perform a query with the folowing WHERE clause WHERE concat(column1, cast(column2 as char)) = 'some-string',

The query works when using WHERE column1 = 'some-string' or WHERE cast(column2 as char) = 'some-string'.

The query works in standard SQL client using JDBC.