[mythtv-users] Database error after upgrade to 0.19 SOLVED

Alexander Fisher alex at alexfisher.me.uk
Thu Feb 16 00:00:41 UTC 2006


Alexander Fisher wrote:
> Hi
> 
> The schema update seems to have gone ok, but I get the following DB
> error when running mythbackend.
> 
> Unknown column 'recorded.duplicate' in 'on clause'
> 
> I've run a mysqlcheck and every thing's fine.  I've attached the backend
> log.
> Any thoughts?
> 
> Thanks,
> Alex
> 
> 
> ------------------------------------------------------------------------
> 
> 2006-02-15 23:09:25.656 Using runtime prefix = /usr/local/mythtv
> 2006-02-15 23:09:25.678 New DB connection, total: 1
> 2006-02-15 23:09:25.681 Connected to database 'mythconverg' at host: localhost
> 2006-02-15 23:09:25.689 Current Schema Version: 1083
> 2006-02-15 23:09:25.690 Newest Schema Version : 1122
> 2006-02-15 23:09:25.690 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-15 23:09:25.692 New DB connection, total: 2
> 2006-02-15 23:09:25.693 Connected to database 'mythconverg' at host: localhost
> 2006-02-15 23:09:25.694 Upgrading to schema version 1084
> 2006-02-15 23:09:25.697 New DB connection, total: 3
> 2006-02-15 23:09:25.698 Connected to database 'mythconverg' at host: localhost
> 2006-02-15 23:09:25.699 Upgrading to schema version 1085
> 2006-02-15 23:09:25.738 Upgrading to schema version 1086
> 2006-02-15 23:09:25.748 Upgrading to schema version 1087
> 2006-02-15 23:09:25.758 Upgrading to schema version 1088
> 2006-02-15 23:09:25.796 Upgrading to schema version 1089
> 2006-02-15 23:09:26.147 Upgrading to schema version 1090
> 2006-02-15 23:09:26.175 Upgrading to schema version 1091
> 2006-02-15 23:09:26.178 Upgrading to schema version 1092
> 2006-02-15 23:09:26.188 Upgrading to schema version 1093
> 2006-02-15 23:09:26.234 Upgrading to schema version 1095
> 2006-02-15 23:09:26.270 Upgrading to schema version 1096
> 2006-02-15 23:09:26.337 Upgrading to schema version 1097
> 2006-02-15 23:09:26.363 Upgrading to schema version 1098
> 2006-02-15 23:09:26.422 Upgrading to schema version 1099
> 2006-02-15 23:09:26.425 Upgrading to schema version 1100
> 2006-02-15 23:09:26.436 Upgrading to schema version 1101
> 2006-02-15 23:09:26.444 Upgrading to schema version 1102
> 2006-02-15 23:09:26.455 Upgrading to schema version 1103
> 2006-02-15 23:09:26.465 Upgrading to schema version 1104
> 2006-02-15 23:09:26.472 Upgrading to schema version 1105
> 2006-02-15 23:09:26.490 Upgrading to schema version 1106
> 2006-02-15 23:09:26.493 Upgrading to schema version 1107
> 2006-02-15 23:09:26.514 Upgrading to schema version 1108
> 2006-02-15 23:09:26.558 Upgrading to schema version 1109
> 2006-02-15 23:09:27.695 Upgrading to schema version 1110
> 2006-02-15 23:09:27.707 Upgrading to schema version 1111
> 2006-02-15 23:09:27.732 Upgrading to schema version 1112
> 2006-02-15 23:09:27.738 Upgrading to schema version 1113
> 2006-02-15 23:09:27.740 Upgrading to schema version 1114
> 2006-02-15 23:09:27.742 Upgrading to schema version 1115
> 2006-02-15 23:09:27.751 Upgrading to schema version 1116
> 2006-02-15 23:09:27.754 Upgrading to schema version 1117
> 2006-02-15 23:09:27.764 Upgrading to schema version 1118
> 2006-02-15 23:09:27.785 Upgrading to schema version 1119
> 2006-02-15 23:09:27.788 Upgrading to schema version 1120
> 2006-02-15 23:09:27.797 Upgrading to schema version 1121
> 2006-02-15 23:09:27.802 Upgrading to schema version 1122
> 2006-02-15 23:09:27.812 Database Schema upgrade complete, unlocking.
> 2006-02-15 23:09:27.884 DVB#0 Using DVB card 0, with frontend 'Hauppauge Nova-T DVB-T'.
> 2006-02-15 23:09:28.024 DVB#1 Using DVB card 1, with frontend 'Hauppauge Nova-T DVB-T'.
> 2006-02-15 23:09:28.066 New DB scheduler connection
> 2006-02-15 23:09:28.066 Connected to database 'mythconverg' at host: localhost
> 2006-02-15 23:09:28.145 mythbackend version: 0.19.20060121-2 www.mythtv.org
> 2006-02-15 23:09:28.146 Enabled verbose msgs:  important general
> 2006-02-15 23:09:28.146 AutoExpire: Found 2 recorders w/max rate of 277 MiB/min
> 2006-02-15 23:09:28.148 AutoExpire: Required Free Space: 2.2 GB w/freq: 5 min
> 2006-02-15 23:09:30.113 Reschedule requested for id -1.
> 2006-02-15 23:09:30.179 DB Error (AddNewRecords):
> Query was:
> SELECT DISTINCT channel.chanid, channel.sourceid, program.starttime, program.endtime, program.title, program.subtitle, program.description, channel.channum, channel.callsign, channel.name, oldrecorded.endtime IS NOT NULL AS oldrecduplicate, program.category, record.recpriority, record.dupin, recorded.endtime IS NOT NULL AS recduplicate, oldfind.findid IS NOT NULL AS findduplicate, record.type, record.recordid, program.starttime - INTERVAL record.startoffset minute AS recstartts, program.endtime + INTERVAL record.endoffset minute AS recendts, program.previouslyshown, record.recgroup, record.dupmethod, channel.commfree, capturecard.cardid, cardinput.cardinputid, UPPER(cardinput.shareable) = 'Y' AS shareable, program.seriesid, program.programid, program.category_type, program.airdate, program.stars, program.originalairdate, record.inactive, record.parentid, (CASE record.type   WHEN 6    THEN record.findid   WHEN 9    THEN to_days(date_sub(program.starttime, interval          
       time_format(record.findtime, '%H:%i') hour_minute))   WHEN 10    THEN floor((to_days(date_sub(program.starttime, interval                time_format(record.findtime, '%H:%i') hour_minute)) -                record.findday)/7) * 7 + record.findday   WHEN 7    THEN record.findid   ELSE 0  END) , record.playgroup, oldrecstatus.recstatus, oldrecstatus.reactivate, channel.recpriority + cardinput.preference FROM recordmatch  INNER JOIN record ON (recordmatch.recordid = record.recordid)  INNER JOIN program ON (recordmatch.chanid = program.chanid AND                         recordmatch.starttime = program.starttime AND                         recordmatch.manualid = program.manualid)  INNER JOIN channel ON (channel.chanid = program.chanid)  INNER JOIN cardinput ON (channel.sourceid = cardinput.sourceid)  INNER JOIN capturecard ON (capturecard.cardid = cardinput.cardid)  LEFT JOIN oldrecorded as oldrecstatus ON   ( oldrecstatus.station = channel.callsign AND     oldrecstatus.star
ttime = program.starttime AND     oldrecstatus.title = program.title )  LEFT JOIN oldrecorded ON   (     record.dupmethod > 1 AND     oldrecorded.duplicate <> 0 AND     program.title = oldrecorded.title      AND      (       (program.programid <> '' AND program.generic = 0        AND program.programid = oldrecorded.programid)       OR       (oldrecorded.findid <> 0 AND         oldrecorded.findid = (CASE record.type   WHEN 6    THEN record.findid   WHEN 9    THEN to_days(date_sub(program.starttime, interval                 time_format(record.findtime, '%H:%i') hour_minute))   WHEN 10    THEN floor((to_days(date_sub(program.starttime, interval                time_format(record.findtime, '%H:%i') hour_minute)) -                record.findday)/7) * 7 + record.findday   WHEN 7    THEN record.findid   ELSE 0  END) )       OR       (        program.generic = 0        AND        (program.programid = '' OR oldrecorded.programid = '')        AND        (((record.dupmethod & 0x02) = 0) 
OR (program.subtitle <> ''           AND program.subtitle = oldrecorded.subtitle))        AND        (((record.dupmethod & 0x04) = 0) OR (program.description <> ''           AND program.description = oldrecorded.description))       )      )   )  LEFT JOIN recorded ON   (     record.dupmethod > 1 AND     recorded.duplicate <> 0 AND     program.title = recorded.title AND     recorded.recgroup <> 'LiveTV'      AND      (       (program.programid <> '' AND program.generic = 0        AND program.programid = recorded.programid)       OR       (recorded.findid <> 0 AND         recorded.findid = (CASE record.type   WHEN 6    THEN record.findid   WHEN 9    THEN to_days(date_sub(program.starttime, interval                 time_format(record.findtime, '%H:%i') hour_minute))   WHEN 10    THEN floor((to_days(date_sub(program.starttime, interval                time_format(record.findtime, '%H:%i') hour_minute)) -                record.findday)/7) * 7 + record.findday   WHEN 7    THEN recor
d.findid   ELSE 0  END) )       OR       (        program.generic = 0        AND        (program.programid = '' OR recorded.programid = '')        AND        (((record.dupmethod & 0x02) = 0) OR (program.subtitle <> ''           AND program.subtitle = recorded.subtitle))        AND        (((record.dupmethod & 0x04) = 0) OR (program.description <> ''           AND program.description = recorded.description))       )      )   )  LEFT JOIN oldfind ON   (oldfind.recordid = recordmatch.recordid AND    oldfind.findid = (CASE record.type   WHEN 6    THEN record.findid   WHEN 9    THEN to_days(date_sub(program.starttime, interval                 time_format(record.findtime, '%H:%i') hour_minute))   WHEN 10    THEN floor((to_days(date_sub(program.starttime, interval                time_format(record.findtime, '%H:%i') hour_minute)) -                record.findday)/7) * 7 + record.findday   WHEN 7    THEN record.findid   ELSE 0  END) )  ORDER BY record.recordid DESC
> Driver error was [2/1054]:
> QMYSQL3: Unable to execute query
> Database error was:
> Unknown column 'recorded.duplicate' in 'on clause'
> 
> 2006-02-15 23:09:30.182 Scheduled 0 items in 0.1 = 0.06 match + 0.01 place
> 2006-02-15 23:09:30.190 Seem to be woken up by USER
> 2006-02-15 23:09:37.828 Running HouseKeeping
> 

I had a three week old unused compile of svn mythtv kicking around in
/usr/local/mythtv.   Unfortunately, I had got around to adding
/usr/local/mythtv/lib to /etc/ld.so.conf.  My new 0.19 mythbackend
installed in /usr/bin was loading the, not quite 0.19 libmyth which was
unaware of schema change 1123. Doh!
Alex


More information about the mythtv-users mailing list