[mythtv-users] What to do if your upgrade fails (was Re: 0.22 database schema upgrade fails driver not loaded)

Chris Tepe cstepe at ctdataservices.com
Fri Nov 6 13:00:15 UTC 2009

Michael T. Dean wrote:
> On 11/05/2009 10:19 PM, Michael T. Dean wrote:
>> After looking at Chris's backup, I found that the schema was modified 
>> in such a way that it causes problems that prevent the DB upgrade 
>> from succeeding.
> On deeper inspection, it seems that the relevant "modification" is 
> missing tables.  The tables are mostly missing due to some corruption 
> or DB issue.
> Though I haven't found/fixed the bug, yet, it seems that there's a bug 
> in Qt-MySQL drivers that kills the QSqlDatabase if a query attempts to 
> touch a non-existent table or column--thus the error message (from his 
> original post):
>>> 2009-11-05 13:37:05.121 Newest MythTV Schema Version : 1244
>>> QSqlQuery::exec: database not open
>>> 2009-11-05 13:37:09.922 DB Error (Unable to perform test for 
>>> database corruption before character set conversion.):
>>> Query was:
>>> Driver error was [1/-1]:
>>> Driver not loaded
>>> Database error was:
>>> Driver not loaded
>>> 2009-11-05 13:37:09.923 Database Schema upgrade FAILED, unlocking.
>>> 2009-11-05 13:37:09.924 Couldn't upgrade database to new schema
> I'm looking into it to see if I can fix the bug for Qt, but I don't 
> think there's anything at all (that's sane that) we could do to work 
> around the bug in Myth code.  Fortunately, (in theory) this bug can 
> only be tripped with a broken schema (as all of the code in Myth 
> should only be hitting real tables/columns).
> Mike
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

Thanks for all the info.  I'll give the partial restore a try as soon as 
I can.  Last night I removed .022 and reinstalled .21 using the backup I 
created before upgrading:). So I have my complete 1214 database that I 
had backed up.  I'm curious as to what happened to the DB.  I've been 
using myth since 12/04 version 0.14 was my first.  I upgrade that 
through 0.17. I then built a new machine using Mythdora 4.0 then updated 
the for the schedules direct (0.20).  Since I prefer to wait a while 
between updates I decided to switch my backend to CentOS for a longer 
run between OS installs.  I copied my database from my MythDora box, 
installed 0.21 and was of to the races(er recordings).  Which brings us 
to my 0.22 upgrade.    I've never modified any of the DB structure 
myself so I'm not sure what happened.

I'll let you know how the partial restore goes.  I believe i had to do 
this when I moved from MythDora to my CentOS install.


More information about the mythtv-users mailing list