[mythtv-users] Are these SQL errors something to worry about?
Jeffrey J. Kosowsky
mythtv at kosowsky.org
Wed Jan 13 01:48:22 UTC 2010
Michael T. Dean wrote at about 14:14:09 -0500 on Tuesday, January 12, 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.
>
Definitely. But I didn't know about that 1 month ago when I mixed the schemas.
> 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.
That is definitely possible and sage advice... though the only 0.21
schema that I mixed in was the non-reproducible program stuff anyway
which I will need to partially restore anyway since I don't want to
lose it.
> 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.
>
Well I bit the bullet and did the following:
1. Created a virgin mythtv 0.21 mythconver database by importing mc.sql
and starting mythtv-setup ver 0.21
2. Dumped the still 0.21 format program-related profiles from my
current mixed 0.21-0.22 mythconverg database.
All remained in 0.21 format (I verified that by comparing with old
database) and all contain hard-to-replace info
3. Imported those tables into my new virgin pure 0.21 mythconverg
database
4. Ran mythtv-setup ver 0.22 to update this properly to ver 0.22.
5. Manually (PITA) went through all the mythtv-setup and mythfrontend
settings to restore all my settings
I assume this is similar to what you were suggesting.
Seems to work so far...
More information about the mythtv-users
mailing list