[mythtv-users] Cleaning up orphan database records
sastie at us.nomura.com
Thu Apr 19 18:12:42 UTC 2007
What I said was that I wanted to remove all my references to files in
the LiveTV group, I used this as a last resort because mythtv didn't
clean them up for me after using the frontend functionality to do so.
Obviously the person who asked the question originally is facing the
There is obviously a bug in the system that doesn't remove the record if
the file doesn't exist in the filesystem. I agree that people should not
have to mess with their DB. However this is the reality in this case. I
am not advocating for "misusing" mythtv but in some cases you have to
workaround things to achieve what you want.
My goal was not to mess this guy' system up but tell him what I had to
do when I faced a similar situation. For the record, I didn't delete
those files manually, I always delete my recordings (LiveTV or any other
group) through the frontend UI; obviously something went wrong in this
process so I had to do this. I didn't leave a bunch of orphan files
because I went ahead and delete them all through the UI, but there were
still about 40-45 files showing in the UI. So at that point I knew that
if the system worked properly that no files in the LiveTV group should
be in the filesystem.
I really do not understand the tones in some messages. We are not curing
cancer here, it is TV nothing more nothing less. Nobody lose their life
for TV. When I posted the sql query this is what I said:
I wanted to delete all my items in the LiveTV group.
In order to do so, you can login in MySQL and do DELETE from record
where group = 'LiveTV';
If I remember correctly that this is the appropriate table and column
Just double check by doing a select on the the table before doing
We are all adults here (or I think we are) we all make decisions, I told
him what I did on my system to solve a similar issue. Yes I gave a SQL
query but I said that he should double check before doing anything and
that this would delete all the records in the liveTV group. After isn't
this all about sharing experiences ?
Can't we just all get along? :)
From: mythtv-users-bounces at mythtv.org
[mailto:mythtv-users-bounces at mythtv.org] On Behalf Of Michael T. Dean
Sent: Thursday, April 19, 2007 1:46 PM
To: Discussion about mythtv
Subject: Re: [mythtv-users] Cleaning up orphan database records
On 04/19/2007 01:34 PM, Astie, Sebastien wrote:
> If you read carefully, he doesn't have the files in his filesystem.
> References to files not in his filesystem are in the database.
> So this is not really about orphan files but orphan references in his
> I have about 35 records in the database pointing to old LiveTV
> recordings that no longer exist on disk.
I saw that. However, you said:
> I wanted to delete all my items in the LiveTV group.
> In order to do so, you can login in MySQL and do
> DELETE from record where group = 'LiveTV';
And, even if you had manually deleted the files (which you should
/never/ do), you still left a bunch of orphan records...
> I used that because mythtv didn't clean those references, even after
> going through the process of selecting the livetv group and choosing
> delete each file within the frontend.
> I know that you are trying to help, but attacking people because you
> haven't read carefully is unjustified.
Still telling people to use Myth incorrectly is not the right solution.
If part of Myth is not working properly, please post a question about
it--i.e. "Why won't Myth let me delete a record for a recording whose
file is missing?"--and we will work with you to find out what's
happening, and--if necessary--fix Myth so it works for everyone.
My personal opinion: if you want to use Myth incorrectly and you want
to mess with its files and its data, that's your prerogative (and you
can live with the consequences). However, please don't encourage others
to do so. After all, do you really want to take responsibility for a
user who breaks his/her database after executing the SQL commands you
post? This is especially possible when you're posting untested SQL from
Leaving quoted message so you can verify I didn't change any of your
> -----Original Message-----
> From: mythtv-users-bounces at mythtv.org
> [mailto:mythtv-users-bounces at mythtv.org] On Behalf Of Michael T. Dean
> Sent: Thursday, April 19, 2007 1:25 PM
> To: Discussion about mythtv
> Subject: Re: [mythtv-users] Cleaning up orphan database records
> On 04/19/2007 12:40 PM, Astie, Sebastien wrote:
>> I had the same issue.
>> I wanted to delete all my items in the LiveTV group.
>> In order to do so, you can login in MySQL and do
>> DELETE from record where group = 'LiveTV';
> And people wonder how they get orphaned records/orphaned files...
>> If I remember correctly that this is the appropriate table and column
> Besides, if you used, "the appropriate table and column" you would
> orphan files. And, if you delete the files and the data from "the
> appropriate table and column", you're still leaving orphaned records
> (potentially > 7200 per hour of recording) in various other tables.
> So, let Myth clean it up for you. The LiveTV recordings are expired
> one day (by default, so you'd have to explicitly make them last
> so don't worry about them. They'll go away on their own.
> If you're impatient and you can't wait 'til tomorrow, go into Watch
> Recordings or Delete Recordings and change the recording group to
> LiveTV, then while on the left hand side, use the menu button to add
> the shows to the playlist, then Menu|Playlist Options|Delete to delete
> them all.
> This approach--letting Myth delete the recordings--will delete the
> files, the recording information, the markup information, the
> information, etc. Any other approach is flat out wrong.
> These "magical" scripts are a last resort that should not be required.
But deleting list sigs and "Notice for Sales & Trading Communication"
mythtv-users mailing list
mythtv-users at mythtv.org
Notice for Sales & Trading Communication
The information, tools and material presented in this email have been prepared by individual Sales and/or Trading personnel of Nomura Securities, International, Inc. ("Nomura"). References to Nomura research reports should be read in conjunction with the full text of the actual report. Please access the following link for important related information and instructions for accessing Nomura Research reports.
This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please delete it and all copies from your system, destroy any hard copies and notify the sender. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. Nomura Holding America Inc., Nomura Securities International, Inc, and their respective subsidiaries each reserve the right to monitor all e-mail communications through its networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state the views of such entity. Unless otherwise stated, any pricing information in this message is indicative only, is subject to change and does not constitute an offer to deal at any price quoted. Any reference to the terms of executed transactions should be treated as preliminary only and subject to our formal written confirmation.Notice for Sales & Trading Communication.
More information about the mythtv-users