[mythtv-users] Database upgrade 0.21 -> 0.22: issue to avoid

James Warden warjamy at yahoo.com
Mon Nov 16 20:25:52 UTC 2009


hey guys,

As I (implicitely) said, I did not give any specific technical details. I actually did not roll an old DB over a new one. I slightly modified the DB at schema v1230 so that the upgrade would make it to v1231, and then it went all fine. I looked into the code 
(mythtv/libs/libmythtv/dbcheck.cpp I believe or something similar).

I did start from schema v1214. It just fell short of working at v1230, thus my looking into the mysql statement that made it fail in the first place. I had not experienced any oddities once the upgrade was complete.

however, I did roll back to 0.21 (see my other discussion thread about PVR500) because any updates after svn at july2008 has a weird effect on ivtv (at least in my backend server).

J.

--- On Mon, 11/16/09, David Liana <dliana.mythtv at gmail.com> wrote:

> From: David Liana <dliana.mythtv at gmail.com>
> Subject: Re: [mythtv-users] Database upgrade 0.21 -> 0.22: issue to avoid
> To: "Discussion about mythtv" <mythtv-users at mythtv.org>
> Date: Monday, November 16, 2009, 2:36 PM
> 
> 
> 
> On Mon, Nov 16, 2009 at 1:58 PM,
> Michael T. Dean <mtdean at thirdcontact.com>
> wrote:
> 
> 
> On 11/16/2009 04:01 AM, James Warden
> wrote:
> 
> I went through an upgrade
> from mythtv 0.21 to 0.22 yesterday and found an issue with
> the following (probably already mentioned somewhere else but
> this is how I fixed it):
> 
> 
> the dtv_multiplex and channelscan_dtv_multiplex tables
> cannot be upgraded from db schema 1230 to 1231 and makes the
> whole upgrade fail.
> 
> This is because the table already contains a field (mysql
> column) that the upgrade is trying to add again when
> upgrading to 1231.
> 
> 
> So what I did is to make a backup (mysqldump) of DB at
> schema 1230, remove the screwing field from the dump (it is
> an ASCII file) when it is trying to INSERT it in these
> particular tables, retore the modified DB, and upgrade
> again.
> 
> 
> It worked pretty nicely. I can give some more technical
> details / howto when I am at home if someone needs it.
> 
> You restored a 0.21-fixes DB backup /on top of/ a
> 0.22-fixes DB schema.  That means that MySQL converted any
> data to fit (and may have broken your data).  That means
> you should /immediately/ go back to your 0.21-fixes database
> backup and restore it properly and then let MythTV upgrade
> it properly.
> 
> 
> http://www.gossamer-threads.com/lists/mythtv/users/405443#405443
> 
> (Specifically, read the section, "If you're not
> doing an "in-place" upgrade (so you need to
> restore your DB backup), it is critical that you DROP any
> existing database /before/ restoring your database
> backup." )
> 
> 
> and http://svn.mythtv.org/trac/ticket/6923#comment:4
> 
> If you don't do this, all of your data is suspect, and
> bad things may happen.
> 
> 
> Mike 
> 
> 
> 
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
> 
> 
> 
>  
> I'm with Mike here.  You want to load the old DB
> before you upgrade.  I tried doing it in your order -
> overlaying a 0.21 DB over 0.22.  Seemed to work okay until
> I kept getting query errors in my logs.
> 
> -----Inline Attachment Follows-----
> 
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
> 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the mythtv-users mailing list