[mythtv] Database upgrade failure

John Pilkington johnpilk222 at gmail.com
Mon Jan 24 16:58:14 UTC 2022


I noticed that Gary had added new el7-compatibility commits to his build 
scripts.  Since I had not updated my el7 (SL7.9) box since the 
incompatible libzip upgrade last July I thought it worth trying.

The build and installation seemed fine, but DB upgrade by mythtv-setup 
failed at the first schema update:

{{{

2022-01-24 15:57:43.480275 I  Current MythTV Schema Version 
(DBSchemaVer): 1370
2022-01-24 15:57:43.511085 E  Backing up database with script: 
'/usr/share/mythtv/mythconverg_backup.pl'
2022-01-24 15:58:29.714998 C  Database Backup complete.
2022-01-24 15:58:29.715563 C  Backed up database to file: 
'/home/john/SGs/MythDBbak/mythconverg-1370-20220124155743.sql.gz'
2022-01-24 15:58:50.777560 C  Upgrading to MythTV schema version 1371
2022-01-24 15:58:50.844346 E  DB Error (Performing MythtTV database 
upgrade):
Query was: CREATE TABLE sportsapi (
               id INT UNSIGNED PRIMARY KEY,
               provider TINYINT UNSIGNED DEFAULT 0,
               name VARCHAR(128) NOT NULL,
               key1 VARCHAR(256) NOT NULL,
               key2 VARCHAR(256) NOT NULL,
               UNIQUE(provider,key1,key2)
               );
Error was: Driver error was [2/1071]:
QMYSQL: Unable to execute query
Database error was:
Specified key was too long; max key length is 767 bytes

2022-01-24 15:58:50.844369 E  Database schema upgrade failed.
2022-01-24 15:58:50.844695 E  Couldn't upgrade database to new schema.
2022-01-24 15:58:50.845574 I  UDPListener: Disabling

}}}

A second attempt failed similarly, giving a backup file with a 1371 
label.  I have the most recent backups in a non-rolling folder.

Now what?  Is there a workaround or do I have to try a downgrade?
TBH the sportsapi is probably not my thing...

John P


More information about the mythtv-dev mailing list