[mythtv] schema upgrade 1108 to 1123 fails

M. Barnabas Luntzel mark at luntzel.com
Wed Feb 22 19:55:39 UTC 2006


happy to (sorta) answer my own question...

I got it up to 1120 by removing these lines from

libs/libmythtv/dbcheck.cpp

1833,1834
"ALTER TABLE oldrecorded ADD COLUMN generic TINYINT(1) DEFAULT 0;",
"ALTER TABLE program ADD COLUMN generic TINYINT(1) DEFAULT 0;",

then it pukes on getting from 1120 to 1121 on this:

2006-02-22 10:57:39.100 Upgrading to schema version 1121
2006-02-22 10:57:39.102 DB Error (Performing database upgrade):
Query was: UPDATE keybindings SET action = 'ADJUSTSTRETCH'         
WHERE action = 'TOGGLESTRETCH';
Error was: Driver error was [2/1062]:
QMYSQL3: Unable to execute query
Database error was:
Duplicate entry 'TV Playback-ADJUSTSTRETCH-toecutter' for key 1


so I remove lines

1983-1985


"UPDATE keybindings SET action = 'ADJUSTSTRETCH' "
"       WHERE action = 'TOGGLESTRETCH';",
""

but it still barfs with:

2006-02-22 11:35:27.483 Upgrading to schema version 1121
2006-02-22 11:35:27.485 DB Error (Performing database upgrade):
Query was: UPDATE keybindings SET action = 'ADJUSTSTRETCH'         
WHERE action = 'TOGGLESTRETCH';
Error was: Driver error was [2/1062]:
QMYSQL3: Unable to execute query
Database error was:
Duplicate entry 'TV Playback-ADJUSTSTRETCH-toecutter' for key 1


so then I ran this sql:

mysql> delete from keybindings where action = 'TOGGLESTRETCH';


so then the newly compiled mythbackend is able to update the schema  
to 1126 BUT then barfs like so:

http://warpath.org/mythdebug/dump.txt

with a backtrace.

the mythbackend from atrpms now starts up happily, but then I seem to  
have to replace these columns:

mysql> ALTER TABLE oldrecorded ADD COLUMN generic TINYINT(1) DEFAULT 0;
mysql> ALTER TABLE program ADD COLUMN generic TINYINT(1) DEFAULT 0;


(the first one might not be necessary but the mythbackend.log  
complained about program.generic not existing so I just added them both)
  But the atrpms frontend complains about it being network version  
26, but the backend is version 27.


anyway I know this is a bit of a hack. has anybody else tried to take  
a schema 1108 to 1126 from  .18.1 to .19? I bet you'll run into this.



On Feb 22, 2006, at 7:22 AM, M. Barnabas Luntzel wrote:

> the DB schema upgrade fails. as far as I can tell it is trying to add
> the "generic" column twice. I deleted it by hand, tried to start
> mythbackend, then got the same error, but the column was replaced in
> the table.
>
> this is an upgrade from 0.18.1, using Atrpms packages. kernel is
> 2.6.15-1.1831_FC4, i386
>
> I've been over this with the ATRPMS list, as well as gotten no
> replies from mythtv-users. Blayne Cook is also reporting the same  
> error.
>
> is it possible that it cannot go from schema version 1108 to 1123?
>
> on mythbackend startup:
>
> 2006-02-13 08:34:36.487 Using runtime prefix = /usr
> 2006-02-13 08:34:36.518 New DB connection, total: 1
> 2006-02-13 08:34:36.526 Connected to database 'mythconverg' at host:
> localhost
> 2006-02-13 08:34:36.532 Current Schema Version: 1108
> 2006-02-13 08:34:36.537 Newest Schema Version : 1123
> 2006-02-13 08:34:36.541 New DB connection, total: 2
> 2006-02-13 08:34:36.544 Connected to database 'mythconverg' at host:
> localhost
> 2006-02-13 08:34:36.548 Setting Lock for Database Schema upgrade. If
> you see a long pause here it means the Schema is already locked and
> is being upgraded by another Myth process.
> 2006-02-13 08:34:36.553 New DB connection, total: 3
> 2006-02-13 08:34:36.556 Connected to database 'mythconverg' at host:
> localhost
> 2006-02-13 08:34:36.562 Upgrading to schema version 1109
> 2006-02-13 08:34:36.580 DB Error (Performing database upgrade):
> Query was: ALTER TABLE oldrecorded ADD COLUMN generic TINYINT(1)
> DEFAULT 0;
> Error was: Driver error was [2/1060]:
> QMYSQL3: Unable to execute query
> Database error was:
> Duplicate column name 'generic'
> new version: 1109
> 2006-02-13 08:34:36.584 Database Schema upgrade FAILED, unlocking.
> 2006-02-13 08:34:36.588 Couldn't upgrade database to new schema
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev



More information about the mythtv-dev mailing list