LinHES Forums
http://forums.linhes.org/

URGENT: No TV shows after 0.21 upgrade :-(
http://forums.linhes.org/viewtopic.php?f=6&t=18092
Page 1 of 1

Author:  Warped [ Thu Mar 27, 2008 3:22 am ]
Post subject:  URGENT: No TV shows after 0.21 upgrade :-(

Hi *

I just upgrade form r5f27 to 0.21 via 0.21-fixes comilation on r5f27 system.
Well - at first look thing went well - but closer examination shows issue with accessing existing tv shows.
FE shows my recordings groups and no shows in group OK - but entering particullar group list shows empty list.

Going into backend log shows following error:

Code:
2008-03-27 10:04:03.228 AutoExpire: CalcParams(): Max required Free Space: 4.0 GB w/freq: 15 min
2008-03-27 10:04:03.235 Started recording: 1 (TVP1) "Thu Mar 27 10:04:00 2008": channel 1001 on cardid 1, sourceid 1
2008-03-27 10:04:03.241 scheduler: Started recording: 1 (TVP1) "Thu Mar 27 10:04:00 2008": channel 1001 on cardid 1, sourceid 1
2008-03-27 10:07:05.420 MainServer::HandleAnnounce Monitor
2008-03-27 10:07:05.422 adding: mythtv as a client (events: 0)
2008-03-27 10:07:08.471 MainServer::HandleAnnounce Monitor
2008-03-27 10:07:08.476 adding: mythtv as a client (events: 0)
2008-03-27 10:07:08.609 DB Error (ProgramList::FromRecorded):
Query was:
SELECT recorded.chanid,recorded.starttime,recorded.endtime,recorded.title,recorded.subtitle,recorded.description,recorded.hostname,channum,name,callsign,commflagged,cutlist,recorded.autoexpire,editing,bookmark,recorded.category,recorded.recgroup,record.dupin,record.dupmethod,recorded.recordid,channel.outputfilters,recorded.seriesid,recorded.programid,recorded.filesize, recorded.lastmodified, recorded.findid, recorded.originalairdate, recorded.playgroup, recorded.basename, recorded.progstart, recorded.progend, recorded.stars, recordedprogram.audioprop+0, recordedprogram.videoprop+0, recordedprogram.subtitletypes+0, transcoded, recorded.recpriority, watched, recorded.preserve, recorded.storagegroup FROM recorded LEFT JOIN record ON recorded.recordid = record.recordid LEFT JOIN channel ON recorded.chanid = channel.chanid LEFT JOIN recordedprogram ON  ( recorded.chanid = recordedprogram.chanid AND   recorded.progstart = recordedprogram.starttime ) WHERE ( recorded.deletepending = 0 OR         DATE_ADD(recorded.lastmodified, INTERVAL 5 MINUTE) <= NOW()       ) ORDER BY recorded.starttime DESC,atsc_major_chan,atsc_minor_chan,channum,callsign
Driver error was [2/1054]:
QMYSQL3: Unable to execute query
Database error was:
Unknown column 'watched' in 'field list'

2008-03-27 10:07:13.654 MainServer::HandleAnnounce Monitor
2008-03-27 10:07:13.655 adding: mythtv as a client (events: 0)
2008-03-27 10:07:15.973 MainServer::HandleAnnounce Monitor
2008-03-27 10:07:15.977 adding: mythtv as a client (events: 0)
2008-03-27 10:07:16.101 DB Error (ProgramList::FromRecorded):
Query was:
SELECT recorded.chanid,recorded.starttime,recorded.endtime,recorded.title,recorded.subtitle,recorded.description,recorded.hostname,channum,name,callsign,commflagged,cutlist,recorded.autoexpire,editing,bookmark,recorded.category,recorded.recgroup,record.dupin,record.dupmethod,recorded.recordid,channel.outputfilters,recorded.seriesid,recorded.programid,recorded.filesize, recorded.lastmodified, recorded.findid, recorded.originalairdate, recorded.playgroup, recorded.basename, recorded.progstart, recorded.progend, recorded.stars, recordedprogram.audioprop+0, recordedprogram.videoprop+0, recordedprogram.subtitletypes+0, transcoded, recorded.recpriority, watched, recorded.preserve, recorded.storagegroup FROM recorded LEFT JOIN record ON recorded.recordid = record.recordid LEFT JOIN channel ON recorded.chanid = channel.chanid LEFT JOIN recordedprogram ON  ( recorded.chanid = recordedprogram.chanid AND   recorded.progstart = recordedprogram.starttime ) WHERE ( recorded.deletepending = 0 OR         DATE_ADD(recorded.lastmodified, INTERVAL 5 MINUTE) <= NOW()       ) ORDER BY recorded.starttime DESC,atsc_major_chan,atsc_minor_chan,channum,callsign
Driver error was [2/1054]:
QMYSQL3: Unable to execute query
Database error was:
Unknown column 'watched' in 'field list'

2008-03-27 10:07:19.247 MainServer::HandleAnnounce Monitor
2008-03-27 10:07:19.250 adding: mythtv as a client (events: 0)


Indeed examinating fieldlist in recorded table structure shows no field like "watched" (or I'm looking into wrong place).
Should I simply add this field to recorded table ?
If so what field type is needed and how to do that in simply and error-free manner ?

Can somebody help me pls with this issue as my familly will simply kill me when they discover missing tv shows....

br

Author:  silentmic [ Thu Mar 27, 2008 6:25 am ]
Post subject: 

It looks like you might have had problems with the database schema upgrade. What happens the first time the backend is run after you upgrade is that it checks the schema version in the settings table. It then runs a series of database upgrades based on what your current schema version is to get it up to the required schema version for 0.21, I have 1214 for this. When I upgraded, I almost had problems with the schema upgrade because I had run an svn version at some stage prior to 0.20 coming out. Some of the columns that it tried to add on the schema upgrade were already there. What I had to do was update the settings table to wind the schema version back by running some sort of sql statement like "update settings set data = '1170' where value = 'DBSchemaVer'". Then the schema upgrade would repeatedly fail because of something like it trying to add a column that was already there. The reason for the failure was in the mythbackend.log. I just had to keep looking at the error messages and do things like drop columns that it was trying to add so that the sql statement would succeed. Eventually you'll see all the sql statements for the upgrade to the next schema version succeed and the schema will go up by 1 number at a time. This sounds like it would take a long time, but I started the upgrade about 11pm on a work night and was up and running without going to bed about 1 or 2 in the morning. You might need to update your schema version through sql to an earlier version to force the upgrade to happen. If you've got a backup of your 0.20 database, maybe set it back to the schema version in hat or just restore the database and start again. If you've run an svn version some time, you might need to wind the schema version back further. Here are my schema versions:

mysql> select value, data from settings where value like '%schema%';
+------------------------------------------------------------+--------------------------------------+
| value | data |
+------------------------------------------------------------+--------------------------------------+
| DBSchemaVer | 1214 |
| GalleryDBSchemaVer | 1000 |
| GameDBSchemaVer | 1012 |
| MusicDBSchemaVer | 1006 |
| PhoneDBSchemaVer | 1001 |
| mythvideo.DBSchemaVer | 1016 |
| WebDBSchemaVer | 2 |
| upnp:UDN:urn:schemas-upnp-org:device:MediaServer:1 | 3e529a4f-abcb-4bcc-9b6f-368f7064b545 |
| ArchiveDBSchemaVer | 1001 |
| upnp:UDN:urn:schemas-mythtv-org:device:MasterMediaServer:1 | 6d2d9b99-aabd-400b-a23c-f5138201d78d |
| FlixDBSchemaVer | 1001 |
+------------------------------------------------------------+--------------------------------------+
11 rows in set (0.00 sec)

Author:  Warped [ Thu Mar 27, 2008 7:13 am ]
Post subject: 

silentmic wrote:
It looks like you might have had problems with the database schema upgrade.


milion thnx for quick answer !!!!

This is exactly my theory. But currently I believe it is bug in schema upgrade code - as upgrade was form 0.20.2 db (no SVN) where db tables schemes are well known.
BTW: similar problem (no recordings listed) I had when I simulate upgrade in virtual environment based on vanilla r5f27. I'm not sure what was root cause - but effect was exactly the same.

I will check my tables schema versions when I will back at home.

Generally I foreseen 2 solutions:

-change recorded table schema ver back to 0.20.2 and let myth upgrade code to do schema upgrade (it will work if upgrade code is OK)

-manually add colon "watched".

For second I don't know what type is should be (int or short int or bool)

I'll be very glad If You can help me with finding:
-recorded table schema version for 0.20.2
-recorded table schema. version for 0.21
-recorded table structure def.

I believe for second solution I should issue:

alter table recorded add column watched [var type];

where [var type] is presently unknown for me :-(

Is this OK ?

Author:  slowtolearn [ Thu Mar 27, 2008 7:30 am ]
Post subject: 

Warped wrote:
I believe for second solution I should issue:

alter table recorded add column watched [var type];

where [var type] is presently unknown for me :-(
On my 0.21-fixes this is the recorded table layout:
    mysql> desc recorded;
    +-----------------+------------------+------+-----+---------------------+-------+
    | Field | Type | Null | Key | Default | Extra |
    +-----------------+------------------+------+-----+---------------------+-------+
    | chanid | int(10) unsigned | NO | PRI | 0 | |
    | starttime | datetime | NO | PRI | 0000-00-00 00:00:00 | |
    | endtime | datetime | NO | MUL | 0000-00-00 00:00:00 | |
    | title | varchar(128) | NO | MUL | | |
    | subtitle | varchar(128) | NO | | | |
    | description | text | NO | | | |
    | category | varchar(64) | NO | | | |
    | hostname | varchar(255) | NO | | | |
    | bookmark | tinyint(1) | NO | | 0 | |
    | editing | int(10) unsigned | NO | | 0 | |
    | cutlist | tinyint(1) | NO | | 0 | |
    | autoexpire | int(11) | NO | | 0 | |
    | commflagged | int(10) unsigned | NO | | 0 | |
    | recgroup | varchar(32) | NO | MUL | Default | |
    | recordid | int(11) | YES | MUL | NULL | |
    | seriesid | varchar(40) | NO | MUL | | |
    | programid | varchar(40) | NO | MUL | | |
    | lastmodified | timestamp | NO | | CURRENT_TIMESTAMP | |
    | filesize | bigint(20) | NO | | 0 | |
    | stars | float | NO | | 0 | |
    | previouslyshown | tinyint(1) | YES | | 0 | |
    | originalairdate | date | YES | | NULL | |
    | preserve | tinyint(1) | NO | | 0 | |
    | findid | int(11) | NO | | 0 | |
    | deletepending | tinyint(1) | NO | MUL | 0 | |
    | transcoder | int(11) | NO | | 0 | |
    | timestretch | float | NO | | 1 | |
    | recpriority | int(11) | NO | | 0 | |
    | basename | varchar(255) | NO | | | |
    | progstart | datetime | NO | | 0000-00-00 00:00:00 | |
    | progend | datetime | NO | | 0000-00-00 00:00:00 | |
    | playgroup | varchar(32) | NO | | Default | |
    | profile | varchar(32) | NO | | | |
    | duplicate | tinyint(1) | NO | | 0 | |
    | transcoded | tinyint(1) | NO | | 0 | |
    | watched | tinyint(4) | NO | | 0 | |
    | storagegroup | varchar(32) | NO | | Default | |
    +-----------------+------------------+------+-----+---------------------+-------+
Hope this helps.

Author:  Warped [ Thu Mar 27, 2008 7:36 am ]
Post subject: 

Quote:
| watched | tinyint(4) | NO | | 0 | |


thx

Ok I will then go with:

alter table recorded add column watched tinyint4;

Will this be enough ?

br

Author:  Warped [ Fri Mar 28, 2008 5:27 am ]
Post subject: 

Guys,

Some feedback:
-adding colon solves the problem.
-I will simulate whole upgrade process again in virtual environment for further nailing where issue is
-I might be well worth to consider by KM dev to add "only Myth upgrade" scenario in next KM. As I was able to do it rather issue-less style (beside issue described in this thread which is now under my closer investigation) - for bright ppl like Cecil it should be just snap.

br

Author:  tjc [ Fri Mar 28, 2008 5:07 pm ]
Post subject: 

Warped wrote:
-adding colon solves the problem.

You mean "column" not "colon".

This is a colon -> :

This is 4 rows each containing 3 columns on numbers:
Code:
1       2       3
10      20      30
100     200     300
1000    2000    3000

I was scratching my head for a while there trying to figure out what the heck you really meant...

Author:  Warped [ Sat Mar 29, 2008 2:21 am ]
Post subject: 

tjc,

I really really appreciate You educational effort....

BTW: You know - sometimes ppl are making typos, right

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/