[mythtv-users] Duplicate detection

Jan Ceuleers jan.ceuleers at gmail.com
Mon Sep 26 16:25:26 UTC 2016


On 24/09/16 10:17, Jan Ceuleers wrote:
> Do you know precisely what query mythtv will execute for a power rule if
> record.description = XXX and
> record.whatevercolumnisusedforadditionaltables = YYY?

Answering my own question.

During a quiet moment I briefly ran the backend manually with -v
database and --loglevel debug, during which time I triggered a
reschedule using mythutil. The resulting log tells me that the power
rule is inserted into a query which conforms to the following simplified
template:

SELECT record.recordid, program.chanid, program.starttime, <more columns>
FROM (record, program YYY INNER JOIN channel ON channel.chanid =
program.chanid)
WHERE record.recordid = <number of the power rule> AND program.manualid
= 0 AND (
(
XXX
)
AND <more conditions> );

Full disclosure: I'm not 100% certain about whether YYY is inserted
before or after the INNER JOIN ... ON ... clauses, but I suspect before.



More information about the mythtv-users mailing list