Permalink
Browse files

Clean up orphaned inputgroups

in various places when UnlinkInputGroup(0,0) is called.

Fixes #10992 with a slightly modified patch, based on the SQL provided
by Karl Dietz.
  • Loading branch information...
1 parent be2f9d9 commit 33fe7e91919a931c288d9909fd110c3e2e544930 @sphery sphery committed Aug 12, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 mythtv/libs/libmythtv/cardutil.cpp
@@ -1563,7 +1563,8 @@ bool CardUtil::UnlinkInputGroup(uint inputid, uint inputgroupid)
{
query.prepare(
"DELETE FROM inputgroup "
- "WHERE cardinputid = 0 ");
+ "WHERE cardinputid NOT IN "
+ "( SELECT cardinputid FROM cardinput )");
}
else
{

0 comments on commit 33fe7e9

Please sign in to comment.