Bug 183268 - mythfilldatabase erroneously deletes record schedules for the current day
|
Bug#:
183268
|
Product: Gentoo Linux
|
Version: unspecified
|
Platform: All
|
|
OS/Version: Linux
|
Status: RESOLVED
|
Severity: normal
|
Priority: P2
|
|
Resolution: FIXED
|
Assigned To: cardoe@gentoo.org
|
Reported By: digitalaudiorock@hotmail.com
|
|
Component: Applications
|
|
|
URL:
|
|
Summary: mythfilldatabase erroneously deletes record schedules for the current day
|
|
Keywords:
|
|
Status Whiteboard:
|
|
Opened: 2007-06-26 14:10 0000
|
mythfilldata always deletes records from the record table with types of single,
override, or dontrecord whose enddate is the current day.
The problem is in the clearOldDBEntries in the file filldata.cpp:
query.prepare("DELETE FROM record WHERE (type = :SINGLE "
"OR type = :OVERRIDE OR type = :DONTRECORD) "
"AND enddate < NOW();");
query.bindValue(":SINGLE", kSingleRecord);
query.bindValue(":OVERRIDE", kOverrideRecord);
query.bindValue(":DONTRECORD", kDontRecord);
query.exec();
Since enddate is a date column (not datetime) it's getting compared to NOW() as
a datetime at 12:00AM, thus always less than NOW(). Using either CURDATE(),
CURRENT_DATE, or CAST(NOW() AS DATE) in place of NOW() would work correctly.
Reproducible: Always
Steps to Reproduce:
1. Schedule a "record only this showing" type for the current day.
2. Run mythfilldatabase.
Actual Results:
The schedule gets deleted.
Always provide ebuild name and version in bug summary, please.
Sorry...I forgot to include that this is occuring in:
media-tv/mythtv-0.20.1_p13344
dev-db/mysql-5.0.42
...though it appears to be the same in media-tv/mythtv-0.20_p12325.
Have you filed this upstream?
At the time I entered this, I thought it might be something that had already
been resolved upstream. As far as I can see I don't think it has been, so I
will file a bug today.
I filed this mythtv bug:
http://svn.mythtv.org/trac/ticket/3681
I found that this doesn't appear to have been corrected in 0.21 either, though
the code is now in /libs/libmythtv/programdata.cpp rather than
/programs/mythfilldatabase/filldata.cpp.
It appears that this has been resolved upstream for both 0.20 and 0.21.
This will be fixed in a mythtv ebuild newer then 13794. So
>=media-tv/mythtv-0.21_p13794
Fixed in mythtv-0.20.1_p14146
*** Bug 187445 has been marked as a duplicate of this bug. ***