[mythtv-users] Duplicate entry for key PRIMARY in recordedmarkup

Michael T. Dean mtdean at thirdcontact.com
Fri Mar 4 16:02:17 UTC 2011


On 03/04/2011 08:32 AM, Khanh Tran wrote:
> I upgraded to .24-fixes a few weeks ago and I'm starting to see the
> following database errors after some recordings.  It's seemingly
> random, in that it only happens once or twice a day and it's not
> consistent on the channels or shows it has this problem with.
>
> Any help is appreciated!
>
> 2011-03-04 08:12:59.607 AutoExpire: CalcParams(): Max required Free
> Space: 6.0 GB w/freq: 5 min
> 2011-03-04 08:15:47.032 DB Error (Resolution insert):
> Query was:
> INSERT INTO recordedmarkup    (chanid, starttime, mark, type, data)
> VALUES ( ?, ?, ?, ?, ?);
> Bindings were:
> :CHANID=2030, :DATA=720, :MARK=28215, :STARTTIME=2011-03-04T08:00:00, :TYPE=30
> Driver error was [2/1062]:
> QMYSQL3: Unable to execute statement
> Database error was:
> Duplicate entry '2030-2011-03-04 08:00:00-30-28215' for key 'PRIMARY'

All I can say from the information given is that your recordedmarkup 
primary key is correct, so the problem is that for some reason multiple 
recorders are inserting the same video data into the table.

The only ways I could see this happening is if you have duplicate 
channel IDs, which is only possible if your channel table is broken, or 
if for some reason there are actually 2 recorders writing the same file 
(which shouldn't be possible--and the code to prevent such hasn't 
changed in a /very/ long time).

Mike


More information about the mythtv-users mailing list