Opened 15 years ago

Closed 15 years ago

#2237 closed patch (fixed)

Inconsistencies in a max program data queries

Reported by: otto at kolsi dot fi Owned by: Isaac Richards
Priority: minor Milestone: unknown
Component: mythtv Version: head
Severity: low Keywords:
Cc: Ticket locked: no


There seems to be slightly different ways to query the latest program data that we have in DB. For example, in statusbox.cpp we have query "SELECT max(endtime) FROM program WHERE manualid=0;" but in some other places the WHERE is missing. If you have e.g. 7 days of program data and some manual recording that goes beyond the 7 days, then the httpstatus.cpp returns maximum date for the program data according to the manual recording date. I think this should be consistent between statusbox.cpp (mythfrontend) and httpstatus.cpp (mythweb etc.). Attached patch adds the WHERE clause to the query in httpstatus.cpp.

There are at least three other places where the same WHERE is missing (mainserver.cpp, 2 * filldata.cpp). In filldata.cpp there are two places where the WHERE is used and two where it isn't. I didn't add these to the patch because I wasn't sure, but probably at least some of these other queries should be modified also.

Attachments (1)

query-where.diff (523 bytes) - added by otto at kolsi dot fi 15 years ago.

Download all attachments as: .zip

Change History (2)

Changed 15 years ago by otto at kolsi dot fi

Attachment: query-where.diff added

comment:1 Changed 15 years ago by cpinkham

Resolution: fixed
Status: newclosed

(In [11181]) Standardize the "SELECT MAX(endtime) FROM program" query to always use "WHERE manualid = 0". It was missing in a few places causing erroreous reporting in places like the backend status webpage.

Closes #2237 with patch by otto at kolsi dot fi. I also fixed the other places he mentioned in the ticket.

Note: See TracTickets for help on using tickets.