[mythtv] Patch for mythfilldatabase --no-delete
Oscar Carlsson
webmaster at trekotor.se
Thu Mar 3 11:03:55 UTC 2005
Andrew M. Bishop wrote, On 2005-03-02 19:52:
>>But, anyway, if you look at the changes I made you can see (as far as I
>>can remember) that the whole day _was_ indeed cleared in either case
>>before entering that if-clause.
>
>
> I can tell you from experience that the whole day is not cleared. If
> it was then I would not have had any SQL errors when performing the
> insert. If the whole day is cleared then there is no need to check if
> a program already exists in the database, obviously it wouldn't.
>
> When I run mythfilldatabase --no-delete from version 0.17 I got
> several thousand SQL insert errors due to duplicate data. With my
> one-line patch to reverse the 'if' statement there were no errors.
> There can only be insert errors due to duplicate data if the whole day
> was not cleared.
What I meant to say was that it _used_ to delete the whole day in 0.16
(or at least CVS before my changes) before even considering deleting
program by program.
But, as Hamish says, the help text for this switch clearly says that
existing programs should _not_ be deleted when updating, wich obviously
isn't what you intended from the beginning.
I'll fix this in the next couple of days by making the "delete by
program" also run when using --no-delete, thus making --no-delete only
keep old programs in the db, nothing more. Might rename it as well, will
see.
/O
More information about the mythtv-dev
mailing list