I'm not sure if this is a MySql/MariaDB error or a HeidiSQL error.
my varchar columns and tables are all collated as utf8mb4_unicode_520_ci
I have a query like this with a variable:
SET @Id = '6B1306DB-AA53-DE45-8000-68C37A9EE35F';
SELECT * FROM myTable WHERE ForeignId = @Id;
I get a collation error:
SQL Error (1267) Illegal mix of collations
(utf8mb4_unicode_520_ci,IMPLICIT) and
(utf8mb4_general_ci,IMPLICIT) for operation '='
When I replace the variable with direct string, the query works fine:
SELECT * FROM myTable WHERE ForeignId = '6B1306DB-AA53-DE45-8000-68C37A9EE35F'
Any ideas?