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

Michael T. Dean mtdean at thirdcontact.com
Fri Nov 6 04:59:45 UTC 2009


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


More information about the mythtv-users mailing list