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

Missing table
http://forums.linhes.org/viewtopic.php?f=21&t=24567
Page 1 of 1

Author:  Big boy stan [ Mon Oct 10, 2016 4:01 pm ]
Post subject:  Missing table

Forward jumping in recordings has been acting funny for some time now. If I start watching a recording before it finishes recording, then I can forward jump 30 seconds but only until the point in time when I started watching. I took a look in the logs and I have found hundred of these.
Code:
   012Table 'mythconverg.recordedseek' doesn't exist     


Is this important and if so, how do I recreate this table?
Thanks for the help.

Author:  tscholl [ Mon Oct 10, 2016 8:13 pm ]
Post subject:  Re: Missing table

Then information your looking for can be found here:
https://www.mythtv.org/wiki/Repairing_the_Seektable

Author:  Big boy stan [ Mon Oct 10, 2016 8:32 pm ]
Post subject:  Re: Missing table

I saw that page while googling around but that is to repair a damaged or corrupted table. In my case the table is missing and needs to be created.

Author:  brfransen [ Tue Oct 11, 2016 6:12 am ]
Post subject:  Re: Missing table

Are you sure it is gone? Does running optimize_mythdb.py show recordedseek? Do you see it on disk at /data/srv/mysql? If you don't have a backup of it that you could restore you can recreate by running just the sql that we use at install: http://cgit.linhes.org/linhes_pkgbuild/ ... ?h=testing Search for recordedseek.

Author:  Big boy stan [ Tue Oct 11, 2016 12:44 pm ]
Post subject:  Re: Missing table

No recorded seek files in /data/srv/mysql.

I am a complete noob with SQL so here is what I think I need to enter. I assume all of this to be done as user "mythtv" and not su.

Please let me know if it looks OK.

Code:
mysql -u mythtv -p mythconverg

DROP TABLE IF EXISTS `recordedseek`;

CREATE TABLE `recordedseek` (
  `chanid` int(10) unsigned NOT NULL DEFAULT '0',
  `starttime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `mark` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `offset` bigint(20) unsigned NOT NULL,
  `type` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`chanid`,`starttime`,`type`,`mark`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

LOCK TABLES `recordedseek` WRITE;

UNLOCK TABLES;
exit

Author:  brfransen [ Tue Oct 11, 2016 12:50 pm ]
Post subject:  Re: Missing table

Should be fine to do it as mythtv user.

Make sure you backup the db first. I would do each command individually. Each command ends with the semicolon.

Author:  Big boy stan [ Wed Oct 12, 2016 7:31 pm ]
Post subject:  Re: Missing table

So the mysql commands went though without error. I now have four recordedseek files in /data/srv/mysql/mythconverg/ They are recordedseek.frm, recordedseek.MYD, and recordedseek.MYI, and recordedseek.TMD. All seems good and I can watch a recording and forward skip 30 seconds as expected. But when I check the frontend log I found this repeated several times. Is this something to worry about? I ran the optimize_mythdb script and it reported the recordedseek table but didnt give any other info or errors.

Code:
2016-10-12T19:23:13.003922-04:00 mythfrontend[6171]: E CoreContext mythdbcon.cpp:864 (prepare) Error preparing query: SELECT mark, offset FROM recordedseek WHERE chanid = :CHANID AND starttime = :STARTTIME AND type = :TYPE ;
2016-10-12T19:23:13.004011-04:00 mythfrontend[6171]: E CoreContext mythdbcon.cpp:866 (prepare) Driver error was [2/144]:#012QMYSQL3: Unable to prepare statement#012Database error was:#012Table './mythconverg/recordedseek' is marked as crashed and last (automatic?) repair failed
2016-10-12T19:23:13.004258-04:00 mythfrontend[6171]: E CoreContext mythdb.cpp:183 (DBError) DB Error (QueryPositionMap):#012Query was:#012SELECT mark, offset FROM recordedseek WHERE chanid = 2570 AND starttime = '2016-10-12T00:00:00Z' AND type = 9 ;#012Bindings were:#012:CHANID=2570, :STARTTIME=2016-10-12T00:00:00Z, :TYPE=9#012Driver error was [2/144]:#012QMYSQL: Unable to execute query#012Database error was:#012Table './mythconverg/recordedseek' is marked as crashed and last (automatic?) repair failed

Author:  brfransen [ Thu Oct 13, 2016 7:07 am ]
Post subject:  Re: Missing table

I have seen this before where that TMD file doesn't get cleaned up and so the optimize_mythdb.py script can't do its thing. So delete or move the TMD file out. Then run optimize again.

Once that is working you will need to repopulate the recordedseek data as shown in the Wiki link posted earlier.

Author:  Big boy stan [ Thu Oct 13, 2016 12:03 pm ]
Post subject:  SOLVED - Re: Missing table

OK. Looks like after deleting that file and running the optimize script, all error messages are gone. Thanks for all the advice.

I will try the skip forward 30 second thing while recording tonight to see if it works as expected.

Sadly, since upgrading to 8.4, I have been having whole system lock ups about once per day. Sometimes in the middle of the night when the system is idle. I will start another thread about this to not confuse things.

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