Illegal mix of collections of operation 'UNION'

I got an Illegal mix of collections of operation 'UNION' when I try to compare an AWS MySQL to a localhost MySQL. 

Comments

  • PeterLPeterL Posts: 1 New member
    Same problem here, and this appears to be the bit that causes the error:

    SELECT 
        'TRIGGER' AS `TYPE`,
        t.TRIGGER_SCHEMA AS `DATABASE`,
        t.TRIGGER_NAME  AS `NAME` ,
        'TABLE' AS `REFERENCED_TYPE`,
        t.EVENT_OBJECT_SCHEMA AS `REFERENCED_DATABASE`,
        t.EVENT_OBJECT_TABLE AS `REFERENCED_NAME`
    FROM
        INFORMATION_SCHEMA.TRIGGERS t
    WHERE t.TRIGGER_SCHEMA = 'sys'

    UNION ALL
    SELECT
        'TABLE' AS `TYPE`,
        c.CONSTRAINT_SCHEMA AS `DATABASE`,
        c.TABLE_NAME  AS `NAME`,
        'TABLE' AS `REFERENCED_TYPE`,
        c.UNIQUE_CONSTRAINT_SCHEMA AS `REFERENCED_DATABASE`,
        c.REFERENCED_TABLE_NAME AS `REFERENCED_NAME`
    FROM
        INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS c
    WHERE c.CONSTRAINT_SCHEMA = 'sys';

    TRIGGER_NAME is utf8_general_ci, while TABLE_NAME is utf8_tolower_ci [at least in MySQL 8.0.16]. This basically makes the tool unusable, so it'd be nice to get it fixed...
Sign In or Register to comment.