Permalink
Browse files

Fix some invalid-format datetimes in queries.

Fix some hard-coded, string datetime representations in queries that
were using an invalid format that no longer works with MySQL 5.5.  These
datetime literals now use the correct MySQL SQL datetime literal format
(which is also the ISO SQL datetime literal format).

Huge thanks to Rob Smith for testing with MySQL 5.5 and seeking out the
datetime-usage within queries.

Refs #8585 (possibly fixes #8585).
  • Loading branch information...
1 parent 8ff39aa commit 7e33788e5b75049d8eaceee589606a69241eab24 @sphery sphery committed Feb 21, 2011
@@ -2669,7 +2669,7 @@ void ProgramInfo::UpdateLastDelete(bool setTime) const
}
else
{
- query.prepare("UPDATE record SET last_delete = '0000-00-00T00:00:00' "
+ query.prepare("UPDATE record SET last_delete = '0000-00-00 00:00:00' "
"WHERE recordid = :RECORDID");
}
query.bindValue(":RECORDID", recordid);
@@ -2019,7 +2019,7 @@ NULL
"UPDATE settings SET value = 'MythFillGrabberSuggestsTime' "
"WHERE value = 'HonorGrabberNextSuggestedMythfilldatabaseRunTime';",
"UPDATE settings SET value = 'MythFillSuggestedRunTime', "
- " data = '1970-01-01T00:00:00' "
+ " data = '1970-01-01 00:00:00' "
"WHERE value = 'NextSuggestedMythfilldatabaseRun';",
NULL
};
@@ -1446,9 +1446,10 @@ void Scheduler::UpdateNextRecord(void)
if (nextRecMap[recid].isNull() || !next_record.isValid())
{
subquery.prepare("UPDATE record "
- "SET next_record = '0000-00-00T00:00:00' "
+ "SET next_record = '0000-00-00 00:00:00' "
"WHERE recordid = :RECORDID;");
subquery.bindValue(":RECORDID", recid);
+
}
else
{

0 comments on commit 7e33788

Please sign in to comment.