[mythtv] [PATCH] Stop complaints about duplicate keys on programinsert

Mark Edwards irish at irishmark.co.uk
Wed Apr 6 12:39:48 UTC 2005


> The attached patch adds a few lines to siscan.cpp that delete a
> program from the program table before inserting the new program
> on the same channel at the same start time.
> 
> This is for those of us who get their program guide data over
> the air from a DVB card, and it stops the logfile from filling
> up with lots of messages complaining that the program information
> couldn't be inserted because the key already exists. This is the
> normal case as the same program information is sent over and over.
> 
> This mimics the same behaviour as found in programinfo.cpp

Wouldn't it be easier and quicker to change the "INSERT INTO" for a "REPLACE
INTO"?
That's what I've been running locally for ages, but I wasn't sure wether
REPLACE's were allowed: I think it needs quite a recent mysql.

Mark



More information about the mythtv-dev mailing list