When I run the following query:
CREATE ALGORITHM = UNDEFINED VIEW d_view_galerias AS (
SELECT id, titulo, 'foto' AS tipo, '' AS embed
FROM d_galeria_fotos
)
UNION (
SELECT id, titulo, 'video' AS tipo, embed
FROM d_galeria_videos
)
I get the error:
Illegal mix of collations (utf8_unicode_ci,COERCIBLE) and (utf8_general_ci,COERCIBLE) for operation '='
"tipo" is getting as utf8_unicode, but the other fields are as utf8_general ... how to make a cast, convert?