[mythtv] EIT scanner crashes mythbackend

Peter Schade l-case at gmx.net
Mon Jan 22 15:00:37 UTC 2007


>> Here is the exact sql error ( there have been many of them so this is
>> just an example )
>>
>> 2007-01-22 14:02:37.262 DB Error (change_program):
>> Query was:
>> UPDATE program SET starttime = '2007-01-27T00:00:00',     endtime   =
>> '2007-01-30T02:55:00' WHERE chanid    = 1702 AND       starttime =
>> '2007-01-26T22:55:00'
>> Driver error was [2/1062]:
>> QMYSQL3: Unable to execute query
>> Database error was:
>> Duplicate entry '1702-2007-01-27 00:00:00-0' for key 1
>>
>> Yes, I have three DVB cards.

> Then it's no real problem and deleting the program table has solved it
> only by pure luck (and a backend restart). This error can occur then
> more than one card scans the same program. It will be fixed as soon as
> the eit scanner gets smarter.

How about just replace it with REPLACE instead of UPDATE?
http://dev.mysql.com/doc/refman/4.1/en/replace.html

It replaces the entry with the same primary key or inserts this row into the
database. So there is no more DB Error.

Bye Peter



More information about the mythtv-dev mailing list