[mythtv-users] had a crash while editing and can't edit that file now

Kirby Vandivort kvandivo at ks.uiuc.edu
Sun Jun 1 14:33:22 EDT 2003


On Sun, Jun 01, 2003 at 02:27:27PM -0400, Craig Longman wrote:
> Vinton Coffman wrote:
> 
> >I was editing a show previously recorded and my system locked up 
> >hard.  No useful info in the log files.  Anyway, I can't edit this 
> >file anymore. When I type "e" or "m" to enter edit mode nothing 
> >happens.  It works fine in other files.  I guess the database for that 
> >file is corrupt but I don't know how to fix this.  Suggestions please. 
> 
> take a look at the recorded table, ensure that the 'editing' field is 
> zero.  for some stupid reason though, when you update any field in that 
> table, the starttime field  will also be modified, so you will need to 
> set that in the same sql statement, something like:
> 
> update recorded
> set editing = 0, starttime = '20030508133000'
> where chanid = 1037 and starttime = '20030508133000';
> 
> obviously, change the chanid and starttimes where applicable.

This is happening because the 'starttime' column is the first column in
the table that is of type 'TIMESTAMP'.  MySQL automatically updates the
first TIMESTAMP column for a given row to the current time when a row 
changes.

One way to handle this, which provides a bit more info at the cost of a bit
of space, is to always make the first TIMESTAMP column in a table a
lastUpdate column, (or choose your favorite name).

-- 

Kirby Vandivort                      Theoretical and Computational Biophysics 
Email: kvandivo at ks.uiuc.edu          3051 Beckman Institute
http://www.ks.uiuc.edu/~kvandivo/    University of Illinois
Phone: (217) 244-5711                405 N. Mathews Ave
Fax  : (217) 244-6078                Urbana, IL  61801, USA


More information about the mythtv-users mailing list