[mythtv-users] Failed database update 1327->1328

Ken Mandelberg km at mathcs.emory.edu
Sat Jun 21 15:45:46 UTC 2014


I run the trunk and the most recent update failed trying to update 1327 
to 1328.  The first attempt complained about a duplicate entry, the 
second about a missing column.

How do I recover from this?

first attempt to start mythbackend after recompile

2014-06-21 11:18:38.131488 C [1265/1265] CoreContext dbutil.cpp:656 
(DoBackup) - Backed up database to file: 
'/var/lib/mythtv/recordings/mythconverg-1326-20140621151755.sql.gz'
2014-06-21 11:18:38.171733 I [1265/1265] CoreContext 
schemawizard.cpp:269 (PromptForUpgrade) - Console is non-interactive, 
can't prompt user...
2014-06-21 11:18:38.171743 C [1265/1265] CoreContext 
schemawizard.cpp:294 (PromptForUpgrade) - Upgrading.
2014-06-21 11:18:38.210563 C [1265/1265] CoreContext dbcheck.cpp:403 
(performActualUpdate) - Upgrading to MythTV schema version 1327
2014-06-21 11:18:38.217039 C [1265/1265] CoreContext dbcheck.cpp:403 
(performActualUpdate) - Upgrading to MythTV schema version 1328
2014-06-21 11:18:38.548053 E [1265/1265] CoreContext dbcheck.cpp:418 
(performActualUpdate) - DB Error (Performing database upgrade):
Query was: ALTER TABLE record ADD UNIQUE INDEX  (chanid, starttime, 
startdate, title, type)
Error was: Driver error was [2/1062]:
QMYSQL: Unable to execute query
Database error was:
Duplicate entry '4796-02:00:00-2013-08-08-Broadchurch-4' for key 'chanid'

new version: 1328
2014-06-21 11:18:38.548089 E [1265/1265] CoreContext dbcheck.cpp:503 
(UpgradeTVDatabaseSchema) - Database schema upgrade failed.
2014-06-21 11:18:38.549796 E [1265/1265] CoreContext 
main_helpers.cpp:567 (run_backend) - Couldn't upgrade database to new schema


second attempt

  Backed up database to file: 
'/var/lib/mythtv/recordings/mythconverg-1327-20140621152400.sql.gz'
2014-06-21 11:24:28.726604 I [5063/5063] CoreContext 
schemawizard.cpp:269 (PromptForUpgrade) - Console is non-interactive, 
can't prompt user...
2014-06-21 11:24:28.726614 C [5063/5063] CoreContext 
schemawizard.cpp:294 (PromptForUpgrade) - Upgrading.
2014-06-21 11:24:28.731819 C [5063/5063] CoreContext dbcheck.cpp:403 
(performActualUpdate) - Upgrading to MythTV schema version 1328
2014-06-21 11:24:28.732215 E [5063/5063] CoreContext dbcheck.cpp:418 
(performActualUpdate) - DB Error (Performing database upgrade):
Query was: ALTER TABLE record DROP INDEX chanid
Error was: Driver error was [2/1091]:
QMYSQL: Unable to execute query
Database error was:
Can't DROP 'chanid'; check that column/key exists

new version: 1328
2014-06-21 11:24:28.732239 E [5063/5063] CoreContext dbcheck.cpp:503 
(UpgradeTVDatabaseSchema) - Database schema upgrade failed.
2014-06-21 11:24:28.732588 E [5063/5063] CoreContext 
main_helpers.cpp:567 (run_backend) - Couldn't upgrade database to new schema



More information about the mythtv-users mailing list