Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#6354 closed defect (fixed)

PATCH: Invalid check in scheduler.cpp

Reported by: tomimo@… Owned by: gigem
Priority: minor Milestone: unknown
Component: MythTV - Scheduling Version: head
Severity: low Keywords:
Cc: Ticket locked: no

Description

Here is a simple patch that fixes an inverted if-check which otherwise produces the following errors at certain times.

2009-03-13 22:00:19.282 DB Error (Update next_record): Query was: UPDATE record SET next_record = ? WHERE recordid = ?; Bindings were: :NEXTREC=, :RECORDID=105 Driver error was [2/1048]: QMYSQL3: Unable to execute statement Database error was: Column 'next_record' cannot be null

=================================================================== --- programs/mythbackend/scheduler.cpp (revision 20121) +++ programs/mythbackend/scheduler.cpp (working copy) @@ -1336,7 +1336,7 @@

if (next_record == nextRecMap[recid])

continue;

  • if (nextRecMap[recid].isNull() && next_record.isValid())
+ if (nextRecMap[recid].isNull()
!next_record.isValid())

{

subquery.prepare("UPDATE record "

"SET next_record = '0000-00-00T00:00:00' "

Change History (3)

comment:1 Changed 12 years ago by gigem

Owner: changed from bjm to gigem
Status: newassigned

comment:2 Changed 12 years ago by gigem

Resolution: fixed
Status: assignedclosed

(In [20209]) Fixed an inverted condition in the scheduler which could cause a minor DB error when updating the next_record field. Thanks to tomimo for the patch. Fixed #6354.

comment:3 Changed 12 years ago by gigem

(In [20210]) Applying [20209] to 0.21+fixes.

Fixed an inverted condition in the scheduler which could cause a minor DB error when updating the next_record field. Thanks to tomimo for the patch. Refs #6354.

Note: See TracTickets for help on using tickets.