Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use settings code to store mythfilldatabase HaveRepeats.
Modify mythfilldatabase to use the main settings code to store the
HaveRepeats setting data.  This will prevent scheduling issues that can
occur when users/scripts/packages/whatever break the MythTV settings
table data through direct DB editing or invalid partial database restore
procedures, or when users have extremely bad luck and that one
particular row is corrupted in the database binary data files and
"fixed" by mysqlcheck/REPAIR table by deleting the row.
(cherry picked from commit f37917f)
  • Loading branch information
sphery committed Jun 23, 2011
1 parent bc746e8 commit 572b95a
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions mythtv/programs/mythfilldatabase/main.cpp
Expand Up @@ -957,19 +957,9 @@ int main(int argc, char *argv[])
if (query.exec() && query.next())
{
if (query.value(0).toInt() != 0)
{
query.prepare("UPDATE settings SET data = '1' "
"WHERE value = 'HaveRepeats';");
if (!query.exec())
MythDB::DBError("Setting HaveRepeats", query);
}
gCoreContext->SaveSettingOnHost("HaveRepeats", "1", NULL);
else
{
query.prepare("UPDATE settings SET data = '0' "
"WHERE value = 'HaveRepeats';");
if (!query.exec())
MythDB::DBError("Clearing HaveRepeats", query);
}
gCoreContext->SaveSettingOnHost("HaveRepeats", "0", NULL);
}
}

Expand Down

0 comments on commit 572b95a

Please sign in to comment.