[mythtv-users] Are these SQL errors something to worry about?

Michael T. Dean mtdean at thirdcontact.com
Tue Jan 12 19:14:09 UTC 2010


On 01/12/2010 01:02 PM, Jeffrey J. Kosowsky wrote:
> David Liana wrote at about 09:31:40 -0500 on Tuesday, January 12, 2010:
>  > On Tue, Jan 12, 2010 at 5:24 AM, Jeffrey J. Kosowsky wrote:
>  > 
>  > > I seem to get the following types of errors when watching LiveTV or
>  > > recording shows:
>  > >
>  > > 2010-01-12 04:55:39.561 DB Error (aspect ratio change insert):
>  > > Query was:
>  > > INSERT INTO recordedmarkup (chanid, starttime, mark, type, data) VALUES (
>  > > ?, ?, ?, ?, ?);
>  > > Bindings were:
>  > > :CHANID=2071, :DATA=0, :MARK=15, :STARTTIME=2010-01-12T04:55:38, :TYPE=12
>  > > No error type from QSqlError?  Strange...
>  > > 2010-01-12 04:55:39.595 Error preparing query: INSERT INTO recordedmarkup
>  > >  (chanid, starttime, mark, type, data)    VALUES ( :CHANID, :STARTTIME,
>  > > :MARK, :TYPE, :DATA);
>  > > 2010-01-12 04:55:39.619 Driver error was [2/1054]:
>  > > QMYSQL3: Unable to prepare statement
>  > > Database error was:
>  > > Unknown column 'data' in 'field list'
>  > >
>  > I think I got these errors when I dumped my 0.21 database and (improperly)
>  > loaded it over a 0.22 database.  But, that was back in November.
>  > 
>  > 
>  > Did you try doing a proper dump/restore with the correct versions?
>  > 
>
> For future reference, I was able to fix it all pretty painlessly by
> doing the following: 

You'd have been better served doing a full backup with partial restore 
procedures from:  http://www.mythtv.org/wiki/Database_Backup_and_Restore .

This--corrupt DB schema--is exactly what the partial restore is for.

The problem with the approach you used is that some of the /data/ in 
your database may have been partially converted to the new schema 
versions even though some of the schema wasn't.  And, even if it wasn't, 
MySQL corrupted a /lot/ of the data when it inserted the 0.21-fixes data 
into a 0.22 schema.

Therefore, the /best/ solution is to throw away /all/ of the 
non-critical (reproducible) data.  I'd still recommend you go through 
the backup/partial-restore procedure--otherwise, you may find another 
strange error similar to the one you found above at some indeterminate 
time in the future.

Mike


More information about the mythtv-users mailing list