Comment 2 for bug 683940

Revision history for this message
Andrew Hutchings (linuxjedi) wrote :

Something is wrong with this query around the last where condition for this foreign key (other test ones from the MySQL manual still work):

select rc.constraint_name, rc.referenced_table_name, group_concat(distinct concat('`',kc.column_name,'`')), rc.update_rule, rc.delete_rule, rc.match_option, group_concat(distinct concat('`',kt.column_name,'`')) from information_schema.referential_constraints rc join information_schema.key_column_usage kt on (rc.constraint_schema = kt.constraint_schema and rc.constraint_name = kt.constraint_name) join information_schema.key_column_usage kc on (rc.constraint_schema = kc.constraint_schema and rc.referenced_table_name = kc.table_name and rc.unique_constraint_name = kc.constraint_name) where rc.constraint_schema='SCHEMA' and rc.table_name='TABLE' group by rc.constraint_name

So headaches ahoy!