[mythtv-commits] Ticket #6478: Add update timestamp to program table for incremental program data retrieval

MythTV mythtv at cvs.mythtv.org
Wed May 27 22:53:08 UTC 2009


#6478: Add update timestamp to program table for incremental program data
retrieval
---------------------------------------+------------------------------------
 Reporter:  chasedouglas at gmail.com     |        Owner:  danielk   
     Type:  patch                      |       Status:  infoneeded
 Priority:  minor                      |    Milestone:  unknown   
Component:  MythTV - Mythfilldatabase  |      Version:  head      
 Severity:  medium                     |   Resolution:            
  Mlocked:  0                          |  
---------------------------------------+------------------------------------

Comment(by danielk):

 Replying to [comment:7 anonymous]:
 > Replying to [comment:6 danielk]:
 > > Chase, I think you need too look at this a bit more. There are SQL
 statements prepared but not executed in datadirect.cpp and there is a file
 missing in the patch (but I was able to reconstruct it for testing.)
 >
 > There are three queries prepared in datadirect.cpp, and all three are
 executed. If they weren't it wouldn't work right at all.

 Right, that's why I want you to look at it. See line 885, that query is
 prepared but not executed.

 > What file is missing?

 listingsources.h, just try applying your patch to virgin sources gcc will
 report missing files.

 > > Also, why is the program table treated differently from the other
 related tables in ProgramData::clearDataByChannel() ?
 >
 > The current clearDataByChannel() code completely deletes all the program
 information in the channel. Currently, mythtv deletes all program
 information, and then reloads it all back in. We want to leave the program
 information and just update it with what has changed since the last
 mythfilldatabase run.

 I think you misunderstood my question. You changed clearDataByChannel() to
 not delete some of the program information by default. I see two things
 wrong with this: First, when you add an argument to a function that has a
 default it should always default to the old behavior to avoid introducing
 bugs and to lessen the effort needed in code review. Second, the
 information in programrating, credits and programgenres is tied to the
 information in program, if you delete an row in one or more of them it
 stands to reason you should delete the matched rows in all the others
 (unless you can explain why that wouldn't be the case?)

 > > Did you do before and after benchmarking for this? What kind of
 numbers?
 > I have not yet, but I will try to soon.

 k, thanks.

 > > DataDirectProgramUpdate() will give us overlaps if there is pre-
 existing non-DataDirect data in the table, unless I'm missing something?
 >
 > If DataDirect is not the preferred listings source then it won't delete
 the pre-existing non-DataDirect programs in the first query of the
 function. During the update, the temporary table dd_v_program holds all
 the programs that will be copied into the real program table. The third
 query in DataDirectProgramUpdate() deletes any programs in dd_v_program
 that would overlap with any pre-existing programs that weren't cleared
 away by the first query in the function.

 k, makes sense.

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/6478#comment:8>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list