Modify

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#4563 closed defect (fixed)

Scheduler ambiguous SQL query with certain custom recording rules

Reported by: taco_mel@… Owned by: janne
Priority: minor Milestone: 0.21
Component: mythtv Version: head
Severity: medium Keywords: mythbackend scheduler power search
Cc: Ticket locked: no

Description

I had occasion to write a custom "power search" query that includes a table containing a column called 'recordid', and this makes the 'recordid' of the resulting query ambiguous. Here's what was run within MySQL:

INSERT INTO recordmatch (recordid, chanid, starttime, manualid) SELECT record.recordid, program.chanid, program.starttime, IF(search = 5, recordid, 0) FROM (record, program INNER JOIN channel ON channel.chanid = program.chanid)...

A patch for scheduler.cpp is attached to qualify that with the appropriate table name.

Attachments (1)

myth-scheduler-recordid-sql.patch (606 bytes) - added by taco_mel@… 8 years ago.
Patch to mythbackend/scheduler.cpp

Download all attachments as: .zip

Change History (4)

Changed 8 years ago by taco_mel@…

Patch to mythbackend/scheduler.cpp

comment:1 Changed 8 years ago by janne

  • Milestone changed from unknown to 0.21
  • Owner changed from ijr to janne
  • Status changed from new to accepted

comment:2 Changed 8 years ago by janne

  • Resolution set to fixed
  • Status changed from accepted to closed

(In [16126]) make recordid unambiguous for custom recording rules involving tables with recordid

Closes #4563 From: <taco_mel[a]yahoo[p]com>

comment:3 Changed 8 years ago by janne

(In [16127]) Merges revision [16126] from trunk: make recordid unambiguous for custom recording rules involving tables with recordid

Closes #4563 From: <taco_mel[a]yahoo[p]com>

Add Comment

Modify Ticket

Action
as closed The owner will remain janne.
The resolution will be deleted. Next status will be 'new'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.