[mythtv-users] Error upgrading database schema from 1214 to 1215

Will C dontspamme at will.is-a-geek.org
Sat Sep 4 02:40:21 UTC 2010


Hi everyone,

I've been using mythtv happily for about three years now, on my Debian 
testing/unstable system (with the "unofficial" packages from Christian 
Marillat's debian-multimedia repositories).

A few days ago I did an "aptitude dist-upgrade", and the myth packages got 
upgraded from 0.21 to 0.23.1 (yes, I hadn't done an upgrade in a while). 
More specifically, the debian package versions went from 
0.21.svn20090824-0.1 to 0.23.1-0.1.

After the upgrade, mythtv-backend and mythtv-setup both fail while trying 
to upgrade the database schema from version 1214 to 1254. It appears that 
the failure occurs in the first incremental upgrade, from 1214 to 1215. 
Here is the output of mythtv-setup:

> 2010-09-03 18:08:45.868 Using runtime prefix = /usr
> 2010-09-03 18:08:45.868 Using configuration directory = /root/.mythtv
> 2010-09-03 18:08:45.892 Empty LocalHostName.
> 2010-09-03 18:08:45.892 Using localhost value of myth
> 2010-09-03 18:08:45.921 New DB connection, total: 1
> 2010-09-03 18:08:45.925 Connected to database 'mythconverg' at host:
> localhost 2010-09-03 18:08:45.925 Closing DB connection named 'DBManager0'
> 2010-09-03 18:08:45.936 DPMS is active.
> 2010-09-03 18:08:45.939 Primary screen: 0.
> 2010-09-03 18:08:45.940 Connected to database 'mythconverg' at host:
> localhost 2010-09-03 18:08:45.942 Using screen 0, 800x600 at 0,0
> 2010-09-03 18:08:45.968 Desktop video mode: 800x600 85.0629 Hz
> 2010-09-03 18:08:46.002 MythUI Image Cache size set to 20971520 bytes
> 2010-09-03 18:08:46.005 Primary screen: 0.
> 2010-09-03 18:08:46.007 Using screen 0, 800x600 at 0,0
> 2010-09-03 18:08:46.009 Using theme base resolution of 800x600
> 2010-09-03 18:08:46.035 LIRC, Error: Failed to read config file
> '/root/.lircrc' 2010-09-03 18:08:46.035 JoystickMenuThread Error:
> Joystick disabled - Failed to read /root/.mythtv/joystickmenurc
> 2010-09-03 18:08:46.111 Using Frameless Window
> 2010-09-03 18:08:46.111 Using Full Screen Window
> 2010-09-03 18:08:46.192 Using the Qt painter
> 2010-09-03 18:08:46.238 MythFontProperties, Error: Failed to load
> 'Arial', got 'Bitstream Vera Sans' instead
> Location: /usr/share/mythtv/themes/MythCenter/base.xml @ 5
> Name: 'basesmall'       Type: 'font'
> .
> .   (Many more font errors clipped)
> .
> 2010-09-03 18:08:46.536 XMLParseBase: Loaded base theme from
> '/usr/share/mythtv/themes/MythCenter/base.xml' 2010-09-03 18:08:46.560
> XMLParseBase: Loaded base theme from
> '/usr/share/mythtv/themes/default/base.xml' 2010-09-03 18:08:46.578 New
> DB connection, total: 2
> 2010-09-03 18:08:46.579 Connected to database 'mythconverg' at host:
> localhost 2010-09-03 18:08:46.592 Current MythTV Schema Version
> (DBSchemaVer): 1214 2010-09-03 18:08:46.592 MythTV database schema is
> old. Waiting to see if DB is being upgraded. 2010-09-03 18:08:47.599
> Current MythTV Schema Version (DBSchemaVer): 1214 2010-09-03 18:08:48.605
> Current MythTV Schema Version (DBSchemaVer): 1214 2010-09-03 18:08:49.612
> Current MythTV Schema Version (DBSchemaVer): 1214 2010-09-03 18:08:50.619
> Current MythTV Schema Version (DBSchemaVer): 1214 2010-09-03 18:08:51.625
> Current MythTV Schema Version (DBSchemaVer): 1214 2010-09-03 18:08:51.626
> Timed out waiting.
> 2010-09-03 18:08:51.664 Backing up database with script:
> '/usr/share/mythtv/mythconverg_backup.pl' 2010-09-03 18:09:11.169
> Database Backup complete.
> 2010-09-03 18:09:11.181 Backed up database to file:
> '/recordings/mythconverg-1214-20100903180851.sql.gz' load glyph failed
> err=6 face=0x83bee60, glyph=704
> QFontEngine: Glyph neither outline nor bitmap format=0
> load glyph failed err=6 face=0x83bee60, glyph=704
> QFontEngine: Glyph neither outline nor bitmap format=0
> load glyph failed err=6 face=0x83bee60, glyph=704
> QFontEngine: Glyph neither outline nor bitmap format=0
> load glyph failed err=6 face=0x83bee60, glyph=704
> QFontEngine: Glyph neither outline nor bitmap format=0
> load glyph failed err=6 face=0x83bee60, glyph=704
> QFontEngine: Glyph neither outline nor bitmap format=0
> load glyph failed err=6 face=0x83bee60, glyph=704
> QFontEngine: Glyph neither outline nor bitmap format=0
> 2010-09-03 18:09:20.930 Newest MythTV Schema Version : 1254
> 2010-09-03 18:09:20.944 Upgrading to MythTV schema version 1215
> 2010-09-03 18:09:20.945 New DB connection, total: 3
> 2010-09-03 18:09:20.946 Connected to database 'mythconverg' at host:
> localhost QSqlQuery::exec: database not open
> 2010-09-03 18:09:21.243 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
>
> 2010-09-03 18:09:21.243 Database Schema upgrade FAILED, unlocking.
> 2010-09-03 18:09:21.244 Couldn't upgrade database to new schema.
> Error in my_thread_global_end(): 1 threads didn't exit


I found similar errors reported by others that had to do with a libqt-mysql 
version issue, so I have installed the libqt3-mt-mysql package. That didn't 
fix the problem.

I have searched the web and the list archives, and have found that at least 
one other person encountered this exact same problem here:
    http://www.gossamer-threads.com/lists/mythtv/users/406031
However the solution to that problem given here:
    http://www.gossamer-threads.com/lists/mythtv/users/406111
did not work for me. The schema upgrade still fails at exactly the same 
point, even with a partially-restored database.

I also found this page about database corruption due to incorrect character 
encoding when upgrading from 0.21 to 0.22:
    http://www.mythtv.org/wiki/Fixing_Corrupt_Database_Encoding
The solution described there seemed to have no effect either.

Also, I (fortunately!) have a backup of the mythconverg database from less 
than a day before I did this upgrade, and I have tried all of the above 
using that snapshot of the database, in case the original schema upgrade 
attempt hosed the database. That has not worked either.

Does anyone have any suggestions of what I might try at this point? Given 
all the various things I've tried, with no change whatsoever in the output, 
this really seems to be an actual software bug in the schema upgrade 
process, rather than a problem with the contents of the database. However, 
since no one else is reporting it, it's more than likely due to the fact 
that I went for about a year without doing an upgrade, and now I'm 
upgrading through multiple versions all at once. Some library version 
incompatibility maybe?

Thanks greatly in advance for any help you can give!

Will


Relevant software installed (debian package versions):
libmyth-0.23.1-0                        0.23.1-0.1
mythtv-common                           0.23.1-0.1
mythtv-backend                          0.23.1-0.1
mythtv-database                         0.23.1-0.1
mythtv-frontend                         0.23.1-0.1
python-mythtv                           0.23.1-0.1
libqtcore4                              4:4.6.3-1
libqtgui4                               4:4.6.3-1
libqt4-qt3support                       4:4.6.3-1
libqt4-sql                              4:4.6.3-1
libqt4-sql-mysql                        4:4.6.3-1
libdbd-mysql-perl                       4.016-1
libqt3-mt                               3:3.3.8b-7
libqt3-mt-mysql                         3:3.3.8b-7
libmysqlclient15off                     5.0.51a-24+lenny4
libmysqlclient16                        5.1.49-1
mysql-common                            5.1.49-1
mysql-client-5.0                        5.0.51a-24+lenny4
mysql-server-5.0                        5.0.51a-24+lenny4
xserver-xorg                            1:7.5+6
xserver-xorg-core                       2:1.7.7-3
xserver-xorg-input-evdev                1:2.3.2-6
xserver-xorg-input-kbd                  1:1.4.0-2
xserver-xorg-input-mouse                1:1.5.0-2
xserver-xorg-video-mach64               6.8.2-3




More information about the mythtv-users mailing list